libtool
[Top][All Lists]
Advanced

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

Libtool doesn't use dependency_libs in a .la file while linking


From: Roger Leigh
Subject: Libtool doesn't use dependency_libs in a .la file while linking
Date: Fri, 09 Apr 2004 21:31:37 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

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

Hello,

While fixing the build of Glib and Pango on the MS Windows/Cygwin
platform (i686-pc-cygwin), I've come across what may be a libtool bug:

/bin/bash ../libtool --mode=link gcc -g -O2 -Wall -o libpangox-1.0.la
- -rpath /usr/lib -version-info 399:1:399 -no-undefined module-defs-x.lo
pangox.lo pangox-fontcache.lo pangox-fontmap.lo libpango-1.0.la
- -L/usr/X11R6/lib -lX11

===> runs
gcc -shared .libs/module-defs-x.o .libs/pangox.o
.libs/pangox-fontcache.o .libs/pangox-fontmap.o -L/usr/lib
./.libs/libpango-1.0.dll.a -L/usr/X11R6/lib -lX11 -o
.libs/cygpangox-1.0-0.dll -Wl,--image-base=0x10000000
- -Wl,--out-implib,.libs/libpangox-1.0.dll.a

===>output
Creating library file: .libs/libpangox-1.0.dll.a
.libs/pangox.o(.text+0xc0): In function `pango_x_make_font_struct':
/home/Administrator/pango/pango/pangox.c:141: undefined reference to `_g_log'
.libs/pangox.o(.text+0x1bf): In function `pango_x_get_context':
/home/Administrator/pango/pango/pangox.c:190: undefined reference to `_g_malloc'
.libs/pangox.o(.text+0x1da):/home/Administrator/pango/pango/pangox.c:193: 
undefined reference to `_g_quark_from_static_string'
.libs/pangox.o(.text+0x1e6):/home/Administrator/pango/pango/pangox.c:193: 
undefined reference to `_g_free'
.libs/pangox.o(.text+0x1f2):/home/Administrator/pango/pango/pangox.c:193: 
undefined reference to `_g_object_set_qdata_full'
.libs/pangox.o(.text+0x24c):/home/Administrator/pango/pango/pangox.c:200: 
undefined reference to `_g_log'
[snip]

In the first line, we are linking against libpango-1.0.la.  This is a
DLL, cygpango-1.0.dll, and the .la contains a dependency_libs line
(shown below).  As can be seen, while it links with the
libpango-1.0.dll.a import library, none of the dependent libraries are
linked in.

I've tried with libtool 1.5 (Cygwin default) and retooled with 1.5.2
(current Debian unstable), but both do the same thing.

This is probably a Cygwin/Windows-specific bug, since I have no
problem with Debian GNU/Linux.


Has anyone any thoughts on what this might be?


Thanks,
Roger


- ----libpango-1.0.la----
# libpango-1.0.la - a libtool library file
# Generated by ltmain.sh - GNU libtool 1.5.2 (1.1220.2.60 2004/01/25 12:25:08) 
Debian: 192 $
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='cygpango-1.0-0.dll'

# Names of this library.
library_names='libpango-1.0.dll.a'

# The name of the static archive.
old_library=''

# Libraries that this one depends upon.
dependency_libs=' /usr/lib/libgobject-2.0.la -L/usr/lib 
/usr/lib/libgmodule-2.0.la /usr/lib/libglib-2.0.la -luser32 -lkernel32 
/usr/lib/libintl.la /usr/lib/libiconv.la '

# Version information for libpango-1.0.
current=399
age=399
revision=1

# Is this an already installed library?
installed=no

# Should we warn about portability when linking against -modules?
shouldnotlink=no

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/usr/lib'
- ----end of libpango-1.0.la----


The part of the Makefile.am in question.  I'm aware this is not very
useful taken out of context; I can provide the whole file if needed.
However, the command-line looks correct, and fails when I run libtool
manually rather than from make.

# ------------------- libpangox -------------------

if HAVE_X
pangoinclude_HEADERS += pangox.h
lib_LTLIBRARIES += libpangox-1.0.la
endif

libpangox_1_0_la_LDFLAGS = -version-info $(LT_VERSION_INFO) $(no_undefined)
libpangox_1_0_la_LIBADD = libpango-$(PANGO_API_VERSION).la 
$(INCLUDED_X_MODULES) $(X_LIBS) $(X_EXTRA_LIBS)
libpangox_1_0_la_DEPENDENCIES = libpango-$(PANGO_API_VERSION).la 
$(INCLUDED_X_MODULES)

libpangox_1_0_la_SOURCES = \
        modules.h          \
        module-defs-x.c    \
        pangox.c           \
        pangox-private.h   \
        pangox-fontcache.c \
        pangox-fontmap.c


- -- 
Roger Leigh

                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFAdwdiVcFcaSW/uEgRAsZoAKCQkWsSzFlqP6qpTKCQOcth4cWzawCeI4u2
xm3TWC93WjiMd+wVkljz7qQ=
=8loQ
-----END PGP SIGNATURE-----




reply via email to

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