help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU make 4.1 does not load libpthread


From: 彭怀敏
Subject: GNU make 4.1 does not load libpthread
Date: Tue, 6 Sep 2016 08:30:13 +0800 (CST)

Hi, I am using Ubuntu16.04, with GNU make 4.1.
I was failed while built my project which referenced to libpthread and libm, 
but it was OK while used Ubuntu10.04 with GNU make 3.81.
I found the difference of the "strace make" output between the two versions of 
make, that LD will open libpthread after open libc in v3.81, but it will not 
open libpthread in v4.1, and thus I got a lot of "undefined reference to", and 
"collect2: error: ld returned 1 exit status".

Here is part of my makefile, a simple makefile:

OBJS = median.o EventParam.o Filter.o OtdrAlgo.o Otdr.o \
       OtdrEdma.o OtdrMain.o OtdrTable.o NetworkSocket.o \
       Utility.o OtdrTouch.o Event.o

CFLAGS = -g -Wall
LDFLAGS = -lm -lpthread

#CROSS_COMPILE = /opt/itop/4.3.2/bin/arm-linux-

linuxotdr: $(OBJS)
    $(CROSS_COMPILE)gcc $(CFLAGS) $(LDFLAGS) -o $@ $^

Event.o : Event.c Otdr.h prototypes.h protocol.h DspFpgaReg.h
    $(CROSS_COMPILE)gcc -c $(CFLAGS)   $^
.........

I don't know how to solve it, could you help me?
Thanks very much.





 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]