Subject: OS/X linker problems
To: None <tech-pkg@netbsd.org>
From: MLH <mlh@goathill.org>
List: tech-pkg
Date: 12/02/2003 14:43:44
Mac OS/X exhibits linking problems with many pkgsrc packages,
whereby the linker can't locate symbols in a library compiled via
pkgsrc. For example:

gcc -r -Wl,-bind_at_load -keep_private_externs -nostdlib -o .libs/libgconf-1.1.4
.dylib-master.o  .libs/gconf-internals.o .libs/gconf-backend.o .libs/gconf-chang
eset.o .libs/gconf-error.o .libs/gconf-glib.o .libs/gconf-listeners.o .libs/gcon
f-locale.o .libs/gconf-schema.o .libs/gconf-sources.o .libs/gconf-value.o .libs/
gconf.o .libs/GConf-common.o .libs/GConf-skels.o .libs/GConf-stubs.o && gcc -dyn
amiclib -flat_namespace -undefined suppress -o .libs/libgconf-1.1.4.dylib .libs/
libgconf-1.1.4.dylib-master.o  -L/usr/pkgsrc/devel/GConf/work.MAC300/.buildlink/
lib -L/usr/pkgsrc/devel/GConf/work.MAC300/.buildlink-x11/lib -L/usr/pkg/lib -loa
f -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lm -lgmodule -lglib -lintl -L/usr
/lib -liconv -lc  -install_name /usr/pkg/lib/libgconf-1.1.dylib -compatibility_v
ersion 2 -current_version 2.4
ld: multiple definitions of symbol CORBA_sequence_CORBA_string(float, long doubl
e,...)(...)
.libs/libgconf-1.1.4.dylib-master.o definition of CORBA_sequence_CORBA_string(fl
oat, long double,...)(...) in section (__TEXT,__text)
/usr/pkgsrc/devel/GConf/work.MAC300/.buildlink/lib/liboaf.dylib(liboaf.0.0.dylib
-master.o) definition of CORBA_sequence_CORBA_string(float, long double,...)(...
)
ld: multiple definitions of symbol _CORBA_sequence_CORBA_string_allocbuf
.libs/libgconf-1.1.4.dylib-master.o definition of _CORBA_sequence_CORBA_string_a
llocbuf in section (__TEXT,__text)
/usr/pkgsrc/devel/GConf/work.MAC300/.buildlink/lib/liboaf.dylib(liboaf.0.0.dylib
-master.o) definition of _CORBA_sequence_CORBA_string_allocbuf
ld: multiple definitions of symbol _TC_CORBA_sequence_CORBA_string_struct
.libs/libgconf-1.1.4.dylib-master.o definition of _TC_CORBA_sequence_CORBA_strin
g_struct in/usr/bin/libtool: internal link edit command failed
 section (__DATA,__const)
/usr/pkgsrc/devel/GConf/work.MAC300/.buildlink/lib/liboaf.dylib(liboaf.0.0.dylib
-master.o) definition of _TC_CORBA_sequence_CORBA_string_struct
ld: multiple definitions of symbol _CORBA_sequence_CORBA_string__alloc
.libs/libgconf-1.1.4.dylib-master.o definition of _CORBA_sequence_CORBA_string__
alloc in section (__TEXT,__text)
/usr/pkgsrc/devel/GConf/work.MAC300/.buildlink/lib/liboaf.dylib(liboaf.0.0.dylib
-master.o) definition of _CORBA_sequence_CORBA_string__alloc
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/devel/GConf/work.MAC300/GConf-1.0.9/gconf

I've looked around for explanations and have tried several of them
to no avail. Does anyone know how to handle these liking problems
with OS/X?