Bill Moseley <[EMAIL PROTECTED]> writes: >On Thu, Nov 18, 2004 at 03:15:35PM -0500, Michael G Schwern wrote: >> On Thu, Nov 18, 2004 at 10:00:59AM -0800, Bill Moseley wrote: >> > $VERSION = '6.17' >> > >> > When I build perl with "make perl" it seems that the library path is >> > not used in the binary. That is LD_RUN_PATH is set when building the >> > module, but not when running "make perl". >> >> Someone who understands static builds want to field this? > >I'd like that. Then I'd know if this is a bug or user error. ;) > >With static linking (make perl) perl is still linking dynamically with >an external library, though. So I'd think it would be useful to set >the RPATH in the perl binary just like when building the module (.so >file).
I see no reason not to set LD_RUN_PATH when building perl + staticExtensions But I can also see why it was missed out. The perl + extensions stuff was _originally_ for folk without dynamic loading, which would not of looked at LD_RUN_PATH anyway. > >This is used when running make perl: > > $ cat blib/arch/auto/SWISH/API/extralibs.all > -L/usr/local/lib -lswish-e -lz > >How is that path determined? I would expect with LIBS, but that would >also require a --rpath or LD_RUN_PATH at build. > >BTW -- is there target to build an all static binary with "make perl"? >That is, if I wanted libswish-e to be linked in statically? Some hack that passes 'static' flag to your linker would probably work. e.g. on Linux I can link to -lXm statically with this mess: LIBS => ['-L/usr/X11R6/lib -Wl,-Bstatic -lXm -Wl,-Bdynamic ...'], Note that truely static executables are near impossible on modern Solaris or linux.
