This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc 2.95.2 and pthreads on FreeBSD 3.4


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]