Skip to contentSkip to conversation

Altera SoC Buildroot external toolchain incompatible error

Buildroot lemonoje 2 participants 10 messages May 11, 2017 – May 12, 2017

lore
Share & tools
lore

lemonoje

author
#0 lore raw

Hello,

I have been trying to find an answer for this error and I found something close posted here, but I don't understand fully the problem/solution. I am building a Linux system for my Altera Arria 10 SoC Cortex-A9. I'm new to Buildroot, and building Linux in general, so I have been pretty closely following the instructions on Rocketboards.org (except now I am trying to get newer versions of buildroot and gcc toolchain).

More spcifically for my question I am on part 9. (Building rootfs) in this guide:
https://rocketboards.org/foswiki/Documentation/EmbeddedLinuxBeginnerSGuide
<https://rocketboards.org/foswiki/Documentation/EmbeddedLinuxBeginnerSGuide>

When I try to make buildroot I am selecting an external toolchain (pre-downloaded from releases.linaro.org), and configuring accordingly. I then run

*make -C buildroot ARCH=ARM BR2_TOOLCHAIN_EXTERNAL_PATH=$TOOLCHAIN all*

and I get the error:

Quoted 1 line
Quoted 1 line
Quoted 1 line

toolchain-external Configuring

/sf/ArriaX/ltsi_4_1_33/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.4.1/../../../../arm-linux-gnueabihf/bin/ld:
error: /sf/ArriaX/ltsi_4_1_33/buildroot/output/build/.br-toolchain-test.tmp
uses VFP register arguments, /tmp/ccbU9FJ0.o does not /sf/ArriaX/ltsi_4_1_33/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.4.1/../../../../arm-linux-gnueabihf/bin/ld:
failed to merge target specific data of file /tmp/ccbU9FJ0.o
collect2: error: ld returned 1 exit status
Incorrect ABI setting: EABI selected, but toolchain is incompatible
package/pkg-generic.mk:206: recipe for target
'/sf/ArriaX/ltsi_4_1_33/buildroot/output/build/toolchain-external/.stamp_configured'
failed
make: ***
[/sf/ArriaX/ltsi_4_1_33/buildroot/output/build/toolchain-external/.stamp_configured]
Error 1
make: Leaving directory '/sf/ArriaX/ltsi_4_1_33/buildroot'

Thanks in advance for any help!!

--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Altera-SoC-Buildroot-external-toolchain-incompatible-error-tp164744.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

#1 lore raw

Hello,

Quoted 1 line · lemonoje

Incorrect ABI setting: EABI selected, but toolchain is incompatible

Your toolchain is an EABIhf toolchain, but you have selected EABI in your Buildroot configuration.

Best regards,

Thomas

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

Thomas,
Wow - thanks for the quick reply. I am using the make ... ... nconfig menu utility. Under Target EABI--->, I had no option for EABIhf, but now I just selected *"Enable VFP extension support"* which then gives me the Target ABI--->EABIhf. I should have my C library as glibc, correct?

I get a little further...now stalled at:

Quoted 1 line
Quoted 1 line
Quoted 1 line

toolchain-external Installing to staging directory

/usr/bin/install -D -m 0755 /sf/ArriaX/ltsi_4_1_33/buildroot/output/build/toolchain-external/toolchain-wrapper /sf/ArriaX/ltsi_4_1_33/buildroot/output/host/usr/bin/toolchain-wrapper
ln: failed to create symbolic link ?/sf/ArriaX/ltsi_4_1_33/buildroot/output/host/usr/ARM-buildroot-linux-gnueabihf/sysroot/usr/lib?:
No such file or directory
package/pkg-generic.mk:255: recipe for target '/sf/ArriaX/ltsi_4_1_33/buildroot/output/build/toolchain-external/.stamp_staging_installed' failed

I do not have the 'usr' path under ^^^ path/sysroot

--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Altera-SoC-Buildroot-external-toolchain-incompatible-error-tp164744p164751.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

