GCC 5.1.0-4 cross compiler build fail

982 views Asked by At

I'm following the osdev.org bare metal tutorial, and I'm currently stuck at the cross compiler.! I'm building from an arch distro.

It looks like it might be a problem with isl. I think the tutorial is based on an older version of gcc, cloog, isl, etc, so after a few tries I started over with new sources and left cloog and isl out of the source files (the tutorial says they are optional).

Also, the tutorial says there are compatibility issues with some cloog and isl implementations. I didn't know if that is for the machine I'm building from or if it's for the target, so I only installed cloog on my host machine, which supposedly brought along its own embedded isl according to the cloog page. ! Am I supposed to still install another isl (probably 12.2?) for the build process? Is that even my problem? There are red herring errors in the log, so I'm not sure I'm right to focus on the libisl.so.13 error at line 100 of the log.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Runtime Library configure 1.0, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ /home/imabadass/src/gcc-5.1.0/libgcc/configure --srcdir=../../../gcc-5.1.0/libgcc --cache-file=./config.cache --enable-multilib --with-cross-host=i686-pc-linux-gnu --prefix=/home/imabadass/opt/cross --disable-nls --without-headers --enable-languages=c,c++,lto --program-transform-name=s&^&i686-elf-& --disable-option-checking --with-target-subdir=i686-elf --build=i686-pc-linux-gnu --host=i686-elf --target=i686-elf

## --------- ##
## Platform. ##
## --------- ##

