Subject: Re: problem with libtool? multiple definitions in .libs/libextmod.so
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 08/02/2006 15:58:07
As a further test, I replaced the included ltmain.sh with 
/usr/pkg/share/libtool/ltmain.sh and ran configure and make. I didn't have 
the "multiple definitions" problem.

So the problem doesn't appear to be in the libtool itself, but maybe in 
the pkgsrc infrastructure.

I compared the build output from a successful with the bad. The good had:

 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include 
-I../include -I../include -I../include -I../include -I../include 
-I../hw/xfree86/dixmods/extmod -DHAVE_DIX_CONFIG_H 
-DDEFAULTPOLICYFILE=\"/usr/pkg/lib/xserver/SecurityPolicy\" -Wall 
-Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes 
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE 
-DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/pkg/include -I../include 
-I../include -I../Xext -I../composite -I../damageext -I../xfixes -I../Xi 
-I../mi -I../miext/shadow -I../miext/damage -I../render -I../randr -I../fb 
-g -O2 -MT shape.lo -MD -MP -MF .deps/shape.Tpo -c shape.c -fPIC -DPIC -o 
.libs/shape.o

ln .libs/shape.o .libs/libXext.lax/lt1-shape.o || cp .libs/shape.o 
.libs/libXext.lax/lt1-shape.o

ar cru .libs/libXext.a .libs/shape.o .libs/sleepuntil.o .libs/xtest.o 
.libs/shm.o .libs/panoramiX.o .libs/panoramiXprocs.o .libs/panoramiXSwap.o 
.libs/security.o .libs/xevie.o .libs/xprint.o .libs/appgroup.o 
.libs/xf86bigfont.o .libs/bigreq.o .libs/mitmisc.o 
.libs/libXext.lax/lt1-shape.o .libs/sync.o .libs/xcmisc.o .libs/xvmain.o 
.libs/xvdisp.o .libs/xvmc.o .libs/xres.o .libs/saver.o .libs/cup.o 
.libs/EVI.o .libs/sampleEVI.o .libs/dpms.o

ar cru .libs/libXextbuiltin.a .libs/shape.o .libs/sleepuntil.o 
.libs/xtest.o .libs/shm.o .libs/panoramiX.o .libs/panoramiXprocs.o 
.libs/panoramiXSwap.o .libs/security.o .libs/xevie.o .libs/xprint.o 
.libs/appgroup.o .libs/xf86bigfont.o

ar cru .libs/libXextmodule.a .libs/bigreq.o .libs/mitmisc.o .libs/shape.o 
.libs/sync.o .libs/xcmisc.o .libs/xvmain.o .libs/xvdisp.o .libs/xvmc.o 
.libs/xres.o .libs/saver.o .libs/cup.o .libs/EVI.o .libs/sampleEVI.o 
.libs/dpms.o

And with failing pkgsrc:

 cc -DHAVE_CONFIG_H -I. -I../include -I../hw/xfree86/dixmods/extmod 
-I/home/packages/tmp-pkgsrc/wip/xorg-server/work.glacier/.buildlink/include 
-I/home/packages/tmp-pkgsrc/wip/xorg-server/work.glacier/.buildlink/include/freetype2 
-DHAVE_DIX_CONFIG_H 
-DDEFAULTPOLICYFILE=\"/usr/pkg/lib/xserver/SecurityPolicy\" -Wall 
-Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes 
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE 
-DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I../Xext -I../composite -I../damageext 
-I../xfixes -I../Xi -I../mi -I../miext/shadow -I../miext/damage 
-I../render -I../randr -I../fb -O2 -MT shape.lo -MD -MP -MF 
.deps/shape.Tpo -c shape.c -fPIC -DPIC -o .libs/shape.o

 cc -DHAVE_CONFIG_H -I. -I../include -I../hw/xfree86/dixmods/extmod 
-I/home/packages/tmp-pkgsrc/wip/xorg-server/work.glacier/.buildlink/include 
-I/home/packages/tmp-pkgsrc/wip/xorg-server/work.glacier/.buildlink/include/freetype2 
-DHAVE_DIX_CONFIG_H 
-DDEFAULTPOLICYFILE=\"/usr/pkg/lib/xserver/SecurityPolicy\" -Wall 
-Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes 
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE 
-DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I../Xext -I../composite -I../damageext 
-I../xfixes -I../Xi -I../mi -I../miext/shadow -I../miext/damage 
-I../render -I../randr -I../fb -O2 -MT shape.lo -MD -MP -MF 
.deps/shape.Tpo -c shape.c -o shape.o >/dev/null 2>&1

ln .libs/shape.o .libs/libXext.lax/lt1-shape.o || cp .libs/shape.o 
.libs/libXext.lax/lt1-shape.o

ar cru .libs/libXext.a .libs/shape.o .libs/sleepuntil.o .libs/xtest.o 
.libs/shm.o .libs/panoramiX.o .libs/panoramiXprocs.o .libs/panoramiXSwap.o 
.libs/security.o .libs/xevie.o .libs/appgroup.o .libs/xf86bigfont.o 
.libs/bigreq.o .libs/mitmisc.o .libs/libXext.lax/lt1-shape.o .libs/sync.o 
.libs/xcmisc.o .libs/xvmain.o .libs/xvdisp.o .libs/xvmc.o .libs/xres.o 
.libs/saver.o .libs/cup.o .libs/EVI.o .libs/sampleEVI.o .libs/dpms.o

