From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Wilkins To: gcc@gcc.gnu.org Subject: gcc 2.95.2 and pthreads on FreeBSD 3.4 Date: Sat, 18 Mar 2000 20:43:00 -0000 Message-id: <38D45AC5.18CBC059@madscience.nu> X-SW-Source: 2000-03/msg00484.html 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 `__pthread_read' utils.o: In function `writen': /home/jwilkins/[app]/utils.c:346: undefined reference to `__pthread_write' utils.o: In function `readn': /home/jwilkins/[app]/utils.c:376: undefined reference to `__pthread_read' jwsniff.o: In function `main': /home/jwilkins/[app]/jw.c:87: undefined reference to `__pthread_accept' collect2: ld returned 1 exit status *** Error code 1 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.. Suggestions would be much appreciated.. Thanks Jonathan