Building gtk-2.6.9: problem and solution
lukem.freebsd at cse.unsw.edu.au
lukem.freebsd at cse.unsw.edu.au
Thu Aug 11 00:26:48 GMT 2005
I've been having trouble with portupgrade not succeeding with upgrading
gtk for a while, and this morning I figured out why. I noticed a lot of
people with similar compile issues when googling, so I figured one post
here might save others some time in the future.
The compile would fail with:
cc -O -pipe -mcpu=pentiumpro -Wall -o timescale timescale.o
-L/usr/local/lib -L/usr/X11R6/lib ./.libs/libpixops.a -lglib-2.0 -liconv
-lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lm -lintl
/usr/local/lib/libgthread-2.0.so: undefined reference to `pthread_attr_destroy'
And similar for a bunch of pthread functions.
Listing the symbols in /usr/local/lib/libgthread-2.0.so using nm showed
that indeed, they were not defined.
Anyway, to cut a long story short, if you link with -pthread as well as
libgthread, things will build properly.
So, build with "make CFLAGS=-pthread" instead of just "make".
Perhaps a port maintainer would like to make this default behaviour, or
perhaps my libgthread should have been built differently.
I tried rebuilding glib-2.6.6 to make sure it wasn't the problem.
Interestingly my AMD-64 box which is also maintained with cvsup and
portupgrade did not encounter the same problem.
--
Luke
More information about the freebsd-ports
mailing list