R. Lahaye wrote:
 >
>   /usr/X11R6/lib/libqt-mt.so.3: undefined reference to `pthread_cond_timedwait'
>   gmake[3]: *** [lyx] Error 1
> 
> This is because -pthread is somewhere missing in the compilation process. This
> is a typical FreeBSD issue.
> Only on FreeBSD the compiler needs (sometimes?) the -pthread flag. man gcc:
> 
>   [...]
>   -pthread   Link a user-threaded process against libc_r instead
>              of libc. Objects linked into user-threaded processes
>              should be compiled with -D_THREAD_SAFE.
>   [...]

In the configure script, I have to replace all "-lc" by "-lc_r".
BTW config/gnome.m4 and config/ltmain.sh do already something is this direction,
but this is obviously not enough! ltmain.sh says somewhere:
         *-*-openbsd*)
             # Do not include libc due to us having libc/libc_r.
             [...]


In addition I have to set the following environment variables, before running 
configure:

    CFLAGS=-D_THREAD_SAFE -pthread
    CPPFLAGS=-D_THREAD_SAFE -pthread
    CXXFLAGS=-D_THREAD_SAFE -pthread


Then everything is fine.

HOORAY: LyX runs wonderfully with Qt3 on my FreeBSD box!!! Nice, nice, nice!


Apparently, if LyX must work "out-of-the-box" with Qt, then (Free)BSD requires
some more tweeking of the scripts.

Regards,
Rob.

Reply via email to