Subject: sane-backends link failure on MacOS X
To: None <tech-pkg@netbsd.org>
From: John D. Baker <jdbaker@mylinuxisp.com>
List: tech-pkg
Date: 04/06/2004 20:00:40
Trying to build graphics/sane-backends (dependency of graphics/xsane)
on MacOS X 10.1.5 and 10.2.8 fails linking as follows:
[...]
mkdir .libs
gcc -o .libs/scanimage scanimage.o stiff.o -framework CoreFoundation -framework IOKit -L/Volumes/NetBSD/pkgsrc/graphics/sane-backends/work/.buildlink/lib ../lib/liblib.a ../backend/.libs/libsane.dylib -L/usr/pkg/lib /usr/pkg/lib/libusb.dylib -lIOKit -lm /usr/pkg/lib/libjpeg.dylib
ld: multiple definitions of symbol _getopt
/usr/lib/libm.dylib(getopt.So) definition of _getopt
../lib/liblib.a(getopt.o) definition of _getopt in section (__TEXT,__text)
ld: multiple definitions of symbol _opterr
/usr/lib/libm.dylib(getopt.So) definition of _opterr
../lib/liblib.a(getopt.o) definition of _opterr in section (__DATA,__data)
ld: multiple definitions of symbol _optind
/usr/lib/libm.dylib(getopt.So) definition of _optind
../lib/liblib.a(getopt.o) definition of _optind in section (__DATA,__data)
ld: multiple definitions of symbol _optopt
/usr/lib/libm.dylib(getopt.So) definition of _optopt
../lib/liblib.a(getopt.o) definition of _optopt in section (__DATA,__data)
gnumake[1]: *** [scanimage] Error 1
gnumake: *** [all-recursive] Error 1
*** Error code 2
Stop.
bmake: stopped in /usr/pkgsrc/graphics/sane-backends
[...]
I've seen other packages that had multiply-defined symbols fail this
way too, but when I tried building them later, after unspecified
fixes had been applied, they simply ignored the error and went ahead
and as far as I know, they worked.
Perhaps the same treatment applies here?
Thanks.
--
John D. Baker, KN5UKS NetBSD Darwin/MacOS X
jdbaker(at)mylinuxisp(dot)com OpenBSD FreeBSD
BSD -- It just sits there and _works_!