author
#4 lore raw
In reply to Thomas Petazzoni
#3 lore raw
In reply to lemonoje

Hello,

Quoted 4 lines · lemonoje

Wow - thanks for the quick reply. I am using the make ... ... nconfig menu utility. Under Target EABI--->, I had no option for EABIhf, but now I just selected *"Enable VFP extension support"* which then gives me the Target ABI--->EABIhf. I should have my C library as glibc, correct?

It depends what your toolchain is.

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

toolchain-external Installing to staging directory

/usr/bin/install -D -m 0755 /sf/ArriaX/ltsi_4_1_33/buildroot/output/build/toolchain-external/toolchain-wrapper /sf/ArriaX/ltsi_4_1_33/buildroot/output/host/usr/bin/toolchain-wrapper
ln: failed to create symbolic link ?/sf/ArriaX/ltsi_4_1_33/buildroot/output/host/usr/ARM-buildroot-linux-gnueabihf/sysroot/usr/lib?:
No such file or directory
package/pkg-generic.mk:255: recipe for target '/sf/ArriaX/ltsi_4_1_33/buildroot/output/build/toolchain-external/.stamp_staging_installed' failed

Quoted 1 line

I do not have the 'usr' path under ^^^ path/sysroot

Is your external toolchain available somewhere so that I can try to reproduce?

Best regards,

Thomas

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

Hello,

Quoted 2 lines · lemonoje

https://releases.linaro.org/components/toolchain/binaries/5.4-2017.01/arm-linux-gnueabihf/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz
<https://releases.linaro.org/components/toolchain/binaries/5.4-2017.01/arm-linux-gnueabihf/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz>

This configuration works just fine for me:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="https://releases.linaro.org/components/toolchain/binaries/5.4-2017.01/arm-linux-gnueabihf/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz" BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-linux-gnueabihf"
BR2_TOOLCHAIN_EXTERNAL_GCC_5=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_0=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y

But well, you really don't need to configure this toolchain manually, Buildroot already supports the Linaro toolchain by default, just select it in the list of external toolchains.

Best regards,

Thomas

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

You have selected to download the toolchain whereas I already have it downloaded, so my config is not using the EXTERNAL_URL. (Note the path is not set below as I pass that in when I build). Here is my config that produces the error:

BR2_ARCH="arm"
BR2_GCC_TARGET_CPU="cortex-a9"
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_ARM_EABIHF=y
BR2_TOOLCHAIN=y
BR2_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED=y BR2_TOOLCHAIN_EXTERNAL_PATH="/loc" BR2_TOOLCHAIN_EXTERNAL_GLIBC=y BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL="toolchain-external-custom" BR2_TOOLCHAIN_EXTERNAL_PREFIX="arm-linux-gnueabihf" BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-linux-gnueabihf" BR2_TOOLCHAIN_EXTERNAL_GCC_5=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_0=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y BR2_TOOLCHAIN_EXTERNAL_HAS_SSP=y BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS="" BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY=y

But now I see once I choose to enable VFP, I can then choose Target ABI=EABIhf. And then the Linaro custom toolchain option (2016.11) appears in the Toolchain External Options. That would then mean I have to already have 2016.11 installed and use BR2_TOOLCHAIN_EXTERNAL_PATH to tell BR where it's at, right?

So, the external Linaro toolchains you can select differ between versions of Buildroot. Is there a listing of which ones support which toolchains?

--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Altera-SoC-Buildroot-external-toolchain-incompatible-error-tp164744p164814.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

#7 lore raw

Hello,

Quoted 3 lines · lemonoje

You have selected to download the toolchain whereas I already have it downloaded, so my config is not using the EXTERNAL_URL. (Note the path is not set below as I pass that in when I build).

Doesn't make any meaningful difference here. In one case, Buildroot will download+extract the toolchain tarball in output/host/opt/ext-toolchain/, while in the other case, it will simply leave the toolchain where specified by the configuration.

