hello
i think i have installed the freedom-e-sdk, but i’m unable to compile a test project.
configure: error: C compiler cannot create executables
the full log is this one:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by freedom-metal configure v0.1.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ /home/.../code/riscv/freedom-e-sdk/freedom-metal/configure --host=riscv64-unknown-elf --prefix=/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/install --libdir=/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/install/lib/debug --with-builtin-libgloss --with-machine-header=/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/metal.h --with-machine-inline=/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/metal-inline.h --with-platform-header=/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/metal-platform.h
## --------- ##
## Platform. ##
## --------- ##
hostname = silver
uname -m = x86_64
uname -r = 5.8.0-1-amd64
uname -s = Linux
uname -v = #1 SMP Debian 5.8.7-1 (2020-09-05)
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /opt/riscv/bin
PATH: /home/user/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/local/games
PATH: /usr/games
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1904: checking for a BSD-compatible install
configure:1972: result: /usr/bin/install -c
configure:1983: checking whether build environment is sane
configure:2038: result: yes
configure:2095: checking for riscv64-unknown-elf-strip
configure:2111: found /opt/riscv/bin/riscv64-unknown-elf-strip
configure:2122: result: riscv64-unknown-elf-strip
configure:2187: checking for a thread-safe mkdir -p
configure:2226: result: /usr/bin/mkdir -p
configure:2233: checking for gawk
configure:2249: found /usr/bin/gawk
configure:2260: result: gawk
configure:2271: checking whether make sets $(MAKE)
configure:2293: result: yes
configure:2322: checking whether make supports nested variables
configure:2339: result: yes
configure:2466: checking whether to enable maintainer-specific portions of Makefiles
configure:2475: result: no
configure:2494: checking build system type
configure:2508: result: x86_64-pc-linux-gnu
configure:2528: checking host system type
configure:2541: result: riscv64-unknown-elf
configure:2571: checking for riscv64-unknown-elf-gcc
configure:2587: found /opt/riscv/bin/riscv64-unknown-elf-gcc
configure:2598: result: riscv64-unknown-elf-gcc
configure:2867: checking for C compiler version
configure:2876: riscv64-unknown-elf-gcc --version >&5
riscv64-unknown-elf-gcc (GCC) 10.1.0
Copyright (C) 2020 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:2887: $? = 0
configure:2876: riscv64-unknown-elf-gcc -v >&5
Using built-in specs.
COLLECT_GCC=riscv64-unknown-elf-gcc
COLLECT_LTO_WRAPPER=/opt/riscv/libexec/gcc/riscv64-unknown-elf/10.1.0/lto-wrapper
Target: riscv64-unknown-elf
Configured with: /home/.../code/riscv/riscv-gnu-toolchain/riscv-gcc/configure --target=riscv64-unknown-elf --prefix=/opt/riscv --disable-shared --disable-threads --enable-languages=c,c++ --with-system-zlib --enable-tls --with-newlib --with-sysroot=/opt/riscv/riscv64-unknown-elf --with-native-system-header-dir=/include --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls --disable-tm-clone-registry --src=.././riscv-gcc --disable-multilib --with-abi=lp64d --with-arch=rv64imafdc --with-tune=rocket 'CFLAGS_FOR_TARGET=-Os -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-Os -mcmodel=medlow'
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.1.0 (GCC)
configure:2887: $? = 0
configure:2876: riscv64-unknown-elf-gcc -V >&5
riscv64-unknown-elf-gcc: error: unrecognized command-line option '-V'
riscv64-unknown-elf-gcc: fatal error: no input files
compilation terminated.
configure:2887: $? = 1
configure:2876: riscv64-unknown-elf-gcc -qversion >&5
riscv64-unknown-elf-gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
riscv64-unknown-elf-gcc: fatal error: no input files
compilation terminated.
configure:2887: $? = 1
configure:2907: checking whether the C compiler works
configure:2929: riscv64-unknown-elf-gcc -march=rv32imac -mabi=ilp32 -mcmodel=medlow -ffunction-sections -fdata-sections -I/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/install/include --specs=nano.specs -DMTIME_RATE_HZ_DEF=32768 -O0 -g conftest.c >&5
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/crt0.o: ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/crt0.o
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/crtbegin.o: ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/crtbegin.o
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libg_nano.a(lib_a-exit.o): ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libg_nano.a(lib_a-exit.o)
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libg_nano.a(lib_a-impure.o): ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libg_nano.a(lib_a-impure.o)
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libg_nano.a(lib_a-init.o): ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libg_nano.a(lib_a-init.o)
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libg_nano.a(lib_a-memset.o): ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libg_nano.a(lib_a-memset.o)
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libgloss_nano.a(sys_exit.o): ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libgloss_nano.a(sys_exit.o)
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-errno.o): ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libc_nano.a(lib_a-errno.o)
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/crtend.o: ABI is incompatible with that of the selected emulation:
target emulation `elf64-littleriscv' does not match `elf32-littleriscv'
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: failed to merge target specific data of file /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/crtend.o
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: a.out(.text.exit): relocation "_exit+0x0 (type R_RISCV_CALL)" goes out of range
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: /opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/lib/libg_nano.a(lib_a-exit.o): file class ELFCLASS64 incompatible with ELFCLASS32
/opt/riscv/lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: final link failed: file in wrong format
collect2: error: ld returned 1 exit status
configure:2933: $? = 1
configure:2971: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "freedom-metal"
| #define PACKAGE_TARNAME "freedom-metal"
| #define PACKAGE_VERSION "v0.1.2"
| #define PACKAGE_STRING "freedom-metal v0.1.2"
| #define PACKAGE_BUGREPORT "https://github.com/sifive/freedom-metal/issues"
| #define PACKAGE_URL "https://github.com/sifive/freedom-metal"
| #define PACKAGE "freedom-metal"
| #define VERSION "v0.1.2"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2976: error: in `/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/build/debug':
configure:2978: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_CCASFLAGS_set=
ac_cv_env_CCASFLAGS_value=
ac_cv_env_CCAS_set=
ac_cv_env_CCAS_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-march=rv32imac -mabi=ilp32 -mcmodel=medlow -ffunction-sections -fdata-sections -I/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/install/include --specs=nano.specs -DMTIME_RATE_HZ_DEF=32768 -O0 -g'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=riscv64-unknown-elf
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=riscv64-unknown-elf
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_CC=riscv64-unknown-elf-gcc
ac_cv_prog_STRIP=riscv64-unknown-elf-strip
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /home/.../code/riscv/freedom-e-sdk/freedom-metal/missing aclocal-1.15'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
AR=''
AUTOCONF='${SHELL} /home/.../code/riscv/freedom-e-sdk/freedom-metal/missing autoconf'
AUTOHEADER='${SHELL} /home/.../code/riscv/freedom-e-sdk/freedom-metal/missing autoheader'
AUTOMAKE='${SHELL} /home/.../code/riscv/freedom-e-sdk/freedom-metal/missing automake-1.15'
AWK='gawk'
CC='riscv64-unknown-elf-gcc'
CCAS=''
CCASDEPMODE=''
CCASFLAGS=''
CCDEPMODE=''
CFLAGS='-march=rv32imac -mabi=ilp32 -mcmodel=medlow -ffunction-sections -fdata-sections -I/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/install/include --specs=nano.specs -DMTIME_RATE_HZ_DEF=32768 -O0 -g'
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MACHINE_HEADER=''
MACHINE_INLINE=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /home/.../code/riscv/freedom-e-sdk/freedom-metal/missing makeinfo'
MKDIR_P='/usr/bin/mkdir -p'
OBJEXT=''
PACKAGE='freedom-metal'
PACKAGE_BUGREPORT='https://github.com/sifive/freedom-metal/issues'
PACKAGE_NAME='freedom-metal'
PACKAGE_STRING='freedom-metal v0.1.2'
PACKAGE_TARNAME='freedom-metal'
PACKAGE_URL='https://github.com/sifive/freedom-metal'
PACKAGE_VERSION='v0.1.2'
PATH_SEPARATOR=':'
PLATFORM_HEADER=''
RANLIB=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP='riscv64-unknown-elf-strip'
VERSION='v0.1.2'
WITH_BUILTIN_LIBGLOSS_FALSE=''
WITH_BUILTIN_LIBGLOSS_TRUE=''
WITH_BUILTIN_LIBMETAL_PICO_FALSE=''
WITH_BUILTIN_LIBMETAL_PICO_TRUE=''
WITH_BUILTIN_LIBMETAL_SEGGER_FALSE=''
WITH_BUILTIN_LIBMETAL_SEGGER_TRUE=''
ac_ct_AR=''
ac_ct_CC=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCCAS_FALSE=''
am__fastdepCCAS_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=' -I$(srcdir)'
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-pc-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='riscv64-unknown-elf'
host_alias='riscv64-unknown-elf'
host_cpu='riscv64'
host_os='elf'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/.../code/riscv/freedom-e-sdk/freedom-metal/install-sh'
libdir='/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/install/lib/debug'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/.../code/riscv/freedom-e-sdk/bsp/sifive-hifive1/install'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "freedom-metal"
#define PACKAGE_TARNAME "freedom-metal"
#define PACKAGE_VERSION "v0.1.2"
#define PACKAGE_STRING "freedom-metal v0.1.2"
#define PACKAGE_BUGREPORT "https://github.com/sifive/freedom-metal/issues"
#define PACKAGE_URL "https://github.com/sifive/freedom-metal"
#define PACKAGE "freedom-metal"
#define VERSION "v0.1.2"
configure: exit 77
first i thought i was having troubles with the RISCV GNU Toolchain, so i compiled it by hand (which took quite a while) but even after compiling i get the same error. any ideas?
arduino-ide seems to be able to compile some dummy-code for hifive1, but it doesn’t know the whereabouts of the “metal” libraries and such…