Bug#391305: linux-kernel-headers: FTBFS on arm - complains about __32 t; in include/asm/byteorder.h:21
Package: linux-kernel-headers
Version: 2.6.18-2
Severity: serious
Justification: no longer builds from source
building fails with
cc -Wall -Werror -W -I /root/linux-kernel-headers-2.6.18/testsuite/../debian/linux-kernel-headers/usr/include
-I /root/linux-kernel-headers-2.6.18/testsuite/../include -ansi -pedantic -o ansi-msdos-fs.o -c msdos-fs.c
In file included from /root/linux-kernel-headers-2.6.18/testsuite/../include/linux/msdos_fs.h:7,
from msdos-fs.c:1:
/root/linux-kernel-headers-2.6.18/testsuite/../debian/linux-kernel-headers/usr/include/asm/byteorder.h:21:
error: expected '=', ',', ';', 'asm' or '__attribute__' before '__u32'
cc1: warnings being treated as errors
In file included from /root/linux-kernel-headers-2.6.18/testsuite/../include/linux/byteorder/little_endian.h:12,
from /root/linux-kernel-headers-2.6.18/testsuite/../debian/linux-kernel-headers/usr/include/asm/byteorder.h:54,
from /root/linux-kernel-headers-2.6.18/testsuite/../include/linux/msdos_fs.h:7,
from msdos-fs.c:1:
/root/linux-kernel-headers-2.6.18/testsuite/../include/linux/byteorder/swab.h: In function '__fswab32':
/root/linux-kernel-headers-2.6.18/testsuite/../include/linux/byteorder/swab.h:148:
warning: implicit declaration of function '___arch__swab32'
make[1]: *** [ansi-msdos-fs.o] Error 1
make[1]: Leaving directory /root/linux-kernel-headers-2.6.18/testsuite'
make: *** [lkh-test] Error 2
This is as reported in
http://buildd.debian.org/fetch.php?pkg=linux-kernel-headers&arch=arm&ver=2.6.18-1&stamp=1159121860&file=log
and confirmed on leisner.d.o
This seems a bit wierd:
/root/linux-kernel-headers-2.6.18/testsuite/../include/linux/byteorder/little_endian.h:12
leisner:~/linux-kernel-headers-2.6.18/testsuite# grep -n "#include" ../include/linux/byteorder/little_endian.h
11:#include <linux/types.h>
12:#include <linux/byteorder/swab.h>
which is including linux/byteorder/swab.h, not asm/byteorder.h. so how did we get to the error in asm/byteorder.h:21 ?
using -E instead of -c in above command we get:
the source:
-------------------asm-arm/byteorder.h----------
#ifndef __ASM_ARM_BYTEORDER_H
#define __ASM_ARM_BYTEORDER_H
#include <linux/compiler.h>
#include <asm/types.h>
static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
{
__u32 t;
#ifndef __thumb__
if (!__builtin_constant_p(x)) {
----------------------------------
preprocessed to:
---------------------------------
typedef __signed__ int __s32;
typedef unsigned int __u32;
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
# 20 "/root/linux-kernel-headers-2.6.18/testsuite/../debian/linux-kernel-headers/usr/include/asm
/byteorder.h" 2
static inline __u32 ___arch__swab32(__u32 x)
{
__u32 t;
if (!__builtin_constant_p(x)) {
--------------------------------------
which looks OK to me.
(Is __attribute_const__ supposed to be null?)
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: arm (armv4tl)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-csb637
Locale: LANG="", LC_CTYPE=""
-- no debconf information
Reply to: