Last Comment Bug 844630 - testing/gtest/gtest/src/gtest-death-test.cc:894: error: undefined reference to 'environ'
: testing/gtest/gtest/src/gtest-death-test.cc:894: error: undefined reference t...
Status: RESOLVED FIXED
:
Product: Testing
Classification: Components
Component: General (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla22
Assigned To: msreckovic
:
Mentors:
Depends on: gtest
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-24 10:14 PST by Gregory Szorc [:gps]
Modified: 2013-02-27 05:48 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Be explicit about environ extern visibility (1.33 KB, patch)
2013-02-26 10:22 PST, Milan Sreckovic [:milan]
bgirard: review+
Details | Diff | Splinter Review

Description Gregory Szorc [:gps] 2013-02-24 10:14:13 PST
Tried to perform a build with --enable-gtest on Ubuntu 12.10 and got the following when linking libxul:

11:18.93 /usr/bin/ld.gold.real: warning: hidden symbol 'pixman_add_triangles' in /home/gps/src/mozilla-central/obj-firefox/toolkit/library/../../gfx/cairo/libpixman/src/pixman-trap.o is referenced by DSO /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libcairo.so
11:18.93 /usr/bin/ld.gold.real: error: /home/gps/src/mozilla-central/obj-firefox/toolkit/library/../../testing/gtest/gtest-all.o: requires dynamic R_X86_64_PC32 reloc against 'environ' which may overflow at runtime; recompile with -fPIC
11:18.93 /home/gps/src/mozilla-central/testing/gtest/gtest/src/gtest-death-test.cc:894: error: undefined reference to 'environ'
11:18.93 clang: error: linker command failed with exit code 1 (use -v to see invocation)
11:18.93 make[5]: *** [libxul.so] Error 1
11:18.93 make[4]: *** [libs_tier_platform] Error 2
11:18.93 make[3]: *** [tier_platform] Error 2
11:18.94 make[2]: *** [default] Error 2
11:18.94 make[1]: *** [realbuild] Error 2
11:18.94 make: *** [build] Error 2
Comment 1 Benoit Girard (:BenWa) 2013-02-24 15:30:13 PST
Can you try doing the analogous change made in bug 758843?
Comment 2 Milan Sreckovic [:milan] 2013-02-26 10:22:50 PST
Created attachment 718506 [details] [diff] [review]
Be explicit about environ extern visibility

The equivalent of Bug 758843 fixed it for me.
Comment 3 Benoit Girard (:BenWa) 2013-02-26 10:29:41 PST
Comment on attachment 718506 [details] [diff] [review]
Be explicit about environ extern visibility

Thanks!
Comment 5 Ed Morley [:emorley] 2013-02-27 05:48:08 PST
https://hg.mozilla.org/mozilla-central/rev/036f8a67636c

Note You need to log in before you can comment on or make changes to this bug.