[Gdal-dev] status of ldshared build? (or, other options for OSX framework build)

William Kyngesburye woklist at kyngchaos.com
Fri Nov 2 19:44:29 EDT 2007


On Nov 2, 2007, at 6:17 PM, Christopher Barker wrote:

> Could you run re-name libgdal.1.dylib to GDAL after building, rather  
> on installation?
>
Hm, that's a good one.  I just have to make sure the GDAL makefiles  
know exactly where libtool puts its files.  I think something is known  
in there.  I think I'll look into this option.

>>> All OSX libraries embed the full path to theirselves.  The linker  
>>> then embeds that into other libraries that link to them.
>
> Wow! such dependence on paths not changing! Though I suppose that  
> solves the version issue -- you could have ten versions of a lib  
> installed in ten places!
>
> And it means you need to know at build time where you're going to  
> install something (or get these problems!) which makes me think --  
> is there a way to specify the install path when the lib is built?  
> rather than re-naming it later with install_name_tool?
>
This is the way OSX has always worked.  No need for grandma to muck  
around in the Terminal setting DYLD_LIBRARY_PATH.  Though it does lock  
libraries in a location, mostly.

And they are not only versioned by name, but with separate numbered  
versions - a current version, and a compatibility version, so the  
dynamic loader knows which versions are compatible with each other if  
an exact version match isn't available.

Libtool takes the configured path and does its magic depending on the  
platform to build the library.  In the OSX case, by adding - 
install_name to the linking.  But this is where libtool is limited -  
you give it the path and the *base* library name, say "gdal", and it  
adds the 'lib', .version and .dylib to it to use as the install_name.   
This is where libtool is inflexible on OSX.  It's possible to hack  
that in the libtool .m4 files and regenerate libtool, but it's not  
configurable, and it locks any OSX build into a framework name.

>

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an  
illusion caused by the passage of history."

- Hitchhiker's Guide to the Galaxy





More information about the gdal-dev mailing list