libtool
[Top][All Lists]
Advanced

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

Re: undefined symbol woes


From: Gary V. Vaughan
Subject: Re: undefined symbol woes
Date: Thu, 27 Nov 2003 15:27:51 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 Thunderbird/0.3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Patrick Welche wrote:
| I am finding out the hard way about .la .lo etc files trying to compile
| cvs httpd, with static modules, but I still haven't found the small
| example to illustrate the problem. Essentially
| libtool --mode=link gcc -export-dynamic -o httpd  modules.lo
modules/aaa/mod_auth_basic.la
| translates as
| gcc -o .libs/httpd modules.o -Wl,--export-dynamic
modules/aaa/.libs/mod_auth_basic.a -Wl,--rpath -Wl,/usr/local/lib
| but
| modules.o(.data+0x9c): undefined reference to `auth_basic_module'
|
| Why would a .a file just contain the text !<arch> ?
| % more .libs/mod_auth_basic.a
| !<arch>
| % file .libs/mod_auth_basic.a
| mod_auth_basic.a: current ar archive
| % nm -g mod_auth_basic.o
| ...
| 00000000 D auth_basic_module
| ...
| Yet auth_basic_module ends up undefined..
|
| Any hints on how I can proceed?
|
| % /usr/src/local/httpd-2.0/srclib/apr/libtool --version
| ltmain.sh (GNU libtool) 1.5a (1.1342 2003/11/22 14:12:56)

mod_auth_basic.a doesn't contain mod_auth_basic.o.  Are you running with
- --disable-static?

~  $ ar cru mod_auth_basic.a
~  $ cat mod_auth_basic.a
~  !<arch>

Look through your log output for 'ar' calls.  I suspect you'll find 'ar cru
.libs/mod_auth_basic.a' and 'ranlib mod_auth_basic.a' but no 'ar cru
.libslmod_auth_basic.a .libs/mod_auth_basic.o'.

The difficult bit is figuring out why libtool didn't list the objects on the
ar call...

Cheers,
        Gary.
- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://www.oranda.demon.co.uk
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQE/xhf3FRMICSmD1gYRAqDXAJ9U4drv+sZdER8lO3zaLaGCAZ1wNwCdFk6n
F3hwwYwR61rszUXD3WvrU3A=
=Irvn
-----END PGP SIGNATURE-----





reply via email to

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