Bug#661440: libexplain FTBFS on Alpha: linux/ac/sys/types.h: No such file or directory
Source: libexplain
Version: 0.51.D001-1
Severity: normal
User: debian-alpha@lists.debian.org
Usertags: alpha
X-Debbugs-CC: debian-alpha@lists.debian.org
libexplain FTBFS on Alpha with the following:
libtool: compile: gcc -Wall -g -O2 -Wall -Wextra -Wl,--as-needed -I. -c
libexplain/buffer/eio.c -fPIC -DPIC -o libexplain/buffer/.libs/eio.o
In file included from libexplain/buffer/eio.c:22:0:
./libexplain/ac/fcntl.h:35:32: fatal error: linux/ac/sys/types.h: No
such file or directory
Full build log is available at:
http://buildd.debian-ports.org/status/fetch.php?pkg=libexplain&arch=alpha&ver=0.51.D001-1&stamp=1329468418
The compilation fails because of some trickery in the file
libexplain/ac/fcntl.h, namely:
#if defined(__alpha__) && defined(HAVE_LINUX_FCNTL_H)
#include <libexplain/ac/linux/types.h> /* Ubuntu Hardy needs this first */
/* This is very strange, but numerous tests fail if we use <fcntl.h>
because is appears to have several incorrect macro definitions */
#include <linux/ac/sys/types.h>
#include <linux/fcntl.h>
#else
I'm not sure why a compilation path unique to Alpha is present but I
found the following in the libexplain changelog which seems relevant:
libexplain (0.35.D006-1) unstable; urgency=low
* A build problem concerning <fcntl.h> has been fixed: it turns out that
on Liunux [sic] alpha <fcntl.h> has the wrong values for O_LARGEFILE and
O_DIRECTORY, and you must use <linux/fcntl.h> instead.
I find that comment somewhat mystifying as O_LARGEFILE is defined to be
0, which I believe to be correct as _all_ files are by default and by
design O_LARGEFILE, and O_DIRECTORY is defined to be 0100000 which is
the same as is in the linux kernel source. (They may not be the same as
x86 which is not a problem.)
I ran a test build where I had commented out the Alpha specific code in
libexplain/ac/fcntl.h so it would use the standard code that every other
architecture uses and the compilation passed that point and went on for
a lot further until it failed with:
libtool: compile: gcc -Wall -g -O2 -Wall -Wextra -Wl,--as-needed -I. -c
libexplain/iocontrol/tiocgetp.c -fPIC -DPIC -o
libexplain/iocontrol/.libs/tiocgetp.o
libexplain/iocontrol/tiocgetp.c:31:5: error: invalid application of
'sizeof' to incomplete type 'struct sgttyb'
That is due to use of the TIOCGETP macro. It appears that <termios.h>
only declares 'struct sgttyb' but does not define it so the sizeof
operator on struct sgttyb fails. Struct sgttyb is defined in:
/usr/include/alpha-linux-gnu/asm/termios.h
but I haven't been able to work out why that is not being included.
It's getting late so I am filing the bug report at this stage.
Cheers
Michael.
Reply to: