09-22-2017 02:18 AM - edited 09-22-2017 02:19 AM
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?
09-22-2017 09:49 AM
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
09-22-2017 02:23 AM
Hey @jenny_august13
See `config.log' for more details
Best,
Herbert
09-22-2017 02:24 AM
09-22-2017 02:26 AM
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
09-22-2017 02:33 AM
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
09-22-2017 02:41 AM
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
09-22-2017 02:47 AM - edited 09-22-2017 02:50 AM
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.
09-22-2017 03:00 AM
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
09-22-2017 09:49 AM
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
09-23-2017 05:51 AM
09-23-2017 10:13 AM
You're welcome!
All the best,
Herbert