[PD-dev] [ pure-data-Patches-1083495 ] s_loader.c: osx external loading

SourceForge.net noreply at sourceforge.net
Wed Apr 13 06:03:22 CEST 2005

Patches item #1083495, was opened at 2004-12-11 11:25
Message generated for change (Comment added) made by eighthave
You can respond by visiting: 

Category: puredata
Group: bugfix
Status: Open
Resolution: None
Priority: 5
Submitted By: Jamie Tittle (tigital)
Assigned to: Nobody/Anonymous (nobody)
Summary: s_loader.c:  osx external loading

Initial Comment:
...years ago, the NSLINKMODULE_OPTION_PRIVATE flag was
introduced to NSLinkModule() in an effort to prevent pd
from crashing when a library is loaded that has
duplicate symbols to an already loaded library...sure,
it's desirable to not crash, but this flag has the side
effect of artificially partitioning the loaded symbols
such that we can't access one library easily from

...so, this patch removes the PRIVATE flag and adds
another RETURN_ON_ERROR flag, which works as
advertised...I've also added a small bit of code to
spit out some info about what the error was, and in
which file...

...another point to consider is the linker flag
-flat_namespace, and whether it is needed at all
anymore (the default would be -twolevel_namespace)...


>Comment By: Hans-Christoph Steiner (eighthave)
Date: 2005-04-13 00:03

Logged In: YES 

Check out externals/build/darwin/makefile.  Its been using
-bundle -bundle_loader ../path/to/pd successfully for a
while now.  

externals/OSCx is using -bundle_loader.. but has
-flat_namespace, so maybe that should be changed as well. 


Comment By: Jamie Tittle (tigital)
Date: 2005-04-12 13:56

Logged In: YES 

...after further exploration with linking and loading other
externals, I think we can leave -flat_namespace behind and
just use something like the following:

PREFIX = $(HOME)/pd-0.38-4/
LFLAGS = -bundle -bundle_loader $(PREFIX)/bin/pd

...notice that we don't need to say "-two_level_namespace",
because it is default...without the -bundle_loader bit, you
get all kinds of problems with undefined symbols...


You can respond by visiting: 

More information about the Pd-dev mailing list