GCC 5.1.0-4 交叉编译器构建失败

GCC 5.1.0-4 cross compiler build fail

我正在学习 osdev.org 裸机教程,但我目前停留在 cross compiler.!我正在从 arch 发行版构建。

看来可能是isl的问题。我认为该教程是基于旧版本的 gcc、cloog、isl 等,所以在尝试了几次之后,我开始使用新的源代码并将 cloog 和 isl 排除在源文件之外(教程说它们是可选的)。

此外,本教程说某些 cloog 和 isl 实现存在兼容性问题。我不知道那是针对我正在构建的机器还是针对目标,所以我只在我的主机上安装了 cloog,根据 the cloog page. ,它应该带有自己的嵌入式 isl!我是否还应该为构建过程安装另一个 isl(可能是 12.2?)?这甚至是我的问题吗?日志中有红色鲱鱼错误,所以我不确定我是否应该关注日志第 100 行的 libisl.so.13 错误。

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

这是我第一次没有找到我的答案,很抱歉任何新手海报问题。

我的理解是 gcc-5.x 不再需要 CLooG。建议您使用isl-0.14可用here or here. You might find the current (gcc-5.1) instructions at Linux from Scratch有帮助。毫无疑问,配置选项有 很多,因此很难知道构建的最佳选项,尤其是在构建 'stage 1' (独立式) gcc.