Re: Problem with '-L' switch.
Hello Ralf. Thanks for the advice with libtool.m4. I have done a hack to it, which I am attaching. It is probably inconsistent with the rest of the file, but for now it works. There are several more places with sys_lib_search_path_spec, I did not touch them. It strips the trailing slashes off the paths obtained from 'gcc -print-search-dirs' . Regards, V. --- /usr/share/aclocal/libtool.m4.orig 2006-08-21 14:03:53.0 +0200 +++ /usr/share/aclocal/libtool.m4 2006-08-21 14:05:36.0 +0200 @@ -1096,7 +1096,7 @@ dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g" -e "s,/:,:,g" -e "s,/$,,g" ` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Problem with '-L' switch.
Hello Ralf. I works! I mean 1. correcting '/usr/lib/' --> '/usr/lib' in sys_lib_search_path_spec and 2. the patch. (I copied it by hand, I probably made a mistake when trying to use patch utility). I made these corrections in the local 'libtool' script. So thank you very much. I just have another question, if I can. The local 'libtool' script is generated by 'configure' script via ltmain.sh, if I am right. I corrected all 'ltmain.sh' under /usr/share/libtool according to the patch (2.), but I still can't find where to correct (1.). I tried /usr/bin/libtool in case it was a skeleton, but it is not. Can you tell me? Or, is it complicated enough, so better just patch the local script? Thank you. V. ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Problem with '-L' switch.
Hello Ralf. I removed the trailing slashes from all occurences of sys_lib_search_path_spec, but it didn't help. Then I removed whole '/usr/lib' from all occurences of sys_lib_search_path_spec and it didn't help either. I have a vague idea that the problem might be that there is a variable containing many such paths with '/usr/lib' at the end and then, in a for cycle, this variable is reorganized into another variable leftside-right, so '/usr/lib' comes to the beginning of the list. I can't find the place as the libtool script is complicated. And, as I said, it seems that there may be dependency on whether ELF has RPATH or not. Because, my problem is, that '-L/usr/lib' comes before my paths and system libs are used instead of my libs. Thanks. V. ___ http://lists.gnu.org/mailman/listinfo/libtool
Problem with '-L' switch.
Hello. Can you advise me on this, please? I build a library with libtool, say libbig.la, from C++ sources, on IA32. This libbig.la wants to link to libsmall.la as '-lsmall' . But, during creating libbig.la, g++ has '-L/usr/lib' before my (user's) paths, which is undesitable in my situation. This '-L/usr/lib' is there only in the case, when libsmall.la has non-empty 'Library Rpath' section in ELF (you find this with 'readelf --dynamic libsmall.so'). When I arrange for libsmall to have this 'Library Rpath' section empty, then '-L/usr/lib' goes away. As it seems. And this problem seems to depend on some other configuration of Linux system. On AMD64 it does not occur, although the versions of libtool are the same. Thank you. V. ___ http://lists.gnu.org/mailman/listinfo/libtool