hostname = Worker
uname -m = i686
uname -r = 3.18.0-ARCH
uname -s = Linux
uname -v = #1 SMP PREEMPT Fri Feb 27 20:47:37 CST 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/imabadass/opt/cross/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /usr/lib/jvm/default/bin
PATH: /usr/bin/site_perl
PATH: /usr/bin/vendor_perl
PATH: /usr/bin/core_perl


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2026: creating cache ./config.cache
configure:2232: checking build system type
configure:2246: result: i686-pc-linux-gnu
configure:2266: checking host system type
configure:2279: result: i686-pc-elf
configure:2382: checking for --enable-version-specific-runtime-libs
configure:2395: result: no
configure:2443: checking for a BSD-compatible install
configure:2511: result: /usr/bin/install -c
configure:2527: checking for gawk
configure:2554: result: gawk
configure:2654: checking for i686-elf-ar
configure:2681: result: /home/imabadass/opt/cross/i686-elf/bin/ar
configure:2746: checking for i686-elf-lipo
configure:2773: result: i686-elf-lipo
configure:2838: checking for i686-elf-nm
configure:2865: result: /home/imabadass/src/build-gcc/./gcc/nm
configure:2930: checking for i686-elf-ranlib
configure:2957: result: /home/imabadass/opt/cross/i686-elf/bin/ranlib
configure:3022: checking for i686-elf-strip
configure:3049: result: /home/imabadass/opt/cross/i686-elf/bin/strip
configure:3111: checking whether ln -s works
configure:3115: result: yes
configure:3132: checking for i686-elf-gcc
configure:3159: result:  /home/imabadass/src/build-gcc/./gcc/xgcc -B/home/imabadass/src/build-gcc/./gcc/ -B/home/imabadass/opt/cross/i686-elf/bin/ -B/home/imabadass/opt/cross/i686-elf/lib/ -isystem /home/imabadass/opt/cross/i686-elf/include -isystem /home/imabadass/opt/cross/i686-elf/sys-include   
configure:3428: checking for C compiler version
configure:3437:  /home/imabadass/src/build-gcc/./gcc/xgcc -B/home/imabadass/src/build-gcc/./gcc/ -B/home/imabadass/opt/cross/i686-elf/bin/ -B/home/imabadass/opt/cross/i686-elf/lib/ -isystem /home/imabadass/opt/cross/i686-elf/include -isystem /home/imabadass/opt/cross/i686-elf/sys-include    --version >&5
xgcc (GCC) 5.1.0
Copyright (C) 2015 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:3448: $? = 0
configure:3437:  /home/imabadass/src/build-gcc/./gcc/xgcc -B/home/imabadass/src/build-gcc/./gcc/ -B/home/imabadass/opt/cross/i686-elf/bin/ -B/home/imabadass/opt/cross/i686-elf/lib/ -isystem /home/imabadass/opt/cross/i686-elf/include -isystem /home/imabadass/opt/cross/i686-elf/sys-include    -v >&5
Reading specs from /home/imabadass/src/build-gcc/./gcc/specs
COLLECT_GCC=/home/imabadass/src/build-gcc/./gcc/xgcc
COLLECT_LTO_WRAPPER=/home/imabadass/src/build-gcc/./gcc/lto-wrapper
Target: i686-elf
Configured with: ../gcc-5.1.0/configure --target=i686-elf --prefix=/home/imabadass/opt/cross --disable-nls --enable-languages=c,c++ --without-headers
Thread model: single
gcc version 5.1.0 (GCC) 
configure:3448: $? = 0
configure:3437:  /home/imabadass/src/build-gcc/./gcc/xgcc -B/home/imabadass/src/build-gcc/./gcc/ -B/home/imabadass/opt/cross/i686-elf/bin/ -B/home/imabadass/opt/cross/i686-elf/lib/ -isystem /home/imabadass/opt/cross/i686-elf/include -isystem /home/imabadass/opt/cross/i686-elf/sys-include    -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3448: $? = 1
configure:3437:  /home/imabadass/src/build-gcc/./gcc/xgcc -B/home/imabadass/src/build-gcc/./gcc/ -B/home/imabadass/opt/cross/i686-elf/bin/ -B/home/imabadass/opt/cross/i686-elf/lib/ -isystem /home/imabadass/opt/cross/i686-elf/include -isystem /home/imabadass/opt/cross/i686-elf/sys-include    -qversion >&5
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3448: $? = 1
configure:3464:  /home/imabadass/src/build-gcc/./gcc/xgcc -B/home/imabadass/src/build-gcc/./gcc/ -B/home/imabadass/opt/cross/i686-elf/bin/ -B/home/imabadass/opt/cross/i686-elf/lib/ -isystem /home/imabadass/opt/cross/i686-elf/include -isystem /home/imabadass/opt/cross/i686-elf/sys-include    -o conftest -g -O2   conftest.c  >&5
/home/imabadass/src/build-gcc/./gcc/cc1: error while loading shared libraries: libisl.so.13: cannot open shared object file: No such file or directory
configure:3467: $? = 1
configure:3655: checking for suffix of object files
configure:3677:  /home/imabadass/src/build-gcc/./gcc/xgcc -B/home/imabadass/src/build-gcc/./gcc/ -B/home/imabadass/opt/cross/i686-elf/bin/ -B/home/imabadass/opt/cross/i686-elf/lib/ -isystem /home/imabadass/opt/cross/i686-elf/include -isystem /home/imabadass/opt/cross/i686-elf/sys-include    -c -g -O2  conftest.c >&5
/home/imabadass/src/build-gcc/./gcc/cc1: error while loading shared libraries: libisl.so.13: cannot open shared object file: No such file or directory
configure:3681: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3695: error: in `/home/imabadass/src/build-gcc/i686-elf/libgcc':
configure:3698: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value=' /home/imabadass/src/build-gcc/./gcc/xgcc -B/home/imabadass/src/build-gcc/./gcc/ -B/home/imabadass/opt/cross/i686-elf/bin/ -B/home/imabadass/opt/cross/i686-elf/lib/ -isystem /home/imabadass/opt/cross/i686-elf/include -isystem /home/imabadass/opt/cross/i686-elf/sys-include   '
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-g -O2'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=i686-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i686-elf
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=i686-elf
ac_cv_host=i686-pc-elf
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AR=/home/imabadass/opt/cross/i686-elf/bin/ar
ac_cv_prog_AWK=gawk
ac_cv_prog_CC=' /home/imabadass/src/build-gcc/./gcc/xgcc -B/home/imabadass/src/build-gcc/./gcc/ -B/home/imabadass/opt/cross/i686-elf/bin/ -B/home/imabadass/opt/cross/i686-elf/lib/ -isystem /home/imabadass/opt/cross/i686-elf/include -isystem /home/imabadass/opt/cross/i686-elf/sys-include   '
ac_cv_prog_LIPO=i686-elf-lipo
ac_cv_prog_NM=/home/imabadass/src/build-gcc/./gcc/nm
ac_cv_prog_RANLIB=/home/imabadass/opt/cross/i686-elf/bin/ranlib
ac_cv_prog_STRIP=/home/imabadass/opt/cross/i686-elf/bin/strip

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='/home/imabadass/opt/cross/i686-elf/bin/ar'
AWK='gawk'
CC=' /home/imabadass/src/build-gcc/./gcc/xgcc -B/home/imabadass/src/build-gcc/./gcc/ -B/home/imabadass/opt/cross/i686-elf/bin/ -B/home/imabadass/opt/cross/i686-elf/lib/ -isystem /home/imabadass/opt/cross/i686-elf/include -isystem /home/imabadass/opt/cross/i686-elf/sys-include   '
CFLAGS='-g -O2'
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIPO='i686-elf-lipo'
LN_S='ln -s'
LTLIBOBJS=''
MAINT='#'
NM='/home/imabadass/src/build-gcc/./gcc/nm'
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='GNU C Runtime Library'
PACKAGE_STRING='GNU C Runtime Library 1.0'
PACKAGE_TARNAME='libgcc'
PACKAGE_URL='http://www.gnu.org/software/libgcc/'
PACKAGE_VERSION='1.0'
PATH_SEPARATOR=':'
PICFLAG='-fpic'
RANLIB='/home/imabadass/opt/cross/i686-elf/bin/ranlib'
SHELL='/bin/sh'
STRIP='/home/imabadass/opt/cross/i686-elf/bin/strip'
ac_ct_CC=''
accel_dir_suffix=''
asm_hidden_op=''
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias='i686-pc-linux-gnu'
build_cpu='i686'
build_libsubdir='build-i686-pc-linux-gnu'
build_os='linux-gnu'
build_subdir='build-i686-pc-linux-gnu'
build_vendor='pc'
cpu_type=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
decimal_float=''
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
double_type_size=''
dvidir='${docdir}'
enable_decimal_float=''
enable_shared='yes'
enable_vtable_verify='no'
exec_prefix='NONE'
extra_parts=''
fixed_point=''
force_explicit_eh_registry=''
host='i686-pc-elf'
host_alias='i686-elf'
host_cpu='i686'
host_noncanonical='i686-elf'
host_os='elf'
host_subdir='.'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
libgcc_topdir='../../../gcc-5.1.0/libgcc/..'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
long_double_type_size=''
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/imabadass/opt/cross'
program_transform_name='s&^&i686-elf-&'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
set_have_cc_tls=''
set_use_emutls=''
sfp_machine_header=''
sharedstatedir='${prefix}/com'
slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
sysconfdir='${prefix}/etc'
target_alias='i686-elf'
target_noncanonical='i686-elf'
target_subdir='i686-elf'
thread_header=''
tm_defines=''
tm_file=''
tmake_file=''
toolexecdir='$(exec_prefix)/$(target_noncanonical)'
toolexeclibdir='$(toolexecdir)/lib'
vis_hide=''
with_aix_soname='aix'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "GNU C Runtime Library"
#define PACKAGE_TARNAME "libgcc"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "GNU C Runtime Library 1.0"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL "http://www.gnu.org/software/libgcc/"

configure: exit 1

This is the first time I haven't found my answer from searching, so sorry about any noobie poster problems.

1

There are 1 answers

0
Brett Hale On BEST ANSWER

My understanding is that gcc-5.x no longer requires CLooG. It's recommended that you use isl-0.14 available here or here. You might find the current (gcc-5.1) instructions at Linux from Scratch helpful. There are a lot of configure options, as you are no doubt aware, so it's difficult to know the best options for your build, particularly if you're building a 'stage 1' (freestanding) gcc.