[sane-devel] Compilation errors with snapscan and Irix
Oliver Schwartz
Oliver.Schwartz at gmx.de
Sun Jan 27 11:57:46 GMT 2002
Hi,
I'm neither an expert on Irix nor on FreeBSD. The "#if defined" code was
taken directly from the manpage of semctl(2) on Linux. Maybe the manpage of
semctl for Irix or FreeBSD offers help. If anyone knows a fix I'll be happy
to integrate it.
The whole semctl() stuff is getting rather annoying - according to the docs,
its not neccessary to pass the "union semun" argument at all if cmd is set to
IPC_RMID. If it's not passed, however, Linux on PPC produces a segmentation
fault, whereas Linux on x86 works fine. Even worse, this bug in the PPC libc
library is known for almost two years ...
(http://sources.redhat.com/ml/bug-glibc/2000-01/msg00102.html)
Regards,
Oliver
> I just tried compiling sane-backends on Irix 6.2 and got the following
> error:
>
> cc -c -g -DHAVE_CONFIG_H -I. -I. -I../include -I../include -D_GNU_SOURCE
> -DPATH_SANE_CONFIG_DIR=/tmp/sane-bin/etc/sane.d
> -DPATH_SANE_DATA_DIR=/tmp/sane-bin/share -DV_MAJOR=1 -DV_MINOR=0
> -DBACKEND_NAME=snapscan -DLIBDIR=/tmp/sane-bin/lib/sane snapscan.c -DPIC
> -o .libs/snapscan.lo cfe: Error: ./snapscan-usb.c, line 63: redeclaration
> of 'semun'; previous declaration at line 173 in file
> '/usr/include/sys/sem.h' union semun {
> ------^
> cfe: Error: ./snapscan-usb.c, line 64: Duplicate member 'val'
> int val;
> -------^
> cfe: Error: ./snapscan-usb.c, line 65: Duplicate member 'buf'
> struct semid_ds *buf;
> --------------------^
> cfe: Error: ./snapscan-usb.c, line 66: Duplicate member 'array'
> unsigned short int *array;
> -----------------------^
> gmake[1]: *** [snapscan.lo] Error 1
> gmake[1]: Leaving directory `/tmp/sane-backends-1.0.6-cvs/backend'
> gmake: *** [all-recursive] Error 1
>
> Looks like the test
>
> #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
>
> doesn't catch this.
>
> If it is really a bug, can this be fixed before release? As this stops
> sane from working on Irix, the bug fix is allowed even after code
> freeze.
More information about the sane-devel
mailing list