Description of problem: In our build scripts we point cmake to the DTS compiler by using the absolute path (/opt/rh/devtoolset-3/root/usr/bin/gcc). If we now add -fuse-ld=gold it cannot find the linker: collect2: fatal error: cannot find 'ld' Version-Release number of selected component (if applicable): devtoolset-3-gcc-4.9.2-6.el6.x86_64 How reproducible: always Steps to Reproduce: 0. Do not have devtoolset in PATH 1. echo 'int main() { return 0; }' > main.c 2. /opt/rh/devtoolset-3/root/usr/bin/gcc -fuse-ld=gold main.c Actual results: collect2: fatal error: cannot find 'ld' Expected results: links without problems Additional info: An strace shows the following (linker related): 10360 stat("/usr/opt/rh/devtoolset-3/root/usr/bin/../libexec/gcc/x86_64-redhat-linux/4.9.2/ld.gold", 0x7fff40df82b0) = -1 ENOENT (No such file or directory) 10360 stat("/usr/opt/rh/devtoolset-3/root/usr/bin/../libexec/gcc/ld.gold", 0x7fff40df82b0) = -1 ENOENT (No such file or directory) So the problem should be gone if gcc would provide in x86_64-redhat-linux/4.9.2 not only a symlink to ld but also to ld.gold and ld.bfd. If I create the symlink there manually it works as expected. Could you please provide the needed symlinks? Thanks, Gregor
Forgot to add: This is a RHEL6 host.
One could work around by setting the search path with -B
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2015-2040.html