[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getdate.lo is linked twice to libgnu.la
From: |
Simon Josefsson |
Subject: |
getdate.lo is linked twice to libgnu.la |
Date: |
Wed, 13 Sep 2006 14:19:04 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
When building Shishi using latest gnulib, I got this:
../gl/.libs/libgnu.a(lt1-getdate.o): In function `yyparse':
/home/jas/src/shishi/gl/getdate.c:1398: multiple definition of `yyparse'
../gl/.libs/libgnu.a(getdate.o):/home/jas/src/shishi/gl/getdate.c:1398: first
defined here
../gl/.libs/libgnu.a(lt1-getdate.o): In function `get_date':
/home/jas/src/shishi/gl/getdate.y:1167: multiple definition of `get_date'
../gl/.libs/libgnu.a(getdate.o):/home/jas/src/shishi/gl/getdate.y:1167: first
defined here
collect2: ld returned 1 exit status
The cause appears to be that getdate.lo is added twice to the libtool
command:
address@hidden:~/src/shishi/gl$ rm getdate.lo
address@hidden:~/src/shishi/gl$ make
...
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -o libgnu.la
allocsa.lo base64.lo getdate.lo progname.lo strnlen1.lo xgetdomainname.lo
xgethostname.lo xstrndup.lo xvasprintf.lo xasprintf.lo mktime.lo crc.lo
gc-gnulib.lo arcfour.lo des.lo md5.lo hmac-md5.lo memxor.lo sha1.lo
hmac-sha1.lo md4.lo gc-pbkdf2-sha1.lo getdate.lo gettime.lo mbchar.lo
read-file.lo strcasecmp.lo timegm.lo vasnprintf.lo printf-args.lo
printf-parse.lo asnprintf.lo xmalloc.lo xreadlink.lo -lresolv
This can be reproduced without libtool using:
rm -rf /tmp/testdir;./gnulib-tool --create-testdir --dir=/tmp/testdir getdate
cd /tmp/testdir && autoreconf -fvi && ./configure && make
...
ar cru libgnu.a allocsa.o getdate.o xalloc-die.o mktime.o exitfail.o getdate.o
gettime.o xmalloc.o
The getdate Makefile.am snippet is:
libgnu_a_SOURCES += getdate.y
BUILT_SOURCES += getdate.c
MAINTAINERCLEANFILES += getdate.c
EXTRA_DIST += getdate.c getdate.h
The getdate.m4 contains:
AC_LIBOBJ([getdate])
I'm not exactly sure what happens, but it seems AC_LIBOBJ adds one
copy of getdate.lo, and automake adds another (due to BUILT_SOURCE?).
Any ideas on how to best solve this?
/Simon
- getdate.lo is linked twice to libgnu.la,
Simon Josefsson <=