Closed Bug 367208 Opened 18 years ago Closed 11 years ago

Linking libxul with svg and canvas causes link error on gcc 4.1.1-1 FC5 64bit

Categories

(Toolkit Graveyard :: XULRunner, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME
mozilla1.9alpha1

People

(Reporter: mozilla, Unassigned)

Details

Attachments

(2 files)

Attached file Final link line
Similar error as reported https://bugzilla.mozilla.org/show_bug.cgi?id=334866#c11

Filing new bug as requested by bsmedberg in the final comment in that bug.

I'm building XULRunner on 64Bit FC5 with gcc 4.1.1-1 with the following mozconfig options:

ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --disable-javaxpcom
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_cv_visibility_pragma=no

Everything is great until linking libxul:

/usr/bin/ld: ../../dist/lib/components/libgklayout.a(nsCanvasRenderingContext2D.o): relocation R_X86_64_PC32 against `_moz_cairo_new_path' can not be used when making a shared object; recompile with -fPIC
Attached file Diagnosis log
bsmdeberg and I went over this today and concluded that this was probably a gcc bug. Attached is our conversation.
Summary: Linking libxul with svn and canvas causes link error on gcc 4.1.1-1 FC5 64bit → Linking libxul with svg and canvas causes link error on gcc 4.1.1-1 FC5 64bit
FYI: This also applies to FC6 (x86_64) with gcc 4.1.1-51
I have got exactly the same error on Kubuntu 6.10 (64 bits version) with gcc-4.1.1-13 when I try to compile xulrunner (CVS tag : MOZILLA_1_8_BRANCH) . But I have got a little different message when I try to compile it with gcc-3.4.6-3 : 

/usr/bin/ld:
../../staticlib/components/libgklayout.a(nsCanvasRenderingContext2D.o):
relocation R_X86_64_PC32 against `_moz_cairo_pattern_destroy' can not be used when making a shared object; recompile with -fPIC
Dupe of bug 378303 ?
(In reply to comment #4)
> Dupe of bug 378303 ?

We saw this long before the dbus stuff landed, so I doubt it. We'll try again sometime soon.
I've tried compiling against the latest version from the trunk, containing the path from bug 378303, with the same result as before.
We just tried a build and this problem has gone away for us.

I built on FC5 64bit with the following flags, note we are no longer using the visiblity pragma=no option. I forget what changed to cause us to no longer need that but we've had it commented out for some time.

mk_add_options MOZ_CO_PROJECT=xulrunner
mk_add_options MOZ_CO_MODULE=mozilla/other-licenses/bsdiff,mozilla/tools/update-packaging
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/compiled/xulrunner-debug
export MOZ_DEBUG_SYMBOLS=1
export MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
ac_add_options --enable-application=xulrunner
ac_add_options --disable-optimize --enable-debug
ac_add_options --disable-tests
ac_add_options --disable-javaxpcom
ac_add_options --enable-svg
ac_add_options --disable-canvas
ac_add_options --enable-update-packaging
ac_add_options --disable-installer
ac_add_options --enable-extensions=default,inspector,venkman

# For GCC bug with visibility pragmas that causes SELinux to stop us with
# a text relocation violation.
#ac_cv_visibility_pragma=no
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: