Date: Thu, 11 Aug 2005 10:26:44 +1000 (EST) From: lukem.freebsd@cse.unsw.edu.au To: freebsd-ports@freebsd.org Subject: Building gtk-2.6.9: problem and solution Message-ID: <Pine.LNX.4.61.0508111013490.8401@wagner.orchestra.cse.unsw.EDU.AU>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.61.0508111013490.8401>