Closed Bug 673681 Opened 13 years ago Closed 13 years ago

libxul linking error with --enable-system-ffi and static js lib

Categories

(Firefox Build System :: General, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla8

People

(Reporter: ojab, Assigned: glandium)

References

Details

Attachments

(1 file, 3 obsolete files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0a1) Gecko/20110723 Firefox/8.0a1
Build ID: 20110723130330

Steps to reproduce:

After bug 551138 it's possible to build mozjs against system libffi, but -lffi isn't added on libxul linking stage.
Blocks: 551138
Shortened libxul linking output:

rm -f libxul.so
/usr/bin/python2.7 /sources/mozilla-central/config/pythonpath.py -I../../config … -lXt -lgthread-2.0 -lfreetype -lz -ldl  -lrt
../../dist/lib/libjs_static.a(CTypes.o): In function `Finalize':
/sources/mozilla-central/js/src/ctypes/CTypes.cpp:5314: undefined reference to `ffi_closure_free'
../../dist/lib/libjs_static.a(CTypes.o): In function `CreateInternal':
/sources/mozilla-central/js/src/ctypes/CTypes.cpp:3239: undefined reference to `ffi_type_pointer'
../../dist/lib/libjs_static.a(CTypes.o): In function `js::ctypes::InitTypeClasses(JSContext*, JSObject*)':
/sources/mozilla-central/js/src/ctypes/typedefs.h:104: undefined reference to `ffi_type_uint8'
/sources/mozilla-central/js/src/ctypes/typedefs.h:105: undefined reference to `ffi_type_sint8'
…
And it happens only with static js library.
Summary: libxul linking error with --enable-system-ffi → libxul linking error with --enable-system-ffi and static js lib
Add -lffi only in static js lib case.
Attachment #547913 - Attachment is obsolete: true
MOZ_STATIC_JS isn't defined, actually ._.
Use "ifndef JS_SHARED_LIBRARY" instead.
Attachment #547920 - Attachment is obsolete: true
Attachment #547923 - Flags: review?
I think this would be better this way
Attachment #548000 - Flags: review?(ted.mielczarek)
Attachment #547923 - Attachment is obsolete: true
Attachment #547923 - Flags: review?
Assignee: nobody → mh+mozilla
Comment on attachment 548000 [details] [diff] [review]
Properly support --enable-system-ffi with static js

Review of attachment 548000 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #548000 - Flags: review?(ted.mielczarek) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/767b0b274561
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/767b0b274561
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 8
Product: Firefox → Core
QA Contact: build.config → build-config
Target Milestone: Firefox 8 → mozilla8
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: