libtool
[Top][All Lists]
Advanced

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

Libtool woes


From: Jason Curl
Subject: Libtool woes
Date: Fri, 17 Aug 2007 21:19:13 +0200
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)

Hello,

I'm having some real problems with libtool getting it to link shared
libraries. I've created a very basic system that exhibits the same
problems I'm seeing. At the end is a brief overview of the configure.ac and the Makefile.am's.

*** Cygwin: Detects shared/static but won't build.
$ ./configure
checking whether the gcc linker (ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
...
$ make
Making all in libtp
make[1]: Entering directory `/cygdrive/y/tmp/libtp'
make  all-am
make[2]: Entering directory `/cygdrive/y/tmp/libtp'
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-g -O2 -MT version.lo -MD -MP -MF .deps/version.Tpo -c -o version.lo
version.c
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -g -O2 -MT version.lo -MD -MP -MF
.deps/version.Tpo -c version.c  -DDLL_EXPORT -DPIC -o .libs/version.o
 gcc -DHAVE_CONFIG_H -I. -g -O2 -MT version.lo -MD -MP -MF
.deps/version.Tpo -c version.c -o version.o >/dev/null 2>&1
mv -f .deps/version.Tpo .deps/version.Plo
/bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2 -version-info
0:0:0  -o libtp.la -rpath /usr/local/lib version.lo
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin
shared libraries
lib -OUT:.libs/libtp.lib  version.o
../libtool: line 5973: lib: command not found
make[2]: *** [libtp.la] Error 127
make[2]: Leaving directory `/cygdrive/y/tmp/libtp'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/cygdrive/y/tmp/libtp'
make: *** [all-recursive] Error 1

*** Linux: Won't build shared libraries (it should be able to)
$ ./configure
checking whether the gcc linker (ld) supports shared libraries... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... unsupported
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes

*** FreeBSD 6.1: (works with shared/static)

*** Solaris 10 w/ GCC (works with shared/static)
$ AR="gar" LD="gld" RANLIB="granlib" STRIP="gstrip" MAKE="gmake" ./configure

*** Solaris 10 w/ SunStudio CC (works with shared/static)

Tools being used:
- automake-1.10
- autoconf-2.61
- libtool-1.5.24



configure.ac
============
AC_PREREQ(2.61)
AC_INIT([TestProg], [1.0.0.cvs], address@hidden, [tp])
AC_CONFIG_AUX_DIR(config)
AC_COPYRIGHT([GPL])
AC_REVISION([$Revision: $])
AC_CONFIG_SRCDIR(tp/main.c)
AM_CONFIG_HEADER(libtp/config.h)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AC_GNU_SOURCE
AC_PROG_CC
AC_HEADER_STDC
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_CONFIG_FILES([Makefile
                 libtp/Makefile
                 tp/Makefile])
AC_OUTPUT

tp/Makefile.am
==============
bin_PROGRAMS=tp
tp_SOURCES=main.c
address@hidden@/libtp
tp_LDADD=../libtp/libtp.la

libtp/Makefile.am
=================
lib_LTLIBRARIES=libtp.la
libtp_la_SOURCES=version.c version.h
address@hidden@
libtp_la_LDFLAGS=-version-info 0:0:0

Makefile.am
===========
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = libtp tp




reply via email to

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