LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   collect2: cannot find 'ld' (https://www.linuxquestions.org/questions/linux-newbie-8/collect2-cannot-find-%27ld%27-4175639995/)

jen.payout 10-09-2018 12:39 AM

collect2: cannot find 'ld'
 
PHP Code:

gcc --pthread -/tmp/usr/include -no-use-gold-linker /tmp/teeest.-/tmp/teeest > /tmp/ok.log  2>/tmp/error.log 


Code:

Using built-in specs.
gcc: unrecognized option '-no-use-gold-linker'
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)
COLLECT_GCC_OPTIONS='-v' '-pthread' '-I' '/tmp/usr/include' '-no-use-gold-linker' '-o' '/tmp/teeest' '-mtune=generic'
 /usr/libexec/gcc/x86_64-redhat-linux/4.4.7/cc1 -quiet -v -I /tmp/usr/include -iprefix ../lib/gcc/x86_64-redhat-linux/4.4.7/ -D_REENTRANT /tmp/teeest.c -quiet -dumpbase teeest.c -mtune=generic -auxbase teeest -version -o /tmp/ccVr6ozd.s
ignoring nonexistent directory "../lib/gcc/x86_64-redhat-linux/4.4.7/include"
ignoring nonexistent directory "../lib/gcc/x86_64-redhat-linux/4.4.7/include-fixed"
ignoring nonexistent directory "../lib/gcc/x86_64-redhat-linux/4.4.7/../../../../x86_64-redhat-linux/include"
ignoring nonexistent directory "../lib/../lib/gcc/x86_64-redhat-linux/4.4.7/include"
ignoring nonexistent directory "../lib/../lib/gcc/x86_64-redhat-linux/4.4.7/include-fixed"
ignoring nonexistent directory "../lib/../lib/gcc/x86_64-redhat-linux/4.4.7/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /tmp/usr/include
 /usr/local/include
 /usr/include
End of search list.
GNU C (GCC) version 4.4.7 20120313 (Red Hat 4.4.7-17) (x86_64-redhat-linux)
        compiled by GNU C version 4.4.7 20120313 (Red Hat 4.4.7-17), GMP version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d2ae160e13b93f509f25a064aa53b455
COLLECT_GCC_OPTIONS='-v' '-pthread' '-I' '/tmp/usr/include' '-no-use-gold-linker' '-o' '/tmp/teeest' '-mtune=generic'
 as -V -Qy -o /tmp/ccCIoBhH.o /tmp/ccVr6ozd.s
GNU assembler version 2.20.51.0.2 (x86_64-redhat-linux) using BFD version version 2.20.51.0.2-5.44.el6 20100205
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.4.7/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.4.7/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.4.7/:../lib/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:../lib/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-pthread' '-I' '/tmp/usr/include' '-no-use-gold-linker' '-o' '/tmp/teeest' '-mtune=generic'
 /usr/libexec/gcc/x86_64-redhat-linux/4.4.7/collect2 --eh-frame-hdr --build-id -m elf_x86_64 --hash-style=gnu -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /tmp/teeest /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.4.7/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L../lib/../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L../lib /tmp/ccCIoBhH.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.4.7/crtend.o /usr/lib/../lib64/crtn.o
collect2: cannot find 'ld'


rtmistler 10-09-2018 09:07 AM

Welcome to LQ,

Please see the link in my signature about how to use the Linux Questions site and please provide an update for members with additional details.

Your question contains a good amount of information, but it is still not too informative about what you're trying to do.

Have you looked up what 'ld' is in Linux and GCC?

You should also remove that flag -no-use-gold-linker since it is not supported.

AwesomeMachine 10-09-2018 03:47 PM

The program 'collect2' cannot find the program 'ld'. Does 'ld' exist on the system? Is it in the PATH for gcc?


All times are GMT -5. The time now is 08:06 AM.