sane 1.0.30: unable to compile without libusb
Hello,
if I compile sane 1.0.30 on my system with libusb everything works fine. But without, the compilation fails. I don't need to connect my scanner with usb, so I don't need this support.
My system is:
$ uname -a
Linux KISS 5.6.4 #3 SMP Wed Apr 15 15:55:21 UTC 2020 x86_64 GNU/Linux
I compile with the following:
./configure \
--prefix=/usr \
--localstatedir=/var \
--sysconfdir=/etc \
--disable-rpath \
--disable-nls
I get the error:
sanei_usb.c: In function 'sanei_xml_get_hex_data':
sanei_usb.c:775:33: error: 'uint8_t' undeclared (first use in this function); did you mean 'u_int8_t'?
775 | if (sanei_xml_char_types[(uint8_t)*cur_content] == CHAR_TYPE_SPACE)
| ^~~~~~~
| u_int8_t
depbase=`echo sanei_pp.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include/sane -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DPATH_SANE_LOCK_DIR=/var/lock/sane -DV_MAJOR=1 -DV_MINOR=0 -I. -I. -I../include -I../include -I/usr/include/libxml2 -Wall -O3 -pipe -march=native -MT sanei_pp.lo -MD -MP -MF $depbase.Tpo -c -o sanei_pp.lo sanei_pp.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include/sane -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DPATH_SANE_LOCK_DIR=/var/lock/sane -DV_MAJOR=1 -DV_MINOR=0 -I. -I. -I../include -I../include -I/usr/include/libxml2 -Wall -O3 -pipe -march=native -MT sanei_pv8630.lo -MD -MP -MF .deps/sanei_pv8630.Tpo -c sanei_pv8630.c -fPIC -DPIC -o .libs/sanei_pv8630.o
depbase=`echo sanei_lm983x.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include/sane -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DPATH_SANE_LOCK_DIR=/var/lock/sane -DV_MAJOR=1 -DV_MINOR=0 -I. -I. -I../include -I../include -I/usr/include/libxml2 -Wall -O3 -pipe -march=native -MT sanei_lm983x.lo -MD -MP -MF $depbase.Tpo -c -o sanei_lm983x.lo sanei_lm983x.c &&\
mv -f $depbase.Tpo $depbase.Plo
depbase=`echo sanei_access.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include/sane -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DPATH_SANE_LOCK_DIR=/var/lock/sane -DV_MAJOR=1 -DV_MINOR=0 -I. -I. -I../include -I../include -I/usr/include/libxml2 -Wall -O3 -pipe -march=native -MT sanei_access.lo -MD -MP -MF $depbase.Tpo -c -o sanei_access.lo sanei_access.c &&\
mv -f $depbase.Tpo $depbase.Plo
depbase=`echo sanei_tcp.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include/sane -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DPATH_SANE_LOCK_DIR=/var/lock/sane -DV_MAJOR=1 -DV_MINOR=0 -I. -I. -I../include -I../include -I/usr/include/libxml2 -Wall -O3 -pipe -march=native -MT sanei_tcp.lo -MD -MP -MF $depbase.Tpo -c -o sanei_tcp.lo sanei_tcp.c &&\
mv -f $depbase.Tpo $depbase.Plo
make[1]: *** [Makefile:527: sanei_usb.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include/sane -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DPATH_SANE_LOCK_DIR=/var/lock/sane -DV_MAJOR=1 -DV_MINOR=0 -I. -I. -I../include -I../include -I/usr/include/libxml2 -Wall -O3 -pipe -march=native -MT sanei_tcp.lo -MD -MP -MF .deps/sanei_tcp.Tpo -c sanei_tcp.c -fPIC -DPIC -o .libs/sanei_tcp.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include/sane -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DPATH_SANE_LOCK_DIR=/var/lock/sane -DV_MAJOR=1 -DV_MINOR=0 -I. -I. -I../include -I../include -I/usr/include/libxml2 -Wall -O3 -pipe -march=native -MT sanei_pp.lo -MD -MP -MF .deps/sanei_pp.Tpo -c sanei_pp.c -fPIC -DPIC -o .libs/sanei_pp.o
sanei_pp.c:129:10: note: '#pragma message: No I/O support for this architecture!'
129 | # pragma message "No I/O support for this architecture!"
| ^~~~~~~
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include/sane -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DPATH_SANE_LOCK_DIR=/var/lock/sane -DV_MAJOR=1 -DV_MINOR=0 -I. -I. -I../include -I../include -I/usr/include/libxml2 -Wall -O3 -pipe -march=native -MT sanei_lm983x.lo -MD -MP -MF .deps/sanei_lm983x.Tpo -c sanei_lm983x.c -fPIC -DPIC -o .libs/sanei_lm983x.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include/sane -D_REENTRANT -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DPATH_SANE_LOCK_DIR=/var/lock/sane -DV_MAJOR=1 -DV_MINOR=0 -I. -I. -I../include -I../include -I/usr/include/libxml2 -Wall -O3 -pipe -march=native -MT sanei_access.lo -MD -MP -MF .deps/sanei_access.Tpo -c sanei_access.c -fPIC -DPIC -o .libs/sanei_access.o
make[1]: Leaving directory '/root/.cache/kiss/build-21528/sane/sanei'
make: *** [Makefile:597: all-recursive] Error 1
Complete log: log file
I read it's better to build sane with libusb. But I was expecting problem when using a scanner not at compilation if libusb is not installed.
Just tell me if you need more information.
Thank you!