Skip to contentSkip to conversation

AVR32 toolchain build failure

Buildroot Thomas Petazzoni 2 participants 4 messages Nov 13, 2013 – Nov 15, 2013

lore
Share & tools
lore
#0 lore raw

Hello Simon,

I've tried to build an AVR32 toolchain with 2013.11-rc1, with the following defconfig:

BR2_avr32=y
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_INIT_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
# BR2_TARGET_ROOTFS_TAR is not set

and the build failed with:

In file included from /opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/kernel.h:4,

                 from /opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/netlink.h:4,
                 from /opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/rtnetlink.h:5,
                 from libc/inet/netlinkaccess.h:27,
                 from libc/inet/if_index.c:36:

/opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/sysinfo.h:8: error: expected specifier-qualifier-list before '__kernel_long_t' make[1]: *** [libc/inet/if_index.os] Error 1
make[1]: Leaving directory `/opt/toolchain-build/build/uclibc-0.9.31.1'

It is apparently reported at:

https://lkml.org/lkml/2013/5/18/1

However, I've also built several other toolchains with the same Buildroot version and haven't had any problem.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#1 lore raw

Hi Thomas,

Quoted 15 lines · Thomas Petazzoni

I've tried to build an AVR32 toolchain with 2013.11-rc1, with the following defconfig:

BR2_avr32=y
BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_INIT_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
# BR2_TARGET_ROOTFS_TAR is not set

and the build failed with:

Quoted 8 lines

In file included from /opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/kernel.h:4,

                 from /opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/netlink.h:4,
                 from /opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/rtnetlink.h:5,
                 from libc/inet/netlinkaccess.h:27,
                 from libc/inet/if_index.c:36:

/opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/sysinfo.h:8: error: expected specifier-qualifier-list before '__kernel_long_t' make[1]: *** [libc/inet/if_index.os] Error 1
make[1]: Leaving directory `/opt/toolchain-build/build/uclibc-0.9.31.1'

Yes, using your defconfig the build fails for me too. For my avr32 projects, I'm using 3.4.x kernel and headers. The offending commit

http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=ccdfcc398594

appears not to have been back-ported to the 3.4.x series.

Quoted 6 lines

It is apparently reported at:

https://lkml.org/lkml/2013/5/18/1

However, I've also built several other toolchains with the same Buildroot version and haven't had any problem.

That's odd. I wonder if your other toolchains are using older kernel headers?

I'm not sure what the right fix is for this. Do you have any suggestions?

Simon.

#2 lore raw

Dear Simon Dawson,

Quoted 9 lines · Simon Dawson
Quoted 8 lines

In file included from /opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/kernel.h:4,

                 from /opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/netlink.h:4,
                 from /opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/rtnetlink.h:5,
                 from libc/inet/netlinkaccess.h:27,
                 from libc/inet/if_index.c:36:

/opt/br-avr32-full-2013.11-rc1/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/sysinfo.h:8: error: expected specifier-qualifier-list before '__kernel_long_t' make[1]: *** [libc/inet/if_index.os] Error 1
make[1]: Leaving directory `/opt/toolchain-build/build/uclibc-0.9.31.1'

Quoted 6 lines

Yes, using your defconfig the build fails for me too. For my avr32 projects, I'm using 3.4.x kernel and headers. The offending commit

http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=ccdfcc398594

appears not to have been back-ported to the 3.4.x series.

Ok.

Quoted 8 lines
Quoted 6 lines

It is apparently reported at:

https://lkml.org/lkml/2013/5/18/1

However, I've also built several other toolchains with the same Buildroot version and haven't had any problem.

That's odd. I wonder if your other toolchains are using older kernel headers?

No, they were all using the 3.12 kernel headers:

$ grep "linux-headers.*Extracting" *2013.11*log
br-arm-basic-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-arm-cortex-a9-bleeding-edge-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-arm-full-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-arm11-full-nothread-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-avr32-full-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-i386-pentium4-full-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-mips64-largefile-basic-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-mipsel-o32-full-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-powerpc-603e-basic-cpp-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-powerpc-e500mc-full-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-sh4-full-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-x86-64-atom-no-rpc-no-ipv6-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting
br-x86-64-core2-full-2013.11-rc1-build.log:>>> linux-headers 3.12 Extracting

and all of them were successful, except:

* AVR32 (problem exposed above)
* SH4 (a multilib problem for which I know the cause)

Quoted 1 line

I'm not sure what the right fix is for this. Do you have any suggestions?

Well, the difference between all of these builds and the AVR32 one is obviously that AVR32 is using uClibc 0.9.31, right? Seems like uClibc 0.9.33 is not affected by the problem. So I would suggest that a fix is made to uClibc 0.9.31 to avoid this problem.

Maybe it's just uclibc-0004-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch from our 0.9.33.2 patch stack that needs to be backported to uClibc 0.9.31 ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

Hi Thomas,

Quoted 9 lines · Thomas Petazzoni

Well, the difference between all of these builds and the AVR32 one is obviously that AVR32 is using uClibc 0.9.31, right? Seems like uClibc 0.9.33 is not affected by the problem. So I would suggest that a fix is made to uClibc 0.9.31 to avoid this problem.

Maybe it's just uclibc-0004-libc-sysdeps-add-__kernel_long-and-__kernel_ulong.patch from our 0.9.33.2 patch stack that needs to be backported to uClibc 0.9.31 ?

Okay; thanks for the tip. I'll submit a patch for this.

Simon.