getting bad gold linker value
See original GitHub issueATTENTION! Please read and follow:
- if this is a question about how to build / test / query / deploy using Bazel, or a discussion starter, send it to bazel-discuss@googlegroups.com
- if this is a bug or feature request, fill the form below as best as you can.
Description of the problem / feature request:
building bazel from source for the first time and getting below error: gcc: error: unrecognized command line option ‘-fuse-ld=–enable-gold=yes’
the issue is unix_cc_configure.bzl where it is trying to determine whether ‘-fuse-ld=gold’ is set. It is going through each line to find first line that contains the word ‘gold’. Unfortunately, it found below line and return flag as ‘–enable-gold=yes’: x86-64.rhel.6 --enable-gold=yes --enable-tls --enable-rpath --enable-shared --enable-languages=c,c++,objc,fortran
Feature requests: what underlying problem are you trying to solve with this feature?
Replace this line with your answer.
Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Replace this line with your answer.
What operating system are you running Bazel on?
redhat 6
What’s the output of bazel info release
?
If bazel info release
returns “development version” or “(@non-git)”, tell us how you built Bazel.
Replace this line with your answer.
What’s the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?
Replace this line with your answer.
Have you found anything relevant by searching the web?
Replace these lines with your answer.
Places to look:
- StackOverflow: http://stackoverflow.com/questions/tagged/bazel
- GitHub issues: https://github.com/bazelbuild/bazel/issues
- email threads on https://groups.google.com/forum/#!forum/bazel-discuss
Any other information, logs, or outputs that you want to share?
Replace these lines with your answer.
If the files are large, upload as attachment or provide link.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
I saw the same issue, was able to dance around it with this patch:
I fixed the issue in the rules_cc repo so you can use that instead of the snapshot of it that is distributed with Bazel (so you don’t have to wait for Bazel release).
And TBH, I just forgot to fix it in Bazel. Will do that this week.