Welcome to the new Linux Foundation Forum!

problem while running make

Hi

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

[[email protected] ]# 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

[[email protected] ]#

I installed fedora 14 in my system.

[[email protected] 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

[[email protected] Watchdog]#

Thanks in advance.

Comments

  • woboylewoboyle Posts: 501
    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.
  • 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.


    [[email protected] ]# 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
    [[email protected] ]#
  • marcmarc Posts: 647
    You need the glibc packages (probably the dev ones)
  • woboylewoboyle Posts: 501
    Just like libpthread, libc's static link version is libc_nonshared.a, so link with -lc_nonshared instead of -lc
  • Hi,

    Sorry for the late reply.

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

    [[email protected] ]# 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
    [[email protected] ]#
  • Hi,

    Sorry for the late reply.

    I tried to install glibc, but it is showing that it is already installed.

    [[email protected] ]# yum install glibc
    Loaded plugins: langpacks, presto, refresh-packagekit
    Adding en_US to language list
    Setting up Install Process
    Package glibc-2.12.90-17.i686 already installed and latest version
    Nothing to do
    [[email protected] ]#
Sign In or Register to comment.