[PD-dev] [ pure-data-Patches-1378927 ] OSX/pd 0.39: fix for loading externals using static libs

SourceForge.net noreply at sourceforge.net
Thu Jan 5 13:09:05 CET 2006


Patches item #1378927, was opened at 2005-12-12 19:37
Message generated for change (Settings changed) made by zmoelnig
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1378927&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: bugfix
>Status: Closed
Resolution: None
Priority: 7
Submitted By: Thomas Grill (xovo)
Assigned to: Nobody/Anonymous (nobody)
Summary: OSX/pd 0.39: fix for loading externals using static libs

Initial Comment:
Hi all,
unlike with pd 0.38, externals that share equal symbol names (like 
when they have been compiled using the same static lib) won't get 
loaded, but rather bail out with a "linker error".
This can be easily fixed by including the 
NSLINKMODULE_OPTION_PRIVATE option in s_loader.c

        ret = NSLinkModule( image, filename, 
               NSLINKMODULE_OPTION_BINDNOW |
               NSLINKMODULE_OPTION_RETURN_ON_ERROR | 
               NSLINKMODULE_OPTION_PRIVATE);
               
Is there a reason this has been taken out in pd 0.39?

best greetings,
Thomas


----------------------------------------------------------------------

Comment By: Miller Puckette (millerpuckette)
Date: 2005-12-31 06:31

Message:
Logged In: YES 
user_id=313747

I ended up adding "DL_OPEN" to the configure.in special case
code for OSX.  As soon as I can get a correct configure
script (tried real hard already but can't get autoconf to
work as advertised yet) this can be automatic.


----------------------------------------------------------------------

Comment By: Thomas Grill (xovo)
Date: 2005-12-13 17:55

Message:
Logged In: YES 
user_id=350252

here's the patch

----------------------------------------------------------------------

Comment By: Jamie Tittle (tigital)
Date: 2005-12-12 20:40

Message:
Logged In: YES 
user_id=634044

...this was kinda covered in the bugtracker last year:
"[ 1082938 ] sys_load_lib() on OSX too limited?"
https://sourceforge.net/tracker/index.php?func=detail&aid=1082938&group_id=55736&atid=478070

...I'd like to suggest we ditch the NSLinkModule() stuff on
OSX, as it's been deprecated since 10.3.x:  the replacement
is (drumroll please), dlopen()!  As a matter of fact, hans
and I have been using a patch to do just this in the most
recent development releases:  it's currently available in
/packages/patches/darwin/darwin_dlopen.patch, which I would
attach, but it's not letting me atm...

...also, I strongly suggest that we make another change in
the building of externals, from bundles to dynamic libs:
-dynamiclib -mmacosx-version-min=10.3 -undefined
dynamic_lookup (or suppress)

...this works for everything I've tried, but admittedly I
haven't done it with all externals or flext...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1378927&group_id=55736




More information about the Pd-dev mailing list