autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automake problem with multiple "-rpath"


From: Thomas Jahns
Subject: Re: automake problem with multiple "-rpath"
Date: Mon, 10 May 2021 15:10:43 +0200

Hi,

you are confusing the -rpath /some/path option to libtool, which tells libtool 
where a library will be installed and the -Wl,-rpath,/some/other/path option to 
ld. If you replaced -rpath .../lib by -Wl,-rpath,.../lib everything should work 
as expected. Also relative rpath values will probably not work as expected 
unless the library and executabl in question are from one package. Also these 
are options to be used by whoever packages/installs the software and thus have 
no place in Makefile.am verbatim but rather should be added to LDFLAGS or 
similar during configure.

Regards, Thomas

> On May 10, 2021, at 10:29 , aotto <aotto1968@t-online.de> wrote:
> 
> Hi,
> 
> problem: I want to start a software WITHOUT the environment is set - this 
> include LD_LIBRARY_PATH
> (HELP: the '...' down in the text are from me to shorten the output)
> 
> > ./cct
> 
> couldn't load file ".../libtclreadline.so": libreadline.so.4.0: cannot open 
> shared object file: No such file or directory
> 
> analyze:
> 
> > ls -al .../libtclreadline.so
> lrwxrwxrwx 1 dev1usr users 23 10. Mai 09:39 .../libtclreadline.so -> 
> libtclreadline-3.0.0.so
> 
> The file is available BUT point with as SOFT-LINK to LOCAL file
> 
> -> seems that -rpath .  (local directory is NOT available)
> -> seems that WITHOUT local directory in LD_LIBRARY_PATH the softlink (from 
> automake) seems NOT to work
> 
> ---------------------------------
> solution #1, setup LD_LIBRARY_PATH after software cct has started
> 
> adding LD_LIBRARY_PATH after cct was started does NOT help because 'ld.so' 
> seems to use the LD_LIBRARY_PATH before
> cct was started.
> 
> -> HOW I tell 'ld.so' to accept a new LD_LIBRARY_PATH after start from cct ?
> 
> -----------------------------
> stepping deeper I start to analyze the build of libtclreadline, an automake 
> software
> 
> I install the "automake" software tclreadline with the following build-plan:
> 
> #1 tclreadline source build and install into staging-area
> #2 staging-area tested and verified, finally copied into destination-area
> 
> with: staging-area != destination-area
> 
> problem: The '-rpath' from the 'staging-area' does not fit into the 
> 'destination-area'
> 
> TRY for solution:
> 
> #1 add line 'libtclreadline_la_LDFLAGS = -release 
> $(MAJOR).$(MINOR).$(PATCHLEVEL) -rpath .../lib' to Makefile.am
> 
> # output
> 
> /bin/sh ./libtool  --tag=CC   --mode=link gcc -m32 -O2  -g -O2 -release 3.0.0 
> -rpath .../linuxi386/lib  -o libtclreadline.la -rpath 
> .../var/pkg/install/TclRl_3_0/lib tclreadline.lo  -lncurses  -L... -lreadline
> 
> libtool: warning: ignoring multiple '-rpath's for a libtool library
> 
> staging area : -rpath .../var/pkg/install/TclRl_3_0/lib
> destination-area : -rpath .../linuxi386/lib
> 
> #1 As you see NO multiple -rpath are NOT allowed
> #2 Same for '-rpath .' local directory is not allowed at all !!
> 
> conclusion:
> 
> #1 I can NOT set the LD_LIBRARY_PATH after start (preferred solution)
> #2 I can NOT set the right -rpath to the automake created library
> 
> question
> 
> #1 what to do?
> #1 tclreadline is just an example other automake software likely have the 
> same problem.
>    I prefer NO solution where I have to modify ALL Makefile.am files because 
> of the
>    -rpath problem.
> 
> 
> mfg
> 
> 
> 

-- 
Thomas Jahns
HPC-Group
DKRZ GmbH, Department: Application software

Deutsches Klimarechenzentrum
Bundesstra├če 45a
D-20146 Hamburg

Phone: +49-40-460094-151
Fax: +49-40-460094-270
Email: Thomas Jahns <jahns@dkrz.de>




Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]