Kai-Uwe Behrmann wrote:
> Am 30.10.07, 07:44 -0700 schrieb Michael Sweet:
>
>> Kai-Uwe Behrmann wrote:
>>> Is there a special reason to build FLTK with rpath. I saw it in the
>>> configure.in script.
>> Yes, otherwise shared library builds won't work when installed in
>> another location. In particular, since we pull the shared libfltk
>> >from ../src when we make the programs, if there is a
>> ../src/libfltk.so.2 library relative to the current directory when
>> you run the app, libdl.so may will the wrong libfltk.so.2 without
>> -rpath. On other OS's, their run-time linkers will not even try
>> using ${libdir}/libfltk.so.2 without -rpath.
>
> Hmm, alternatively the libtool stuff would be needed with the
> LD_LIBRARY_PATH=../src:xxx style shell scripts?
Right, but libtool is broken on many platforms and you often need
different versions just to get things working on different platforms,
so we don't support libtool in the FLTK build chain.
I'm personally not a fan of libtool or automake, both of which have
IMHO done more harm than good. Developers should have to understand
the underlying tools they are using - not doing so leads to serious
mistakes.
> Is it save to assume that a relinking at installation time would make the
> -rpath obsolete?
No, because all of the current Linux packaging solutions install to
a build root directory first, package that build root, and then
reinstall to /, relinking will only point programs to the build
root for their libraries.
> Thus local versions stay functional, and installed
> versions dont need -rpath being specified. Of course, the libs must be
> installed in a ld visible place - i.e. LD_LIBRARY_PATH or /usr/lib ...
-rpath is only used when linking the installed programs (fluid plus
the games). Users of fltk-config should not see -rpath for their
linker options (or at least that is the intent) unless FLTK is
installed in another directory besides /usr.
--
______________________________________________________________________
Michael Sweet, Easy Software Products mike at easysw dot com
Internet Printing and Publishing Software http://www.easysw.com
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk