UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
22,993 Views
Registered: ‎03-09-2017

Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution

I am trying to cross compile my netperf-2.7.0 by downloading it and in the source directory of netperf-2.7.0 , configuring configure to compile for my arm cortex A9 using the following command

./configure CC=/opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi-gcc --host arm --config-cache

But the following message is being displayed

 

configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
configure: creating cache config.cache
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-none
checking target system type... arm-unknown-none
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for arm-gcc... /opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi-gcc
checking whether the C compiler works... no
configure: error: in `/home/Downloads/netperf-2.7.0':
configure: error: C compiler cannot create executables
See `config.log' for more details

Do i need to set any build environment for xilinx tool chain inorder to cross compile the downloaded source code for the netperf?

0 Kudos
1 Solution

Accepted Solutions
Voyager
Voyager
32,387 Views
Registered: ‎06-24-2013

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution

Hey @jenny_august13,

 

 ./configure CC=/opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi-gcc --host arm --config-cache

When you use the CC= option for configure, you need to specify a path to an executable.

As you already checked, /opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi-gcc is not an executable, so configure fails to use it as such.

 

You can find the executable under bin, so here for example it is /opt/Xilinx/SDK/2017.1/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gcc

 

Is it possible to cross compile and generate binaries not with the arm-xilinx tool chain but with external arm cross compilers and run over the zc706.

Yes, as long as the ABI is the same and the libraries used for linking match the libraries on the target system.

 

Best,

Herbert

-------------- Yes, I do this for fun!

View solution in original post

10 Replies
Voyager
Voyager
22,987 Views
Registered: ‎06-24-2013

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution

Hey @jenny_august13

 

See `config.log' for more details

 

Best,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Explorer
Explorer
22,982 Views
Registered: ‎03-09-2017

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution
Yeah it says..

./configure: line 3285: /opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi-gcc: No such file or directory
0 Kudos
Voyager
Voyager
22,976 Views
Registered: ‎06-24-2013

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution

Hey @jenny_august13,

 

./configure: line 3285: /opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi-gcc: No such file or directory

And, does it exist?

If so, is it executable?

 

Best,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Explorer
Explorer
22,957 Views
Registered: ‎03-09-2017

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution

Ahh.. i understood, it doesnot exist but when we want to cross compile we will export the path, set build environment and then cross compile but when i do in the regular manner, it shows this following message..

 

 

export ARCH=arm
export PATH=/opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi/bin/
export CROSS_COMPILE=arm-xilinx-linux-gnueabi

source /opt/pkg/peta2017.1/Xilinx/SDK/2017.1/settings64.sh 

./configure CC=/opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi -gcc --host arm --config-cache

It is showing the following error

./configure: line 434: sed: command not found
./configure: line 433: expr: command not found
./configure: line 434: sed: command not found
./configure: line 448: sed: command not found
: error: cannot create .lineno; rerun with a POSIX shell
0 Kudos
Explorer
Explorer
22,954 Views
Registered: ‎03-09-2017

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution

I tried this way also

source /opt/pkg/peta2017.1/components/yocto/source/arm/environment-setup-cortexa9hf-neon-xilinx-linux-gnueabi 
SDK environment now set up; additionally you may now run devtool to perform development tasks.
Run devtool --help for further details.

It displays same message

 ./configure CC=/opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi-gcc --host arm --config-cache
configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
configure: loading site script /opt/pkg/peta2017.1/components/yocto/source/arm/site-config-cortexa9hf-neon-xilinx-linux-gnueabi
configure: loading cache config.cache
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-none
checking target system type... arm-unknown-none
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-strip... arm-xilinx-linux-gnueabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for arm-gcc... /opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi-gcc
checking whether the C compiler works... no
configure: error: in `/home/Downloads/netperf-2.7.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
0 Kudos
Explorer
Explorer
22,951 Views
Registered: ‎03-09-2017

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution

Is it possible to cross compile and generate binaries not with the arm-xilinx tool chain but with external arm cross compilers and run over the zc706.

0 Kudos
Moderator
Moderator
22,933 Views
Registered: ‎11-09-2015

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution

Hi @jenny_august13,

 

Is your host system "/bin/sh"  bash? If you are using Ubuntu distribution and your "/bin/sh" is dash, you can consult your system administrator to change your default with sudo dpkg-reconfigure dash command.

 

I know petalinux is expecting bah. This could be the same with the cross compile toolchain in SDK.

 

Hope that helps,

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Voyager
Voyager
32,388 Views
Registered: ‎06-24-2013

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution

Hey @jenny_august13,

 

 ./configure CC=/opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi-gcc --host arm --config-cache

When you use the CC= option for configure, you need to specify a path to an executable.

As you already checked, /opt/pkg/peta2017.1/Xilinx/SDK/2017.1/gnu/arm/lin/arm-xilinx-linux-gnueabi-gcc is not an executable, so configure fails to use it as such.

 

You can find the executable under bin, so here for example it is /opt/Xilinx/SDK/2017.1/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gcc

 

Is it possible to cross compile and generate binaries not with the arm-xilinx tool chain but with external arm cross compilers and run over the zc706.

Yes, as long as the ABI is the same and the libraries used for linking match the libraries on the target system.

 

Best,

Herbert

-------------- Yes, I do this for fun!

View solution in original post

Explorer
Explorer
22,672 Views
Registered: ‎03-09-2017

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution
Yes, got it.... thankyou so much, you helped me to get progress in my project.... now I am able to cross compile netperf for both arm and armhf platforms.
0 Kudos
Voyager
Voyager
12,349 Views
Registered: ‎06-24-2013

Re: Configure: error: C compiler cannot create executables when i used arm-xilinx-linux-gnueabi-gcc

Jump to solution

You're welcome!

 

All the best,

Herbert

-------------- Yes, I do this for fun!
0 Kudos