From: Ryan S. <rya...@us...> - 2008-08-02 00:21:07
|
On Aug 1, 2008, at 15:07, Albert Graef wrote: > Ryan Schmidt wrote: > >>> Well, that probably means that you have to hardcode the install path >>> into the binaries, so maybe adding something like -install_name >>> /mp/lib/libpure-0.4.dylib to the link line for libpure-0.4.dylib >>> helps. >> >> That could help, but I'm not clear on what to add where to test this. > > I guess that for Pure 0.5 the following should do the trick: > > make shared="-dynamiclib -install_name $(prefix)/lib/ > libpure-0.5.dylib" > > Replace $(prefix) with your installation prefix, presumably /mp > from the > examples you've shown. (You can also edit the generated Makefile, of > course, the rule for building the runtime library starts out with > '$(libpure): $(OBJECT)' and is at line 131 in the Makefile.) Adding "-install_name $(prefix)/lib/libpure-0.5.dylib" to the line after that did the trick, thanks! http://trac.macports.org/changeset/38884 > Don't know if this works, I'm referring to information I found on the > Fink project pages > (http://www.finkproject.org/doc/porting/shared.php?phpLang=en). This > seems to indicate that linking against the shared lib thus created > will > hardcode the absolute path of the library (as given by -install_name) > into the executable. Note that this might well break 'make check' > if you > don't do a 'make install' beforehand. This does break make check, but we're used to working around that by setting DYLD_LIBRARY_PATH during the check so that's fine. > Please let me know whether this works, then I'll try to figure out > a way > to include the -install_name option in the configury so that it's > added > to the link line automatically. |