Closed
Bug 1351700
Opened 8 years ago
Closed 8 years ago
Linking webrtc-gtest fails with "error: undefined reference to 'nsTraceRefcnt::WalkTheStack(_IO_FILE*)'"
Categories
(Firefox Build System :: General, defect, P1)
Firefox Build System
General
Tracking
(firefox55 fixed)
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: nika, Assigned: dminor)
References
Details
Attachments
(2 files)
When building a firefox debug on linux, the build fails with a linker error. I've attached the relevant section of the mach output to this bug.
Assignee | ||
Comment 1•8 years ago
|
||
From irc:
15:08 < dminor> mystor: what is your build configuration? non-asan debug?
15:08 < mystor> dminor: --disable-optimize --enable-debug --enable-warnings-as-errors linux x64 ubuntu
Assignee: nobody → dminor
Assignee | ||
Comment 2•8 years ago
|
||
:mystor, can you please attach your complete mozconfig file? I just did a linux x64 ubuntu debug build on my local machine and I wasn't able to reproduce this.
Reporter | ||
Comment 3•8 years ago
|
||
mozconfig:
ac_add_options --enable-warnings-as-errors
ac_add_options --disable-optimize
ac_add_options --enable-debug
CC="icecc gcc"
CXX="icecc g++"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-debug-@CONFIG_GUESS@
mk_add_options AUTOCLOBBER=1
$ icecc --version
ICECC 1.0.1
$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I'm building on the Toronto icecream cluster. I don't believe this should have an impact on this but I can run another build without icecream to check if you would like.
Flags: needinfo?(michael)
Comment 4•8 years ago
|
||
FWIW I can repro with the following mozconfig, also after clobbering completely:
mk_add_options AUTOCLOBBER=1
mk_add_options MOZ_MAKE_FLAGS="-j8"
CC="gcc -fdiagnostics-color=always"
CXX="g++ -fdiagnostics-color=always"
ac_add_options --with-ccache=/usr/bin/ccache
ac_add_options --enable-debug
ac_add_options --disable-optimize
gcc (GCC) 6.3.1 20170306
ccache version 3.3.4
Assignee | ||
Comment 5•8 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #4)
> FWIW I can repro with the following mozconfig, also after clobbering
> completely:
>
> mk_add_options AUTOCLOBBER=1
> mk_add_options MOZ_MAKE_FLAGS="-j8"
>
> CC="gcc -fdiagnostics-color=always"
> CXX="g++ -fdiagnostics-color=always"
>
> ac_add_options --with-ccache=/usr/bin/ccache
> ac_add_options --enable-debug
> ac_add_options --disable-optimize
>
>
> gcc (GCC) 6.3.1 20170306
> ccache version 3.3.4
Thanks! This reproduces for me and I don't have to worry about icecc.
Assignee | ||
Comment 6•8 years ago
|
||
This fixes things for me locally: https://hg.mozilla.org/try/rev/d4066a40a445c18fd62ea462f1751912215cfd0f
Please give it a try and let me know if it works for you as well. Thanks!
Flags: needinfo?(michael)
Flags: needinfo?(emilio+bugs)
Reporter | ||
Comment 7•8 years ago
|
||
(In reply to Dan Minor [:dminor] from comment #6)
> This fixes things for me locally:
> https://hg.mozilla.org/try/rev/d4066a40a445c18fd62ea462f1751912215cfd0f
>
> Please give it a try and let me know if it works for you as well. Thanks!
Yes, applying this patch seems to fix the problem for me locally - the build succeeds. Thanks!
Flags: needinfo?(michael)
Comment hidden (mozreview-request) |
Comment 9•8 years ago
|
||
dminor, this should only be necessary if MOZILLA_INTERNAL_API is defined for these translation units. But that's not correct for code compiled into gtest-webrtc right?
Flags: needinfo?(dminor)
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8852647 [details]
Bug 1351700 - Fix linking error when building webrtc-gtest;
https://reviewboard.mozilla.org/r/124836/#review127420
Attachment #8852647 -
Flags: review?(rjesup) → review+
Comment 11•8 years ago
|
||
(That patch also fixes the problem for me, thanks!)
Flags: needinfo?(emilio+bugs)
Assignee | ||
Comment 12•8 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #9)
> dminor, this should only be necessary if MOZILLA_INTERNAL_API is defined for
> these translation units. But that's not correct for code compiled into
> gtest-webrtc right?
Benjamin,
Yes, you are right, I'm not sure where MOZILLA_INTERNAL_API is sneaking in here. It isn't defined when I attempt to build my stub function, which is why I have to #define MOZ_DUMP_ASSERTION_STACK before including <mozilla/Assertions.h>. I believe the only place we're pulling in <mozilla/Assertions.h> is in the memory allocator. It's also strange that this problem didn't show up in CI builds.
Flags: needinfo?(dminor)
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 15•8 years ago
|
||
Michael and Emilio, thanks for testing the patch. Sorry I broke you build! Strange that CI didn't catch it, as it doesn't seem like you're doing anything weird with your mozconfigs.
Status: NEW → ASSIGNED
Comment 16•8 years ago
|
||
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b8abce6659ab
Fix linking error when building webrtc-gtest; r=jesup
Comment 17•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•