Linux.com

Home Linux Community Forums Software Installation problem while running make

problem while running make

Link to this post 07 Apr 11

Hi
I am getting the below error while running make.Could you please help me to resolve this issue.

[root@localhost ]# make
gcc -static -o ../host_bin/watchdog ./watchdog.o -L ../Rlib/lib_host/ -lRhm -L ../Rlib/lib_host/ -lrtimer -lpthread
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [../host_bin/watchdog] Error 1
[root@localhost ]#

I installed fedora 14 in my system.
[root@localhost Watchdog]# uname -a
Linux localhost.localdomain 2.6.35.6-45.fc14.i686 #1 SMP Mon Oct 18 23:56:17 UTC 2010 i686 i686 i386 GNU/Linux
[root@localhost Watchdog]#


Thanks in advance.

Link to this post 07 Apr 11

Well, it seems you are missing the pthread library, or it isn't in your library search path for the linker. I see you are running a 32-bit OS. Also, you are doing a static linkage. The file name of the static version of the pthread library is libpthread_nonshared.a, so try using -lpthread_nonshared instead of -lpthread on the link line.

Link to this post 07 Apr 11

Thanks very much.

Now I am not getting the lpthred message, but still I am getting the "can not find:lc" message. Could you please tell me how to resolve it.


[root@localhost ]# make
gcc -static -o ../host_bin/watchdog ./watchdog.o -L ../Rlib/lib_host/ -lRhm -L ../Rlib/lib_host/ -lrtimer -lpthread_nonshared
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [../host_bin/watchdog] Error 1
[root@localhost ]#

Link to this post 08 Apr 11

You need the glibc packages (probably the dev ones)

Link to this post 09 Apr 11

Just like libpthread, libc's static link version is libc_nonshared.a, so link with -lc_nonshared instead of -lc

Link to this post 10 Apr 11

Hi,

Sorry for the late reply.

I tried with -lc_nonshared, but still it is showing the same error.

[root@localhost ]# make
gcc -static -o ../host_bin/watchdog ./watchdog.o -L ../Rlib/lib_host/ -lRhm -L ../Rlib/lib_host/ -lrtimer -lpthread_nonshared -lc_nonshared
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [../host_bin/watchdog] Error 1
[root@localhost ]#

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board