autoconf
[Top][All Lists]
Advanced

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

automake problem with multiple "-rpath"


From: aotto
Subject: automake problem with multiple "-rpath"
Date: Mon, 10 May 2021 10:29:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

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





reply via email to

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