1.1.2: specifying installation directory (env R) causes install to fail
OS: CentOS 4 FR version: 1.1.2 I've tried to build the latest FR release and found the modules were being linked against the 1.1.0 version of libradius I had installed. After removing all 1.1.0 binaries and libraries, I tried compiling again and am receiving the following errors. I'm having some trouble determining where to fix this, so any patches/suggestions would be appreciated. I can provide more output (or the full output) if it helps with debugging. In the gcc line, if I add "-L/tmp/freeradius-buildroot/usr/local/lib" and run it by hand to build the module, everything works as expected. Probably just a missing $(R) somewhere, but it's been a while since I've had to heavily dive into autoconf/make files. Thanks, Kevin Bonner $ mkdir /tmp/freeradius-buildroot $ ./configure && make && make R=/tmp/freeradius-buildroot install ... gcc -shared rlm_checkval.lo -Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib -lradius -lnsl -lresolv -lpthread -Wl,-soname -Wl,rlm_checkval-1.1.2.so -o .libs/rlm_checkval-1.1.2.so /usr/bin/ld: cannot find -lradius collect2: ld returned 1 exit status libtool: install: error: relink `rlm_checkval.la' with the above command before installing it libtool: install: warning: remember to run `libtool --finish /usr/local/lib' ... $ cd /tmp/freeradius-buildroot/usr/local/lib/ $ ls -1 libradius* libradius-1.1.2.la libradius-1.1.2.so libradius.a libradius.la libradius.so
Kevin Bonner <keb@pa.net> wrote:
I've tried to build the latest FR release and found the modules were being linked against the 1.1.0 version of libradius I had installed.
That's not good.
In the gcc line, if I add "-L/tmp/freeradius-buildroot/usr/local/lib" and run it by hand to build the module, everything works as expected.
Do the installed modules have references to 'freeradius-buildroot' in them? Try doing "strings".
Probably just a missing $(R) somewhere, but it's been a while since I've had to heavily dive into autoconf/make files.
No, it's more libtool crap. When you tell libtool to build dynamic library, it doesn't. It builds shell scripts that determine how to link to the dynamic library from inside of the build tree. libtool creates the dynamic library when you *install* it, hence the "relink" complaint. And since the /tmp/freeradius-buildroot isn't in the ld search path, it can't find -lradius. As you noted, adding -L... helps. I'm not sure how to do this with libtool, because it's "install" stage doesn't accept linker options, even though it's actually doing linking. Did I mention I hated that PoS? Maybe setting LD_LIBRARY_PATH before running libtool --install will work? Alan DeKok.
On Thursday 01 June 2006 18:28, Alan DeKok wrote:
Kevin Bonner <keb@pa.net> wrote:
In the gcc line, if I add "-L/tmp/freeradius-buildroot/usr/local/lib" and run it by hand to build the module, everything works as expected.
Do the installed modules have references to 'freeradius-buildroot' in them? Try doing "strings".
"strings * | grep -i buildroot" returns nothing
No, it's more libtool crap.
When you tell libtool to build dynamic library, it doesn't. It builds shell scripts that determine how to link to the dynamic library from inside of the build tree. libtool creates the dynamic library when you *install* it, hence the "relink" complaint.
And since the /tmp/freeradius-buildroot isn't in the ld search path, it can't find -lradius.
As you noted, adding -L... helps. I'm not sure how to do this with libtool, because it's "install" stage doesn't accept linker options, even though it's actually doing linking.
Did I mention I hated that PoS?
I don't think you mentioned hating it this week. :)
Maybe setting LD_LIBRARY_PATH before running libtool --install will work?
Alan DeKok.
I did get it to install successfully into the staging area. Adding the configure flag to use the system libtool (--with-system-libtool) used my local version 1.5.6 and not the bundled version 1.4.2. Kevin Bonner
participants (2)
-
Alan DeKok -
Kevin Bonner