libgtk-x11-2.0.so: error: undefined reference to 'g_module_close'

RESOLVED DUPLICATE of bug 1040124

Status

()

Firefox
Build Config
RESOLVED DUPLICATE of bug 1040124
4 years ago
4 years ago

People

(Reporter: janx, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Just rebased to master, and can't build on Ubuntu anymore:

> 0:35.09 /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libgtk-x11-2.0.so: error: undefined reference to 'g_module_close'
> 0:35.09 /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libgtk-x11-2.0.so: error: undefined reference to 'g_module_build_path'
> 0:35.09 /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libgtk-x11-2.0.so: error: undefined reference to 'g_module_symbol'
> 0:35.09 /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libgtk-x11-2.0.so: error: undefined reference to 'g_module_supported'
> 0:35.09 /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libgtk-x11-2.0.so: error: undefined reference to 'g_module_open'
> 0:35.09 /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libgtk-x11-2.0.so: error: undefined reference to 'g_module_error'
> 0:35.09 collect2: ld returned 1 exit status
(Reporter)

Comment 1

4 years ago
On Ubuntu 12.04, even after a renewed `./mach bootstrap`.

Chromium solved this by "Explicitly includ[ing] gmodule-2.0 in the list for glib/gtk dependency." (http://crbug.com/115799 in "See also").
(Reporter)

Comment 2

4 years ago
Build works on > 12.04, looks like an Ubuntu Precise specific bug.
That error means the gtk library itself doesn't have a dependency on gmodule. Not a problem in the Firefox build system.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID
(Reporter)

Comment 4

4 years ago
This problem was introduced by bug 983504's build system change, making me unable to build firefox on Ubuntu Precise.

Chromium fixed their build system by adding the dependency, so that it works even on misconfigured systems:

http://src.chromium.org/viewvc/chrome/trunk/src/build/linux/system.gyp?r1=126148&r2=126147&pathrev=126148

Do we really want to consider a broken build on a LTS Ubuntu (supported until late 2017) invalid?
Flags: needinfo?(mh+mozilla)
Created attachment 8458070 [details] [diff] [review]
gtk+-x11-2.0.pc.diff

Even if this isn't a bug per se, it's still irritating having your build machine stop building suddenly. In any case, here's a fix, if you happen to run Ubuntu 12.04 (64 bits). Just copy the attached file to your machine somewhere and execute

sudo patch /usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-x11-2.0.pc thisfile.diff

If you prefer to do it manually, search for the gtk+-x11-2.0.pc file under /usr/lib and add -lgmodule-2.0 to the Libs: line
(Reporter)

Comment 6

4 years ago
Thanks for the fix Antonio!

On my side I've managed to fix the build by backing out offending patches from bug 983504:

> Bug 983504 - Buildsystem changes for screen sharing. r=ted
> Bug 983504 - Modify constraints for screen sharing. r=bholley,jib
> Bug 983504 - Enumeration & MediaEngine changes for screen sharing. r=jesup,mt
> Bug 983504 - ViECapturer changes for screen sharing. r=jesup
> Bug 983504 - ViEInputManager & config changes for screen sharing. r=gcp

"Enumeration & MediaEngine" has a minor conflict that is easy to fix, and after that firefox builds again.
Flags: needinfo?(mh+mozilla)
Resolution: INVALID → DUPLICATE
Duplicate of bug: 1040124
You need to log in before you can comment on or make changes to this bug.