dynamic library link problems

2002-05-12 Thread Robert Stone

Hi,
I recently implemented a plug-in architecture using autoconf,
automake and libtool.  Some parts of our codebase were no longer called in
the main program (now they are support functions for the plug-ins).  Because
we were using convenience libraries (.la files) it seems they are no longer
getting linked into the main program at build time and modules will not
load.  Is there anything I can do to get these parts of the code built into
the main program that doesn't involve listing symbols from every object that
should be in the main program but is not explicitly called?

Thanks,
Robert Stone

___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



Re: Does libtool support cross compile?

2002-05-12 Thread Grzegorz Jakacki


Libtool is a software developed by volunteers. Saying that libtool is
"brain dead" is extremely rude and shows little respect to the people who
contribute their time for the benefit of others. Do you believe, that they
will be willing to help you after they read the last sentence of your
e-mail?

Good luck
Grzegorz

On Fri, 10 May 2002, H . J . Lu wrote:

> Libtool has been driving me nuts. I tried to cross compile a package which
>  uses libtool. For some reason, libtool wanted libgdbm.so from /usr/lib:
>
> /bin/sh ../libtool --mode=link mipsel-linux-gcc  -Wall -W -O2 -mips2 -fPIC -o 
>libsasl.la -rpath /usr/lib -version-info 8:8:1 common.lo saslutil.lo server.lo
> client.lo md5.lo dlopen.lo checkpw.lo config.lo db_gdbm.lo -lgdbm -ldl -lcrypt -lpam
> rm -fr .libs/libsasl.la .libs/libsasl.* .libs/libsasl.*
> mipsel-linux-gcc -shared  common.lo saslutil.lo server.lo client.lo md5.lo dlopen.lo 
>checkpw.lo config.lo db_gdbm.lo  /usr/lib/libgdbm.so -ldl -lcrypt -lpam -Wl,-soname 
>-Wl,libsasl.so.7 -o .libs/libsasl.so.7.1.8
> /usr/lib/libgdbm.so: could not read symbols: Invalid operation
> collect2: ld returned 1 exit status
>
> Of course, it won't work. I found
>
> # Compile-time system search path for libraries
> sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
>
> in libtool. It is completely bogus for cross compile. My cross compiler knows
> where the libraries are. I guss I have to put in some kludges to fix the
> brain dead libtool.
>
>
> H.J.
>
> ___
> Libtool mailing list
> [EMAIL PROTECTED]
> http://mail.gnu.org/mailman/listinfo/libtool
>

###
# Grzegorz Jakacki China IC Design Center #
# Senior Engineer, CAD Dept.   1 Gaojiayuan, Chaoyang #
# tel. +86-10-64365577 x2009   Beijing 100015, China  #
# Copyright (C) 2002 Grzegorz Jakacki, CIDC. All Rights Reserved. #
###



___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



Re: Does libtool support cross compile?

2002-05-12 Thread H . J . Lu

On Mon, May 13, 2002 at 09:40:23AM +0800, Grzegorz Jakacki wrote:
> 
> Libtool is a software developed by volunteers. Saying that libtool is
> "brain dead" is extremely rude and shows little respect to the people who
> contribute their time for the benefit of others. Do you believe, that they
> will be willing to help you after they read the last sentence of your
> e-mail?

I never liked libtool. It has caused me so much trouble. In any case,
I fixed my problem on Linux. Here is a kludge I am using.


H.J.
---
--- libtool-1.4.2/acinclude.m4.search   Mon Sep 10 20:16:01 2001
+++ libtool-1.4.2/acinclude.m4  Fri May 10 17:38:00 2002
@@ -2150,6 +2150,9 @@ linux-gnu*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
+  if test "$GCC" = yes; then
+sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e 
+"s/^libraries:[ \t]*[=]*//" -e "s/:/ /g"`
+  fi
   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major 
$libname.so'
   soname_spec='${libname}${release}.so$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
--- libtool-1.4.2/aclocal.m4.search Fri May 10 17:35:36 2002
+++ libtool-1.4.2/aclocal.m4Fri May 10 17:38:12 2002
@@ -2102,6 +2102,9 @@ linux-gnu*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
+  if test "$GCC" = yes; then
+sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e 
+"s/^libraries:[ \t]*[=]*//" -e "s/:/ /g"`
+  fi
   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major 
$libname.so'
   soname_spec='${libname}${release}.so$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
--- libtool-1.4.2/libtool.m4.search Fri May 10 17:35:36 2002
+++ libtool-1.4.2/libtool.m4Fri May 10 17:38:19 2002
@@ -2150,6 +2150,9 @@ linux-gnu*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
+  if test "$GCC" = yes; then
+sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e 
+"s/^libraries:[ \t]*[=]*//" -e "s/:/ /g"`
+  fi
   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major 
$libname.so'
   soname_spec='${libname}${release}.so$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'

___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool