Ralf Wildenhues wrote:

AFAIK it's not the same issue.  From a glance, it's also distinct from
<http://lists.gnu.org/archive/html/libtool/2005-08/msg00041.html> which
you pointed to in your other mail.

How do I go about linking with the custom built GCC libstdc++ on the system which has a default GCC installed in /usr/lib?

Thanks for all the info you provided.  Please also post output of
  ./libtool --tag=CXX --config

I have attached it as a gzipped archive.


(Unfinished thoughts follow.)

It looks to me we're treating $postdeps in the wrong pass (in the wrong
order).  I'm wondering whether treating GCC libs specially is the least
intrusive fix.  Also, I'm wondering whether we just compute
$compiler_lib_search_path_dir wrongly.

From looking in the output of libtool linking with --debug I saw that the libstdc++ library is picked because the only two places where that code is looking for it are: /opt/compilers/intel-9.1.042/lib and /usr/lib:

sys_lib_search_path_spec=" /opt/compilers/intel-9.1.042/lib /usr/lib"

IOW, it misses the custom-built gcc 4.1.2 in the path:

$ env | grep -w PATH
PATH=/opt/compilers/intel-9.1.042/bin:/opt/compilers/gcc-4.1.2/bin:/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/sbin:/usr/sbin:/usr/lib/jre1.5.0_04/bin

$ env | grep LD_LIB
LD_LIBRARY_PATH=/opt/compilers/intel-9.1.042/lib:/opt/compilers/gcc-4.1.2/lib:/lib:/usr/local/lib:/usr/lib:/usr/X11R6/lib

I would expect the search variable sys_lib_search_path_spec to contain all paths explicitly specified in LD_LIBRARY_PATH. If this is not the case there are probably reasons which I do not see right now.

Thanks,
Liviu

Attachment: libtool.config.gz
Description: application/gzip

_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to