[lsb-discuss] SANE and LSB: libusb does not compile

Till Kamppeter till.kamppeter at gmail.com
Wed Jun 20 02:41:53 PDT 2007


Wichmann, Mats D wrote:
> lsb-discuss-bounces at lists.freestandards.org wrote:
>> Till Kamppeter wrote:
>>> I am trying to compile SANE in the LSB build environment (for the LSB
>>> DDK). It needs libusb and libieee1284, As these libs are not in LSB I
>>> build them for statical linking inside the SANE RPM. There I
>>> encounter the following problem: 
>>>
>>>
>> ---------------------------------------------------------------
>> -----------
>>> source='linux.c' object='linux.lo' libtool=yes \
>>>          depfile='.deps/linux.Plo' tmpdepfile='.deps/linux.TPlo' \
>>>          depmode=gcc /bin/sh ./depcomp \
>>>          /bin/sh ./libtool --mode=compile /opt/lsb/bin/lsbcc
>>> -DHAVE_CONFIG_H   -I.  -Werror  -O2 -g -march=i486 -Wall -c -o
>>>   linux.lo linux.c /opt/lsb/bin/lsbcc -DHAVE_CONFIG_H -I. -Werror
>>> -O2 -g -march=i486 -Wall -c linux.c -Wp,-MD,.deps/linux.TPlo -o
>>> linux.o 
>>> cc1: warnings being treated as errors
>>> linux.c: In function 'usb_set_configuration':
>>> linux.c:66: warning: implicit declaration of function '_IOR'
>>> linux.c:66: error: expected expression before 'unsigned'
>>> linux.c: In function 'usb_claim_interface':
>>> linux.c:80: error: expected expression before 'unsigned'
>>> linux.c: In function 'usb_release_interface':
>>> linux.c:98: error: expected expression before 'unsigned'
>>> linux.c: In function 'usb_set_altinterface':
>>> linux.c:119: error: expected expression before 'struct'
>>> linux.c: In function 'usb_control_msg':
>>> linux.c:152: warning: implicit declaration of function '_IOWR'
>>> linux.c:152: error: expected expression before 'struct'
>>> linux.c: In function 'usb_urb_transfer':
>>> linux.c:210: error: expected expression before 'struct'
>>> linux.c:222: warning: implicit declaration of function '_IOW'
>>> linux.c:222: error: expected expression before 'void'
>>> linux.c:263: warning: implicit declaration of function '_IO'
>>> linux.c:272: error: expected expression before 'void'
>>> linux.c: In function 'usb_os_find_devices':
>>> linux.c:417: error: expected expression before 'struct'
>>> linux.c: In function 'usb_os_determine_children':
>>> linux.c:554: error: expected expression before 'struct'
>>> linux.c:556: error: expected expression before 'struct'
>>> linux.c: In function 'usb_resetep':
>>> linux.c:669: error: expected expression before 'unsigned'
>>> linux.c: In function 'usb_clear_halt':
>>> linux.c:681: error: expected expression before 'unsigned'
>>> linux.c: In function 'usb_get_driver_np':
>>> linux.c:707: error: expected expression before 'struct'
>>> linux.c: In function 'usb_detach_kernel_driver_np':
>>> linux.c:726: error: expected expression before 'struct'
>>> make[2]: *** [linux.lo] Error 1
>>> make[2]: Leaving directory
>>> `/home/till/rpm/BUILD/sane-backends/libusb-0.1.12'
>>> make[1]: *** [all-recursive] Error 1
>>> make[1]: Leaving directory
>>> `/home/till/rpm/BUILD/sane-backends/libusb-0.1.12'
>>> make: *** [all] Error 2
>>> error: Bad exit status from /home/till/tmp/rpm-tmp.60619 (%build)
>>>
>>>
>>> RPM build errors:
>>>      parse error in expression
>>>      /home/till/rpm/SPECS/sane-backends.spec:170:
>>>      parseExpressionBoolean returns -1 Bad exit status from
>>> /home/till/tmp/rpm-tmp.60619 (%build) 
>>>
>> ---------------------------------------------------------------
>> -----------
>>> Any hint about getting this working? Would be great to get SANE into
>>> the LSB, for multi-function devices.
>> I don't have libusb in front of me, but it looks like it needs but
>> does not #include <linux/ioctl.h> and maybe more, but certainly that
>> one. 
> 
> yeah, this is buried in the chain of inclusions.
> in general, LSB does not include things that are
> specifically defined in linux/foo headers, and
> here including <sys/ioctl.h> does not get you these
> defines.
> 

Does this mean that it is impossible to make an LSB package of anything 
which needs libusb? I would consider this as a bug of the LSB.

    Till




More information about the lsb-discuss mailing list