Closed
Bug 388942
Opened 17 years ago
Closed 9 years ago
Need -Wl,-executable_path when linking nss+sqlite on i386 mac
Categories
(Core :: Security: PSM, defect)
Core
Security: PSM
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: KaiE, Unassigned)
Details
Attachments
(1 file)
685 bytes,
patch
|
rrelyea
:
review+
|
Details | Diff | Splinter Review |
When Bob R tried to land the new NSS 3.12 yesterday, which requires libsqlite, the mac i386 tinderbox ran into the following errors:
usr/bin/ld: warning can't open dynamic library: @executable_path/libsqlite3.dylib referenced from: ../../../../dist/bin/libsoftokn3.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
/usr/bin/ld: Undefined symbols:
_sqlite3_bind_blob referenced from libsoftokn3 expected to be defined in @executable_path/libsqlite3.dylib
_sqlite3_bind_int referenced from libsoftokn3 expected to be defined in @executable_path/libsqlite3.dylib
_sqlite3_busy_timeout referenced from libsoftokn3 expected to be defined in @executable_path/libsqlite3.dylib
....
I tried on my Mac and was able to reproduce it.
I saw that David ran into that problem before:
http://groups.google.de/group/mozilla.dev.tech.xpcom/browse_thread/thread/bda73878039fc97e/ff85c0f2331719e5
And that he was able to fix it by using
-Wl,-executable_path -Wl,path-to-dist-bin
I was not able to find documentation about this linker option.
I do not understand what it does, nor why it is necessary.
If you understand what this does or why it might be required, I'd appreciate some words or a pointer!
But it helps.
The linker error goes away, so I'm proposing to add this patch.
Attachment #273105 -
Flags: review?(rrelyea)
Comment 1•17 years ago
|
||
This linker option is documented in "man ld". The reason it is needed is that someone is (correctly) linking against libsoftokn3 but not against libsqlite3. The mac linker tries to look for libsqlite3 in the "executable directory" but needs to know where that is.
Comment 2•17 years ago
|
||
Comment on attachment 273105 [details] [diff] [review]
Patch v1
The other way to fix this, I believe, is to add sqlite to the list NSS_LIBS in config
bob
Attachment #273105 -
Flags: review?(rrelyea) → review+
Comment 3•17 years ago
|
||
Yes, but I really don't want to do that, since people linking against NSS don't have a direct sqlite dependency and that limits your options for changing NSS in the future.
Reporter | ||
Comment 4•12 years ago
|
||
reassign bug owner.
mass-update-kaie-20120918
Assignee: kaie → nobody
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•