gcc 2.95.2 and pthreads on FreeBSD 3.4

Loren James Rittle rittle@latour.rsch.comm.mot.com
Mon Mar 20 14:42:00 GMT 2000


> I just installed gcc 2.95.2 through the ports system on a FreeBSD 3.4
> machine.  I then changed the Makefile for an application I am working on
> to refer to gcc295 instead of gcc.

> When I try to build the app, it compiles fine, but complains at the link
> phase as follows:

> gcc295 -g -pg -pthread -O  [FILES].o -lpcap -o [TARGET]
> utils.o: In function `my_read':
> /home/jwilkins/[app]/utils.c:288: undefined reference to
[...]

> If I remove the -pthread option and use -lpthread instead, everything
> resolves, but I get a bus error on execution... 

> It seems to be some sort of naming problem, as pthread_create is found.. 

If you can send me a small testcase that displays the problem, then I
would be happy to look at the problem.

Also, exactly which port from /usr/port did you install?  What options
did you give make?  And what is the exact CVS version number of the
Makefile (found with: grep '$FreeBSD' /usr/ports/lang/egcs/Makefile)?

Regards,
Loren


More information about the Gcc mailing list