Building DBD::Sybase, I want to add /usr/local/dept/lib to the RPATH in the .so. Defining CCFLAGS or LDDLFLAGS on the Makefile.PL command line doesn't work. Mr. Peppler suggested I try here. I will forward any fix to him for future versions.
I can add the RPATH manually by relinking thus:gcc -L/usr/local/dept/lib \ -shared \ -O2 \ -g \ -pipe \ -Wall \ -Wp,-D_FORTIFY_SOURCE=2 \ -fexceptions \ -fstack-protector \ --param=ssp-buffer-size=4 \ -m64 \ -mtune=generic Sybase.o dbdimp.o \ -o blib/arch/auto/DBD/Sybase/Sybase.so
but using LDDLFLAGS damages the command line:$ sh -x relink && readelf -d blib/arch/auto/DBD/Sybase/Sybase.so | gre +p -i rpath + gcc -L/usr/local/dept/lib -Wl,-R/usr/local/dept/lib -shared -O2 -g - +pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --p +aram=ssp-buffer-size=4 -m64 -mtune=generic Sybase.o dbdimp.o -o blib/ +arch/auto/DBD/Sybase/Sybase.so 0x000000000000000f (RPATH) Library rpath: [/usr/local/de +pt/lib]
Many thanks. --jkl$ perl Makefile.PL PREFIX=$DEPT/perl LDDLFLAGS=-Wl,-R$DEPT/lib < answe +rs && rm -f nohup.out && nohup make || grep ^gcc nohup.out | tail -1 Unknown Client Library version - assuming FreeTDS. ... Writing Makefile for DBD::Sybase nohup: appending output to `nohup.out' gcc -Wl,-R/usr/local/dept/lib Sybase.o dbdimp.o -o blib/arch/auto/DB +D/Sybase/Sybase.so
In reply to adding RPATH to Sybase.so by jklowden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |