Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with libltdl



Thank you very much. Your email helps me to see the problem. By default, when opening a library, libltdl uses dlopen instead of NSLinkModule. For some reasons, dyld (a module loader using NSLinkModule) seems to be disabled at compilation time. I guess some tests failed during configure. At the moment, I am trying to enable dyld but I can't figure out what options to pass to configure to enable it (and there is nothing about that in config.log). Maybe I should contact the libtool people.

Thank you very much for helping me,

Thomas

james tittle wrote:

On Dec 14, 2004, at 12:19 PM, Thomas DEGRIS wrote:

For a more general point of view, is MacOSX able to load multiple libraries defining the same symbol ? If yes, do you know projects (using libtools and automake) that use this method ?


...I'm having some problems with this, too: we use NSLinkModule() for our bundle loading...when you use NSLINKMODULE_OPTION_PRIVATE, multiple libraries defining the same (global) symbol can be loaded because each module has it's own "namespace"...unfortunately, this made it impossible (or rather, I haven't found a way yet) to call functions from other loaded modules...

...when you don't use the OPTION_PRIVATE, the app will crash when a module containing a duplicate symbol is loaded...this crash can be avoided by using another flag, NSLINKMODULE_OPTION_RETURN_ON_ERROR...but the module still doesn't load...

...if it helps, this is what I'm using now:

        ret = NSLinkModule( image, filename,
               NSLINKMODULE_OPTION_BINDNOW |
               NSLINKMODULE_OPTION_RETURN_ON_ERROR);

        if (ret == NULL) {
            int err;
            const char *fname, *errt;
            NSLinkEditErrors c;
            NSLinkEditError(&c, &err, &fname, &errt);
            post("link error %d %s %s", err, fname, errt);
            return 0;
        }

hth,
jamie

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden

This email sent to email@hidden
References: 
 >Problem with libltdl (From: Thomas Degris <email@hidden>)
 >Re: Problem with libltdl (From: "Peter O'Gorman" <email@hidden>)
 >Re: Problem with libltdl (From: Thomas Degris <email@hidden>)
 >Re: Problem with libltdl (From: Thomas DEGRIS <email@hidden>)
 >Re: Problem with libltdl (From: james tittle <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.