Closed Bug 332075 Opened 19 years ago Closed 16 years ago

Properly support MOZ_FIX_LINK_PATHS on AIX

Categories

(Core :: XPCOM, defect)

Other
AIX
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 450909

People

(Reporter: Biesinger, Assigned: ul-mcamafia)

References

()

Details

Attachments

(1 file)

The AIX tinderbox is currently broken with this error: xlC_r -qmkshrobj=1 -o libxpcom.so nsXPComStub.o -lpthreads -bh:5 -Wl,-brtl -blibpath:/usr/lib:/lib -L../../dist/bin -L../../dist/lib -Wl,-rpath-link,../../dist/bin -lxpcom_core -L../../dist/lib -lplds4 -lplc4 -lnspr4 -lpthreads -ldl -lC_r -ldl -lm -lc_r ld: 0706-012 The -p flag is not recognized. ld: 0706-012 The -a flag is not recognized. ld: 0706-012 The -t flag is not recognized. ld: 0706-012 The -h flag is not recognized. ld: 0706-012 The -- flag is not recognized. ld: 0706-006 Cannot find or open library file: -l ink ld:open(): No such file or directory Sounds like AIX needs its own -rpath-link equivalent specified in configure.in, as MOZ_FIX_LINK_PATHS.
If I understand things correctly, there's no direct equivalent to -rpath-link. Apparently if a -L<path_to_libs> is specified and libraries in it are linked in, that path_to_libs is recorded in the final binary (applied to each -L...), with :/usr/lib:/lib always appended at the end. However, if -blibpath:<path1>:<path2>:... is specified, then that trumps the above and only the explicitly specified paths are recorded (:/usr/lib:/lib aren't appended, you need to specify them explicitly). And we're already using -blibpath, so all we need to do is figure out if /usr/lib:/lib is sufficient, or if we need to add to it. Oh, and override MOZ_FIX_LINK_PATHS to something without -Wl,-rpath-link,...
See also bug 332053 comment 7 and 8
The needed functionality of the flag is to specify a path to locate dependent libraries, so that you can link against the (frozen) libxpcom.so without specifying the (nonfrozen) libxpcom_core.so anywhere on the link line.
So, AIX is green again, but it's not the right fix. I just didn't want any other bustage to go in unnoticed. I'm morphing this bug into properly supporting MOZ_FIX_LINK_PATHS on AIX. At this point I'm taking suggestions as to how to do the following on AIX: Given X.so which depends on Y.so, and A which depends on X.so, link A against X.so without having A know about Y.so so that at some point in the future X.so could be changed to not link against Y.so (e.g. because Y.so is going away) and A wouldn't have to be updated (e.g. because A is a third party app built on top of whatever provides X.so). Yes, this is pretty much what bsmedberg said, but I didn't quite get that out of it until he explained things to me in a bit more detail, so I figure it's probably worth repeating here.
Summary: AIX tinderbox is red → Properly support MOZ_FIX_LINK_PATHS on AIX
using -blibpath:/usr/lib:/lib is sufficiant for my AIX 4.3.3 and AIX 5.1 builds as the libs installed by AIX toolbox under /opt/freeware/lib are symlinked into /usr/lib AIX evaluates the LIBPATH environment variable for finding shared objects in addition to linked into -blibpath. This may be useful if the libs are not installed at the target directory now. Did this by simple patch setting MOZ_FIX_LINK_PATHS to an empty string in configure before "gmake -f client.mk build"
Firefox's 3.0.1 "mozilla/configure" contains the fix, is it possible to push this fix also to the 1.8.1 branch? So this bug can be closed "fixed".
Have integrated jag's fix into my patch for MOZILLA_1_8_BRANCH in bug 450909 and requested review for later landing on branch.
Depends on: 450909
Assignee: nobody → ul.mcamafia
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: