[sane-devel] error building using --enable-static

stef stef.dev at free.fr
Sat Aug 4 07:13:29 UTC 2012


     Hello,

     while debugging saned/genesys backend I noted that a static build :
./configure 'CFLAGS=-ggdb' '--prefix=/usr' '--sysconfdir=/etc' 
'--enable-pnm-backend' '--enable-parport-directio' '--enable-locking' 
--enable-static --disable-shared

fails with:

/usr/lib/gcc/i486-slackware-linux/4.7.1/../../../../i486-slackware-linux/bin/ld: 
Warning: alignment 16 of symbol `scan' in 
../backend/.libs/libsane.a(libkvs20xx_la-kvs20xx_cmd.o) is smaller than 
32 in ../backend/.libs/libsane.a(libhp3900_la-hp3900.o)
/usr/lib/gcc/i486-slackware-linux/4.7.1/../../../../i486-slackware-linux/bin/ld: 
Warning: size of symbol `scan' changed from 72 in 
../backend/.libs/libsane.a(libhp3900_la-hp3900.o) to 86 in 
../backend/.libs/libsane.a(libkvs20xx_la-kvs20xx_cmd.o)
/usr/lib/gcc/i486-slackware-linux/4.7.1/../../../../i486-slackware-linux/bin/ld: 
Warning: type of symbol `scan' changed from 1 to 2 in 
../backend/.libs/libsane.a(libkvs20xx_la-kvs20xx_cmd.o)
../backend/.libs/libsane.a(libgphoto2_i_la-gphoto2.o): In function 
`converter_init':
/stefdev/git/sane-backends/backend/gphoto2.c:1982: undefined reference 
to `sanei_jpeg_jinit_write_ppm'
../backend/.libs/libsane.a(libdc210_la-dc210.o): In function 
`sane_dc210_start':
/stefdev/git/sane-backends/backend/dc210.c:1264: undefined reference to 
`sanei_jpeg_jinit_write_ppm'
../backend/.libs/libsane.a(libdc240_la-dc240.o): In function 
`sane_dc240_start':
/stefdev/git/sane-backends/backend/dc240.c:1477: undefined reference to 
`sanei_jpeg_jinit_write_ppm'
collect2: error: ld returned 1 exit status
make[1]: *** [scanimage] Erreur 1
make: *** [all-recursive] Erreur 1

     All the ksv20xx_cmd.c functions should be renamed like explained in 
backend-writing.txt , so to avoid clashes like the one on the 'scan' 
function with the hp3900 (which maybe is lacking a 'static' somewhere). 
'make libchek' lists all the symbols that may clash, and there is quite 
a number of them.

      And it seems some library is missing at link time for scanimage.

     I currently haven't the time to dig into it. So if anyone has time ....

Regards,
     Stef






More information about the sane-devel mailing list