Open
Bug 1078370
Opened 11 years ago
Updated 3 years ago
Build error with clang 3.5 on Ubuntu 14.10: "arcfour-amd64-gas.s:87:1: error: DWARF2 only supports one section per compilation unit"
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: dholbert, Unassigned)
References
Details
STR:
1. Be running Ubuntu 14.10 (currently beta) and the "clang" package.
2. Try to build mozilla-central, as an opt build. I'm using this one-line mozconfig:
> mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-opt
ACTUAL RESULTS:
The following build error.
{
arcfour-amd64-gas.s:87:1: error: DWARF2 only supports one section per compilation unit
.section .note.GNU-stack,"",@progbits
^
../../coreconf/rules.mk:408: recipe for target '$OBJDIR/security/nss/lib/freebl/arcfour-amd64-gas.o' failed
make[8]: *** [$OBJDIR/opt/security/nss/lib/freebl/arcfour-amd64-gas.o] Error 1
}
I'm able to build successfully with clang 3.4 on the same system.
VERSION INFO:
I'm building mozilla-central changeset 0ed32d9a42d6 on up-to-date Ubuntu 14.10 (beta).
My clang 3.5 reports itself as:
{
Ubuntu clang version 3.5.0-4ubuntu2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
}
(Note that this is more bleeding edge than the supposedly-"clang 3.5" version in Ubuntu 14.04, which is based off an older llvm trunk snapshot, I believe)
Not sure if this belongs as a build-config bug, a NSS bug, or a clang bug; filing it under build-config for now.
| Reporter | ||
Comment 2•11 years ago
|
||
Thanks! So, it's a clang bug, already fixed upstream, but the fix hasn't (yet) made it into the clang package on Ubuntu 14.10.
I'll resolve this when I notice the ubuntu package being fixed.
See Also: → http://llvm.org/bugs/show_bug.cgi?id=20879
Comment 4•11 years ago
|
||
Downgrade clang.
Comment 5•11 years ago
|
||
Or, in fact, upgrade clang, since the upstream bug is "fixed" (for some value of fixed)
| Reporter | ||
Comment 6•11 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #4)
> Downgrade clang.
In particular: "sudo apt-get install clang-3.4"
(In reply to Mike Hommey [:glandium] from comment #5)
> Or, in fact, upgrade clang, since the upstream bug is "fixed" (for some value of fixed)
The fix still hasn't made it to Ubuntu 14.10 "clang" package, BTW, so I don't think you can upgrade via Ubuntu's repos yet. (I just verified that it's still broken there on my up-to-date Ubuntu 14.10 system.)
So, to upgrade, I think you need to build clang yourself, or download updated binaries from somewhere else.
(http://llvm.org/apt/ seems to have nightly builds available for Ubuntu via a 3rd-party repo; I'd expect this to be fixed there, though it's probably somewhat unstable.)
Comment 8•11 years ago
|
||
> In particular: "sudo apt-get install clang-3.4"
That does nothing for me, other than tell me this:
> clang-3.4 is already the newest version.
> So, to upgrade, I think you need to build clang yourself, or download
> updated binaries from somewhere else.
I tried this, but current clang trunk fails to build Firefox due to a different problem. Argh.
| Reporter | ||
Comment 9•11 years ago
|
||
Wait, are you saying you hit this bug, **when compiling with clang version 3.4**? Or do you just have clang 3.4 and 3.5 installed side-by-side?
Flags: needinfo?(n.nethercote)
| Reporter | ||
Comment 10•11 years ago
|
||
(To clarify: on my Ubuntu system, at the time of comment 7, the repo-provided clang packages would only allow one version to be installed at a time. So, installing clang 3.4 would uninstall my repo-provided "clang" package (which had version 3.5). I'm pretty sure I didn't hit this bug after rebuilding with clang 3.4 at that point, but I might be misremembering.)
Comment 11•11 years ago
|
||
After updating Ubuntu to 14.10, "clang" was updated to version 3.5.
"sudo apt-get install clang-3.4" installed clang version 3.4 at "clang-3.4".
Try "clang --version" vs. "clang-3.4 --version".
To use clang-3.4, modify your .mozconfig like this:
export CC="clang-3.4 -fcolor-diagnostics"
export CXX="clang++-3.4 -fcolor-diagnostics"
This let me build mozilla-central successfully.
Comment 12•11 years ago
|
||
Like Steffen says, after running |sudo apt-get install clang-3.4|, |clang| is 3.5 and |clang-3.4| is 3.4.
Flags: needinfo?(n.nethercote)
Comment 13•10 years ago
|
||
This happens now on Fedora 22 when building opt builds.
Comment 14•10 years ago
|
||
gcc it is for now.
Comment 15•10 years ago
|
||
I'm running into this but, strangely, only for optimized builds. Debug builds are fine.
Updated•8 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•