Bug 1269279
| Summary: | GCC does not find gold linker if it is not in PATH | ||
|---|---|---|---|
| Product: | Red Hat Developer Toolset | Reporter: | Gregor Jasny <gjasny> |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED ERRATA | QA Contact: | Miroslav Franc <mfranc> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | DTS 3.1 RHEL 6 | CC: | bgollahe, law, mcermak, mfranc, mnewsome, mpolacek, ohudlick |
| Target Milestone: | beta2 | ||
| Target Release: | 4.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | devtoolset-4-gcc-5.2.1-2.2.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-16 15:11:05 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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 |
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