ln .libs/libXextbuiltin.lax/libXext.a/shape.o 
.libs/libXextbuiltin.lax/lt1-shape.o || cp 
.libs/libXextbuiltin.lax/libXext.a/shape.o 
.libs/libXextbuiltin.lax/lt1-shape.o

ln .libs/libXextbuiltin.lax/libXext.a/lt1-shape.o 
.libs/libXextbuiltin.lax/lt12-lt1-shape.o || cp 
.libs/libXextbuiltin.lax/libXext.a/lt1-shape.o 
.libs/libXextbuiltin.lax/lt12-lt1-shape.o

ar cru .libs/libXextbuiltin.a .libs/shape.o .libs/sleepuntil.o 
.libs/xtest.o .libs/shm.o .libs/panoramiX.o .libs/panoramiXprocs.o 
.libs/panoramiXSwap.o .libs/security.o .libs/xevie.o .libs/appgroup.o 
.libs/xf86bigfont.o .libs/libXextbuiltin.lax/lt1-shape.o 
.libs/libXextbuiltin.lax/lt2-sleepuntil.o 
.libs/libXextbuiltin.lax/lt3-xtest.o .libs/libXextbuiltin.lax/lt4-shm.o 
.libs/libXextbuiltin.lax/lt5-panoramiX.o 
.libs/libXextbuiltin.lax/lt6-panoramiXprocs.o 
.libs/libXextbuiltin.lax/lt7-panoramiXSwap.o 
.libs/libXextbuiltin.lax/lt8-security.o 
.libs/libXextbuiltin.lax/lt9-xevie.o 
.libs/libXextbuiltin.lax/lt10-appgroup.o 
.libs/libXextbuiltin.lax/lt11-xf86bigfont.o 
.libs/libXextbuiltin.lax/libXext.a/bigreq.o 
.libs/libXextbuiltin.lax/libXext.a/mitmisc.o 
.libs/libXextbuiltin.lax/lt12-lt1-shape.o 
.libs/libXextbuiltin.lax/libXext.a/sync.o 
.libs/libXextbuiltin.lax/libXext.a/xcmisc.o 
.libs/libXextbuiltin.lax/libXext.a/xvmain.o 
.libs/libXextbuiltin.lax/libXext.a/xvdisp.o 
.libs/libXextbuiltin.lax/libXext.a/xvmc.o 
.libs/libXextbuiltin.lax/libXext.a/xres.o 
.libs/libXextbuiltin.lax/libXext.a/saver.o 
.libs/libXextbuiltin.lax/libXext.a/cup.o 
.libs/libXextbuiltin.lax/libXext.a/EVI.o 
.libs/libXextbuiltin.lax/libXext.a/sampleEVI.o 
.libs/libXextbuiltin.lax/libXext.a/dpms.o

ln .libs/libXextmodule.lax/libXext.a/shape.o 
.libs/libXextmodule.lax/lt1-shape.o || cp 
.libs/libXextmodule.lax/libXext.a/shape.o 
.libs/libXextmodule.lax/lt1-shape.o

ln .libs/libXextmodule.lax/libXext.a/lt1-shape.o 
.libs/libXextmodule.lax/lt4-lt1-shape.o || cp 
.libs/libXextmodule.lax/libXext.a/lt1-shape.o 
.libs/libXextmodule.lax/lt4-lt1-shape.o

ar cru .libs/libXextmodule.a .libs/bigreq.o .libs/mitmisc.o .libs/shape.o 
.libs/sync.o .libs/xcmisc.o .libs/xvmain.o .libs/xvdisp.o .libs/xvmc.o 
.libs/xres.o .libs/saver.o .libs/cup.o .libs/EVI.o .libs/sampleEVI.o 
.libs/dpms.o .libs/libXextmodule.lax/lt1-shape.o 
.libs/libXextmodule.lax/libXext.a/sleepuntil.o 
.libs/libXextmodule.lax/libXext.a/xtest.o 
.libs/libXextmodule.lax/libXext.a/shm.o 
.libs/libXextmodule.lax/libXext.a/panoramiX.o 
.libs/libXextmodule.lax/libXext.a/panoramiXprocs.o 
.libs/libXextmodule.lax/libXext.a/panoramiXSwap.o 
.libs/libXextmodule.lax/libXext.a/security.o 
.libs/libXextmodule.lax/libXext.a/xevie.o 
.libs/libXextmodule.lax/libXext.a/appgroup.o 
.libs/libXextmodule.lax/libXext.a/xf86bigfont.o 
.libs/libXextmodule.lax/lt2-bigreq.o .libs/libXextmodule.lax/lt3-mitmisc.o 
.libs/libXextmodule.lax/lt4-lt1-shape.o .libs/libXextmodule.lax/lt5-sync.o 
.libs/libXextmodule.lax/lt6-xcmisc.o .libs/libXextmodule.lax/lt7-xvmain.o 
.libs/libXextmodule.lax/lt8-xvdisp.o .libs/libXextmodule.lax/lt9-xvmc.o 
.libs/libXextmodule.lax/lt10-xres.o .libs/libXextmodule.lax/lt11-saver.o 
.libs/libXextmodule.lax/lt12-cup.o .libs/libXextmodule.lax/lt13-EVI.o 
.libs/libXextmodule.lax/lt14-sampleEVI.o 
.libs/libXextmodule.lax/lt15-dpms.o


Any suggestions on to troubleshoot this?