Subject: Multiply-defined symbols in devel/gtexinfo
To: None <tech-pkg@netbsd.org>
From: Idar Tollefsen <idart@performancedesign.no>
List: tech-pkg
Date: 07/26/2005 15:50:05
This is a multi-part message in MIME format.
--------------050609040104010007000306
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
When trying to build devel/gtexinfo on Solaris 10 with the SunPro compiler, it
bombs out as follows:
source='doc.c' object='doc.o' libtool=no DEPDIR=.deps depmode=none /bin/ksh
../depcomp cc -DHAVE_CONFIG_H -DLOCALEDIR=\"/usr/local/lib/locale\"
-DINFODIR=\"/usr/local/info\" -DINFODIR2=\"/usr/local/share/info\"
-DPKGSRC_INFOPATH=\"/usr/local/info:/usr/openwin/info:/usr/local/info\" -I. -I.
-I.. -I. -I../lib -I../intl -I.. -I. -fast -xchip=ultra2
-xcache=16/32/1:2048/64/1 -xarch=v9a -xvis -xmemalign=8i -mr -fround=nearest
-xdepend -xlinkopt=2 -xprefetch_level=3 -xldscope=symbolic -xlic_lib=sunperf
-xlibmil -xlibmopt -I/usr/local/include -I/usr/local/include -fast
-xchip=ultra2 -xcache=16/32/1:2048/64/1 -xarch=v9a -xvis -xmemalign=8i -mr
-fround=nearest -xdepend -xlinkopt=2 -xprefetch_level=3 -xldscope=symbolic
-xlic_lib=sunperf -xlibmil -xlibmopt -I/usr/local/include -c doc.c
cc -fast -xchip=ultra2 -xcache=16/32/1:2048/64/1 -xarch=v9a -xvis -xmemalign=8i
-mr -fround=nearest -xdepend -xlinkopt=2 -xprefetch_level=3 -xldscope=symbolic
-xlic_lib=sunperf -xlibmil -xlibmopt -I/usr/local/include -fast -xchip=ultra2
-xcache=16/32/1:2048/64/1 -xarch=v9a -xvis -xmemalign=8i -mr -fround=nearest
-xdepend -xlinkopt=2 -xprefetch_level=3 -xldscope=symbolic -xlic_lib=sunperf
-xlibmil -xlibmopt -I/usr/local/include -Wl,-64 -Wl,-s -z redlocsym -z ignore -z
lazyload -z text -L/usr/local/lib -Wl,-R/usr/local/lib -o ginfo dir.o display.o
dribble.o echo-area.o filesys.o footnotes.o gc.o indices.o info-utils.o
info.o infodoc.o infomap.o m-x.o man.o nodemenu.o nodes.o search.o session.o
signals.o terminal.o tilde.o variables.o window.o doc.o ../lib/libtxi.a
-lcurses /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -lc
-R/usr/local/lib -lintl -liconv
ld: fatal: symbol `_getopt_internal_r' is multiply-defined:
(file /tmp/ld_rAAAeHaikh type=FUNC; file ../lib/libtxi.a(getopt.o)
type=FUNC);
ld: fatal: symbol `_getopt_internal' is multiply-defined:
(file /tmp/ld_rAAAeHaikh type=FUNC; file ../lib/libtxi.a(getopt.o)
type=FUNC);
ld: fatal: symbol `getopt' is multiply-defined:
(file /tmp/ld_rAAAeHaikh type=FUNC; file ../lib/libtxi.a(getopt.o)
type=FUNC);
ld: fatal: symbol `optind' is multiply-defined:
(file /tmp/ld_rAAAeHaikh type=OBJT; file ../lib/libtxi.a(getopt.o)
type=OBJT);
ld: fatal: symbol `opterr' is multiply-defined:
(file /tmp/ld_rAAAeHaikh type=OBJT; file ../lib/libtxi.a(getopt.o)
type=OBJT);
ld: fatal: symbol `optopt' is multiply-defined:
(file /tmp/ld_rAAAeHaikh type=OBJT; file ../lib/libtxi.a(getopt.o)
type=OBJT);
ld: fatal: File processing errors. No output written to /tmp/phantCAAgHaikh
postopt: assertion failed: at line 64 in file "../src/elf/architecture.cc"
postopt: trying to read an invalid elf header
cc: Fatal error in /opt/SUNWspro/prod/bin/postopt
Status 134
*** Error code 134
Stop.
bmake: stopped in /usr/pkgsrc/devel/gtexinfo/work/texinfo-4.8/info
*** Error code 1
I've been unable to track down the cause of this. Has anyone else seen this? And
no, it's not my compiler flags. I've tried with just "-xarch=v9a" (since all my
other packages are 64-bit) with the same result.
A quick and dirty workaround is to just allow multiply-defined symbols if the
SunPro compiler is used by patching the Makefile (attached). That's of course
not a great solution, but since there's other packages depending on gtexinfo
this will at least solve the problem temporarily. It's one for the archives anyway.
--------------050609040104010007000306
Content-Type: text/plain;
name="Makefile.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Makefile.diff"
--- ../gtexinfo.orig/Makefile Tue Jul 26 13:38:29 2005
+++ Makefile Tue Jul 26 13:41:15 2005
@@ -33,6 +33,10 @@
CONFIGURE_ARGS+= --disable-nls
.endif
+.if ${PKGSRC_COMPILER} == "sunpro"
+LDFLAGS+= -z muldefs
+.endif
+
.include "../../mk/bsd.pkg.mk"
# This need to be defined here to override the setting in texinfo.mk
--------------050609040104010007000306--