Quoted 5 lines

But now I see once I choose to enable VFP, I can then choose Target ABI=EABIhf. And then the Linaro custom toolchain option (2016.11) appears in the Toolchain External Options. That would then mean I have to already have 2016.11 installed and use BR2_TOOLCHAIN_EXTERNAL_PATH to tell BR where it's at, right?

You have two choices:

- Ask Buildroot to download+extract the toolchain for you
- Tell Buildroot to use a locally available toolchain

Quoted 2 lines

So, the external Linaro toolchains you can select differ between versions of Buildroot. Is there a listing of which ones support which toolchains?

Why does it matter? If you want a specific Linaro toolchain version, just tell Buildroot you're using a "Custom external toolchain". The existing profiles for various toolchains are just here to make things a bit easier for users: Buildroot will already know where to download the toolchain from, and what the toolchain configuration is. But using a "Custom external toolchain" is doing exactly the same, except that you have to tell Buildroot by yourself where is the toolchain and what is its configuration.

Best regards,

Thomas

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

Okay, all of that is understood - thank you for further clarification. However, no matter which method I choose (BR download + extract, or point to my toolchain) - I still get the same error:

*>>> toolchain-external-linaro-arm 2016.11 Installing to staging directory
/usr/bin/install -D -m 0755 /sf/ArriaX/ltsi_4_1_33/buildroot/output/build/toolchain-external-linaro-arm-2016.11/toolchain-wrapper /sf/ArriaX/ltsi_4_1_33/buildroot/output/host/usr/bin/toolchain-wrapper
ln: failed to create symbolic link ?/sf/ArriaX/ltsi_4_1_33/buildroot/output/host/usr/ARM-buildroot-linux-gnueabihf/sysroot/usr/lib?:
No such file or directory
package/pkg-generic.mk:255: recipe for target '/sf/ArriaX/ltsi_4_1_33/buildroot/output/build/toolchain-external-linaro-arm-2016.11/.stamp_staging_installed' failed
make: *** [/sf/ArriaX/ltsi_4_1_33/buildroot/output/build/toolchain-external-linaro-arm-2016.11/.stamp_staging_installed] Error 1
make: Leaving directory '/sf/ArriaX/ltsi_4_1_33/buildroot'*

Maybe I should save my config, delete the BR directory, re-clone and checkout, and try again?

--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Altera-SoC-Buildroot-external-toolchain-incompatible-error-tp164744p164820.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

author
#9 lore raw

Okay, removing the entire BR directory, re-clone, and re-checkout fixed the error. Previous failures must have mucked something up!
Now it builds for about 10 minutes and gets to compiling in valgrind (recommended by Rocketboards materials) and that portion fails with:

*
Toolchain wrapper executing:

'/sf/ArriaX/ltsi_4_1_33/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc'

    '--sysroot'

'/sf/ArriaX/ltsi_4_1_33/buildroot/output/host/usr/ARM-buildroot-linux-gnueabihf/sysroot'

    '-mabi=aapcs-linux'
    '-mfpu=neon'
    '-marm'
    '-mfloat-abi=hard'
    '-mcpu=cortex-a9'
    '--version'

ok (6.2.1)
checking build system type... x86_64-pc-linux-gnu
checking host system type... Invalid configuration ARM-buildroot-linux-gnueabihf': machine ARM-buildroot' not recognized
configure: error: /bin/sh ./config.sub ARM-buildroot-linux-gnueabihf failed package/pkg-generic.mk:206: recipe for target '/sf/ArriaX/ltsi_4_1_33/buildroot/output/build/valgrind-3.12.0/.stamp_configured' failed
make: *** [/sf/ArriaX/ltsi_4_1_33/buildroot/output/build/valgrind-3.12.0/.stamp_configured] Error 1*

--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Altera-SoC-Buildroot-external-toolchain-incompatible-error-tp164744p164824.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.