Hello All,
I am trying to cross-compile parsec benchmark for ARM for some experiments.
I have successfully compiled natively all the benchmarks, but when I use the
cross compiling tools I get some errors.
This is what I have done so far:
-Downloaded the source files of parsec 3.0, configured parsecmgmt tool and make
sure that can compile benchmarks natively.
-Applied the patch described here to compile for ARM.
(http://www.m5sim.org/PARSEC_benchmarks)
-Modified gcc.bldconf file to use cross compiling tools ( is this procedure
correct?):
# CC_HOME is installation root of the C compiler
export CC_HOME="/usr"
# BINUTIL_HOME is installation root of the GNU binutils
export BINUTIL_HOME="/usr"
# GNUTOOL_HOME is installation root of the GNU tools
export GNUTOOL_HOME="/usr"
# BINARY_PREFIX is the string which is used as prefix for the GNU binaries
export BINARY_PREFIX="arm-linux-gnueabi-"
<- I added the prefix in order to pint to the
cross-compile tools
# Compilers and preprocessors
export CC="${CC_HOME}/bin/${BINARY_PREFIX}gcc"
export CXX="${CC_HOME}/bin/${BINARY_PREFIX}g++"
export CPP="${CC_HOME}/bin/${BINARY_PREFIX}cpp"
-Build the binaries using parsecmgmt tool:
parsecmgmt -a build -p parsec.{benchmark} -c gcc
This command works for most of the benchmarks: blackscholes, canneal, facesim,
fluidanimate, freqmine, streamcluster and swaptions.
However for the rest: bodytrack, dedup, ferret, raytrace (reported not to work
in documentation), vips, x264 the compilation fails.
Thread model: posix
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1)
configure:2979: $? = 0
configure:2986: /usr/bin/arm-linux-gnueabi-gcc -V >&5
arm-linux-gnueabi-gcc: error: unrecognized command line option '-V'
arm-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
configure:2989: $? = 4
configure:3012: checking for C compiler default output file name
configure:3039: /usr/bin/arm-linux-gnueabi-gcc -O3 -g -mcpu=cortex-a9
-mfpu=neon -ftree-vectorize -mfloat-abi=softfp -ffast-math -funroll-loops
-fprefetch-loop-arrays -static -static-libgcc
-Wl,--hash-style=both,--as-needed -DPARSEC_VERSION=3.0-beta-20150206
-L/usr/lib64 -L/usr/lib -static conftest.c >&5
configure:3042: $? = 0
configure:3088: result: a.out
configure:3093: checking whether the C compiler works
<- Benchmark try to execute a arm binary?
configure:3103: ./a.out
/home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/src/configure:
line 3104: ./a.out: cannot execute binary file: Exec format error
configure:3106: $? = 126
configure:3115: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
According to the log file (attached) the benchmark generates a binary and then
try to execute it but since it is an i686 machine it fails and causes an error.
This is the common error for the failing benchmarks.
I dont know much about Parsec internals, can someone tell me what is happening
and how to fix this problem?
Raul.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Body Tracking Benchmark configure 1.0, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ /home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/src/configure --enable-threads --disable-openmp --disable-tbb --prefix=/home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/inst/amd64-linux.gcc
## --------- ##
## Platform. ##
## --------- ##
hostname = uom-box
uname -m = x86_64
uname -r = 3.19.0-30-generic
uname -s = Linux
uname -v = #34~14.04.1-Ubuntu SMP Fri Oct 2 22:09:39 UTC 2015
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /home/raul/Documents/benchmarks/parsec-3.0/bin
PATH: /home/raul/xilinx/DocNav
PATH: /home/raul/xilinx/Vivado/2015.3/bin
PATH: /home/raul/xilinx/Vivado_HLS/2015.3/bin
PATH: /home/raul/xilinx/SDK/2015.3/bin
PATH: /home/raul/xilinx/SDK/2015.3/gnu/microblaze/lin/bin
PATH: /home/raul/xilinx/SDK/2015.3/gnu/arm/lin/bin
PATH: /home/raul/xilinx/SDK/2015.3/gnu/microblaze/linux_toolchain/lin64_be/bin
PATH: /home/raul/xilinx/SDK/2015.3/gnu/microblaze/linux_toolchain/lin64_le/bin
PATH: /home/raul/xilinx/SDK/2015.3/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin
PATH: /home/raul/xilinx/SDK/2015.3/gnu/aarch32/lin/gcc-arm-none-eabi/bin
PATH: /home/raul/xilinx/SDK/2015.3/gnu/aarch64/lin/aarch64-linux/bin
PATH: /home/raul/xilinx/SDK/2015.3/gnu/aarch64/lin/aarch64-none/bin
PATH: /home/raul/xilinx/SDK/2015.3/gnu/armr5/lin/gcc-arm-none-eabi/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /home/raul/Documents/benchmarks/parsec-3.0/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1976: checking for a BSD-compatible install
configure:2032: result: /home/raul/Documents/benchmarks/parsec-3.0/bin/install -c
configure:2043: checking whether build environment is sane
configure:2086: result: yes
configure:2151: checking for gawk
configure:2167: found /usr/bin/gawk
configure:2178: result: gawk
configure:2189: checking whether /usr/bin/make sets $(MAKE)
configure:2210: result: yes
configure:2504: checking build system type
configure:2522: result: x86_64-unknown-linux-gnu
configure:2544: checking host system type
configure:2559: result: x86_64-unknown-linux-gnu
configure:2593: checking for style of include used by /usr/bin/make
configure:2621: result: GNU
configure:2694: checking for gcc
configure:2721: result: /usr/bin/arm-linux-gnueabi-gcc
configure:2959: checking for C compiler version
configure:2966: /usr/bin/arm-linux-gnueabi-gcc --version >&5
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2969: $? = 0
configure:2976: /usr/bin/arm-linux-gnueabi-gcc -v >&5
Using built-in specs.
COLLECT_GCC=/usr/bin/arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-12ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.7.3 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-gnu-unique-object --disable-libmudflap --disable-libitm --enable-plugin --with-system-zlib --enable-objc-gc --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv5t --with-float=soft --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include
Thread model: posix
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1)
configure:2979: $? = 0
configure:2986: /usr/bin/arm-linux-gnueabi-gcc -V >&5
arm-linux-gnueabi-gcc: error: unrecognized command line option '-V'
arm-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
configure:2989: $? = 4
configure:3012: checking for C compiler default output file name
configure:3039: /usr/bin/arm-linux-gnueabi-gcc -O3 -g -mcpu=cortex-a9 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -ffast-math -funroll-loops -fprefetch-loop-arrays -static -static-libgcc -Wl,--hash-style=both,--as-needed -DPARSEC_VERSION=3.0-beta-20150206 -L/usr/lib64 -L/usr/lib -static conftest.c >&5
configure:3042: $? = 0
configure:3088: result: a.out
configure:3093: checking whether the C compiler works
configure:3103: ./a.out
/home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/src/configure: line 3104: ./a.out: cannot execute binary file: Exec format error
configure:3106: $? = 126
configure:3115: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=/usr/bin/arm-linux-gnueabi-gcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-O3 -g -mcpu=cortex-a9 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -ffast-math -funroll-loops -fprefetch-loop-arrays -static -static-libgcc -Wl,--hash-style=both,--as-needed -DPARSEC_VERSION=3.0-beta-20150206'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value=/usr/bin/arm-linux-gnueabi-cpp
ac_cv_env_CXXCPP_set=set
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-O3 -g -mcpu=cortex-a9 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -ffast-math -funroll-loops -fprefetch-loop-arrays -fpermissive -fno-exceptions -static -static-libgcc -Wl,--hash-style=both,--as-needed -DPARSEC_VERSION=3.0-beta-20150206 -fexceptions'
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value=/usr/bin/arm-linux-gnueabi-g++
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-L/usr/lib64 -L/usr/lib -static'
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_path_install='/home/raul/Documents/benchmarks/parsec-3.0/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=/usr/bin/arm-linux-gnueabi-gcc
ac_cv_prog_make__usr_bin_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/src/missing --run aclocal-1.9'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/src/missing --run tar'
AR='/usr/bin/arm-linux-gnueabi-ar'
AUTOCONF='${SHELL} /home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/src/missing --run autoconf'
AUTOHEADER='${SHELL} /home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/src/missing --run autoheader'
AUTOMAKE='${SHELL} /home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/src/missing --run automake-1.9'
AWK='gawk'
CC='/usr/bin/arm-linux-gnueabi-gcc'
CCDEPMODE=''
CFLAGS='-O3 -g -mcpu=cortex-a9 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -ffast-math -funroll-loops -fprefetch-loop-arrays -static -static-libgcc -Wl,--hash-style=both,--as-needed -DPARSEC_VERSION=3.0-beta-20150206'
CPP='/usr/bin/arm-linux-gnueabi-cpp'
CPPFLAGS=''
CXX='/usr/bin/arm-linux-gnueabi-g++'
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS='-O3 -g -mcpu=cortex-a9 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -ffast-math -funroll-loops -fprefetch-loop-arrays -fpermissive -fno-exceptions -static -static-libgcc -Wl,--hash-style=both,--as-needed -DPARSEC_VERSION=3.0-beta-20150206 -fexceptions'
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_OPENMP=''
ENABLE_OPENMP_FALSE=''
ENABLE_OPENMP_TRUE=''
ENABLE_TBB=''
ENABLE_TBB_FALSE=''
ENABLE_TBB_TRUE=''
ENABLE_THREADS=''
ENABLE_THREADS_FALSE=''
ENABLE_THREADS_TRUE=''
EXEEXT=''
F77=''
FFLAGS=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS='-L/usr/lib64 -L/usr/lib -static'
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/src/missing --run makeinfo'
OBJEXT=''
PACKAGE='body-tracking-benchmark'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_NAME='Body Tracking Benchmark'
PACKAGE_STRING='Body Tracking Benchmark 1.0'
PACKAGE_TARNAME='body-tracking-benchmark'
PACKAGE_VERSION='1.0'
PATH_SEPARATOR=':'
RANLIB='/usr/bin/arm-linux-gnueabi-ranlib'
SED=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP='/usr/bin/arm-linux-gnueabi-strip'
VERSION='1.0'
ac_ct_CC='/usr/bin/arm-linux-gnueabi-gcc'
ac_ct_CXX=''
ac_ct_F77=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include='include'
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='/home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/src/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/raul/Documents/benchmarks/parsec-3.0/pkgs/apps/bodytrack/inst/amd64-linux.gcc'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME "Body Tracking Benchmark"
#define PACKAGE_TARNAME "body-tracking-benchmark"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "Body Tracking Benchmark 1.0"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE "body-tracking-benchmark"
#define VERSION "1.0"
configure: exit 1
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users