Skip to content

./configure --disable-shared errors out linking scanimage

Triggered by #119 I've found that

./autogen.sh
./configure --disable-shared
make CFLAGS="-g -O0 -Wall"

errors out when trying to link the scanimage application. The final bit of the make output is

make[1]: Entering directory '/build/master/gcc/frontend'
/bin/bash ../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -pedantic -g -O2   -o scanimage scanimage.o sicc.o stiff.o ../backend/libsane.la ../sanei/libsanei.la ../lib/liblib.la -lpng -ljpeg 
libtool: link: gcc -Wall -Wextra -pedantic -g -O2 -o scanimage scanimage.o sicc.o stiff.o  ../backend/.libs/libsane.a -lv4l1 -lieee1284 -ltiff -lgphoto2 -lgphoto2_port -lm -lusb-1.0 -lpthread -ldl -lxml2 ../sanei/.libs/libsanei.a ../lib/.libs/liblib.a -lpng -ljpeg
/usr/bin/ld: ../backend/.libs/libsane.a(libepsonds_la-epsonds.o):/code/backend/epsonds.c:73: multiple definition of `mode_params'; ../backend/.libs/libsane.a(libepson2_la-epson2.o):/code/backend/epson2.c:90: first defined here
/usr/bin/ld: ../backend/.libs/libsane.a(libepsonds_la-epsonds.o):/code/backend/epsonds.c:99: multiple definition of `source_list'; ../backend/.libs/libsane.a(libepson2_la-epson2.o):/code/backend/epson2.c:126: first defined here
/usr/bin/ld: ../backend/.libs/libsane.a(libavision_la-avision.o): in function `sane_avision_open':
/code/backend/avision.c:7924: warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/bin/ld: ../backend/.libs/libsane.a(libgenesys_la-genesys.o): undefined reference to symbol '_ZNSo9_M_insertIdEERSoT_@@GLIBCXX_3.4.9'
/usr/bin/ld: //usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:559: scanimage] Error 1
Edited by Olaf Meeuwissen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information