The default bug view has changed. See this FAQ.

testing/gtest/gtest/src/gtest-death-test.cc:894: error: undefined reference to 'environ'

RESOLVED FIXED in mozilla22

Status

Testing
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: gps, Assigned: msreckovic)

Tracking

unspecified
mozilla22
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
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
(Reporter)

Updated

4 years ago
Depends on: 767231
Can you try doing the analogous change made in bug 758843?
(Reporter)

Updated

4 years ago
Flags: needinfo?(gps)
Created attachment 718506 [details] [diff] [review]
Be explicit about environ extern visibility

The equivalent of Bug 758843 fixed it for me.
Attachment #718506 - Flags: review?(bgirard)
Comment on attachment 718506 [details] [diff] [review]
Be explicit about environ extern visibility

Thanks!
Attachment #718506 - Flags: review?(bgirard) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/036f8a67636c
Flags: needinfo?(gps)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/036f8a67636c
Assignee: nobody → msreckovic
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.