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

RESOLVED FIXED in mozilla8

Status

()

Core
Build Config
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ojab, Assigned: glandium)

Tracking

Trunk
mozilla8
All
Other
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

6 years ago
Created attachment 547913 [details]
Add --enable-system-ffi switch for xulrunner/firefox

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.
(Reporter)

Updated

6 years ago
Blocks: 551138
(Reporter)

Comment 1

6 years ago
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'
…
(Reporter)

Comment 2

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

Comment 3

6 years ago
Created attachment 547920 [details] [diff] [review]
Add --enable-system-ffi switch for xulrunner/firefox

Add -lffi only in static js lib case.
Attachment #547913 - Attachment is obsolete: true
(Reporter)

Comment 4

6 years ago
Created attachment 547923 [details] [diff] [review]
Add --enable-system-ffi switch for xulrunner/firefox

MOZ_STATIC_JS isn't defined, actually ._.
Use "ifndef JS_SHARED_LIBRARY" instead.
Attachment #547920 - Attachment is obsolete: true
Attachment #547923 - Flags: review?
(Assignee)

Comment 5

6 years ago
Created attachment 548000 [details] [diff] [review]
Properly support --enable-system-ffi with static js

I think this would be better this way
Attachment #548000 - Flags: review?(ted.mielczarek)
(Assignee)

Updated

6 years ago
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+
(Assignee)

Comment 7

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 8

Updated

6 years ago
Component: Build Config → Build Config
Product: Firefox → Core
QA Contact: build.config → build-config
Target Milestone: Firefox 8 → mozilla8
You need to log in before you can comment on or make changes to this bug.