Hi all, <br>I am a newbie for cfs and want to build linux system for my arm board. Because I haven't find arm with eglibc in clfs1.2. So I have to choose Cross-Compiled Linux From Scratch - Sysroot - Version SVN-0.0.1-20090726-ARM book to build my arm linux system.<br>
<br>I meet a problem when I build gcc-4.4.1 cross compiler final according to "5.12 gcc-4.4.1-cross compiler final" , here is a error log:<br><br>-------------------------------------------------------------------------------------------------------------------------------------<br>
checking for arm-unknown-linux-gnu-strip... /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/strip<br>checking for arm-unknown-linux-gnu-gcc... /home/zxx/sysroot/build/gcc-build/./gcc/xgcc -B/home/zxx/sysroot/build/gcc-build/./gcc/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/lib/ -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/include -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/sys-include<br>
checking for C compiler default output file name... configure: error: in `/home/zxx/sysroot/build/gcc-build/arm-unknown-linux-gnu/libgomp':<br>configure: error: C compiler cannot create executables<br>See `config.log' for more details.<br>
make[1]: *** [configure-target-libgomp] Error 1<br>make[1]: Leaving directory `/home/zxx/sysroot/build/gcc-build'<br>make: *** [all] Error 2<br>exit<br>-------------------------------------------------------------------------------------------------------------------------------------<br>
<br><br>and there is libgomp config.log:<br><br><br>--------------------------------------------------------------------------------------------------------------------------------------<br>This file contains any messages produced by compilers while<br>
running configure, to aid debugging if configure makes a mistake.<br><br>It was created by GNU OpenMP Runtime Library configure 1.0, which was<br>generated by GNU Autoconf 2.59.  Invocation command line was<br><br>  $ /home/zxx/sysroot/build/gcc-4.4.1/libgomp/configure --cache-file=./config.cache --with-cross-host=i486-cross-linux-gnu --prefix=/home/zxx/sysroot/clfs/cross-tools --disable-multilib --with-sysroot=/home/zxx/sysroot/clfs --disable-nls --enable-shared --enable-__cxa_atexit --with-mpfr=/home/zxx/sysroot/clfs/cross-tools --with-gmp=/home/zxx/sysroot/clfs/cross-tools --with-ppl=/home/zxx/sysroot/clfs/cross-tools --with-cloog=/home/zxx/sysroot/clfs/cross-tools --enable-c99 --enable-long-long --enable-threads=posix --enable-languages=c,c++ --program-transform-name=s,^,arm-unknown-linux-gnu-, --with-target-subdir=arm-unknown-linux-gnu --build=i486-cross-linux-gnu --host=arm-unknown-linux-gnu --target=arm-unknown-linux-gnu --srcdir=../../../gcc-4.4.1/libgomp<br>
<br>## --------- ##<br>## Platform. ##<br>## --------- ##<br><br>hostname = zxx<br>uname -m = i686<br>uname -r = 2.6.24-26-generic<br>uname -s = Linux<br>uname -v = #1 SMP Tue Dec 1 18:37:31 UTC 2009<br><br>/usr/bin/uname -p = unknown<br>
/bin/uname -X     = unknown<br><br>/bin/arch              = unknown<br>/usr/bin/arch -k       = unknown<br>/usr/convex/getsysinfo = unknown<br>hostinfo               = unknown<br>/bin/machine           = unknown<br>/usr/bin/oslevel       = unknown<br>
/bin/universe          = unknown<br><br>PATH: /home/zxx/sysroot/clfs/cross-tools/bin<br>PATH: /bin<br>PATH: /usr/bin<br><br><br>## ----------- ##<br>## Core tests. ##<br>## ----------- ##<br><br>configure:1399: loading cache ./config.cache<br>
configure:1516: checking for --enable-version-specific-runtime-libs<br>configure:1533: result: no<br>configure:1541: checking for --enable-generated-files-in-srcdir<br>configure:1558: result: no<br>configure:1621: checking build system type<br>
configure:1639: result: i486-cross-linux-gnu<br>configure:1647: checking host system type<br>configure:1661: result: arm-unknown-linux-gnu<br>configure:1669: checking target system type<br>configure:1683: result: arm-unknown-linux-gnu<br>
configure:1725: checking for a BSD-compatible install<br>configure:1791: result: /usr/bin/install -c<br>configure:1802: checking whether build environment is sane<br>configure:1845: result: yes<br>configure:1910: checking for gawk<br>
configure:1926: found /usr/bin/gawk<br>configure:1936: result: gawk<br>configure:1946: checking whether make sets $(MAKE)<br>configure:1966: result: yes<br>configure:2042: checking for arm-unknown-linux-gnu-strip<br>configure:2068: result: /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/strip<br>
configure:2220: checking for arm-unknown-linux-gnu-gcc<br>configure:2246: result: /home/zxx/sysroot/build/gcc-build/./gcc/xgcc -B/home/zxx/sysroot/build/gcc-build/./gcc/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/lib/ -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/include -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/sys-include<br>
configure:2530: checking for C compiler version<br>configure:2533: /home/zxx/sysroot/build/gcc-build/./gcc/xgcc -B/home/zxx/sysroot/build/gcc-build/./gcc/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/lib/ -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/include -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/sys-include --version </dev/null >&5<br>
xgcc (GCC for Cross-LFS 4.4.1.20090722) 4.4.1<br>Copyright (C) 2009 Free Software Foundation, Inc.<br>This is free software; see the source for copying conditions.  There is NO<br>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br>
<br>configure:2536: $? = 0<br>configure:2538: /home/zxx/sysroot/build/gcc-build/./gcc/xgcc -B/home/zxx/sysroot/build/gcc-build/./gcc/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/lib/ -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/include -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/sys-include -v </dev/null >&5<br>
Reading specs from /home/zxx/sysroot/build/gcc-build/./gcc/specs<br>Target: arm-unknown-linux-gnu<br>Configured with: ../gcc-4.4.1/configure --prefix=/home/zxx/sysroot/clfs/cross-tools --build=i486-cross-linux-gnu --host=i486-cross-linux-gnu --target=arm-unknown-linux-gnu --disable-multilib --with-sysroot=/home/zxx/sysroot/clfs --disable-nls --enable-shared --enable-languages=c,c++ --enable-__cxa_atexit --with-mpfr=/home/zxx/sysroot/clfs/cross-tools --with-gmp=/home/zxx/sysroot/clfs/cross-tools --with-ppl=/home/zxx/sysroot/clfs/cross-tools --with-cloog=/home/zxx/sysroot/clfs/cross-tools --enable-c99 --enable-long-long --enable-threads=posix<br>
Thread model: posix<br>gcc version 4.4.1 (GCC for Cross-LFS 4.4.1.20090722) <br>configure:2541: $? = 0<br>configure:2543: /home/zxx/sysroot/build/gcc-build/./gcc/xgcc -B/home/zxx/sysroot/build/gcc-build/./gcc/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/lib/ -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/include -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/sys-include -V </dev/null >&5<br>
xgcc: '-V' must come at the start of the command line<br>configure:2546: $? = 1<br>configure:2569: checking for C compiler default output file name<br>configure:2572: /home/zxx/sysroot/build/gcc-build/./gcc/xgcc -B/home/zxx/sysroot/build/gcc-build/./gcc/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/lib/ -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/include -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/sys-include -g -O2     conftest.c  >&5<br>
/home/zxx/sysroot/build/gcc-build/./gcc/cc1: error while loading shared libraries: /home/zxx/sysroot/build/gcc-build/./gcc/libgcc_s.so.1: ELF file OS ABI invalid<br>configure:2575: $? = 1<br>configure: failed program was:<br>
| /* confdefs.h.  */<br>| <br>| #define PACKAGE_NAME "GNU OpenMP Runtime Library"<br>| #define PACKAGE_TARNAME "libgomp"<br>| #define PACKAGE_VERSION "1.0"<br>| #define PACKAGE_STRING "GNU OpenMP Runtime Library 1.0"<br>
| #define PACKAGE_BUGREPORT ""<br>| #define PACKAGE "libgomp"<br>| #define VERSION "1.0"<br>| /* end confdefs.h.  */<br>| <br>| int<br>| main ()<br>| {<br>| <br>|   ;<br>|   return 0;<br>| }<br>
configure:2613: error: in `/home/zxx/sysroot/build/gcc-build/arm-unknown-linux-gnu/libgomp':<br>configure:2616: error: C compiler cannot create executables<br>See `config.log' for more details.<br><br>## ---------------- ##<br>
## Cache variables. ##<br>## ---------------- ##<br><br>ac_cv_build=i486-cross-linux-gnu<br>ac_cv_build_alias=i486-cross-linux-gnu<br>ac_cv_env_CPPFLAGS_set=set<br>ac_cv_env_CPPFLAGS_value=<br>ac_cv_env_CPP_set=<br>ac_cv_env_CPP_value=<br>
ac_cv_env_FCFLAGS_set=<br>ac_cv_env_FCFLAGS_value=<br>ac_cv_env_FC_set=<br>ac_cv_env_FC_value=<br>ac_cv_env_LDFLAGS_set=set<br>ac_cv_env_LDFLAGS_value=<br>ac_cv_env_build_alias_set=set<br>ac_cv_env_build_alias_value=i486-cross-linux-gnu<br>
ac_cv_env_host_alias_set=set<br>ac_cv_env_host_alias_value=arm-unknown-linux-gnu<br>ac_cv_env_target_alias_set=set<br>ac_cv_env_target_alias_value=arm-unknown-linux-gnu<br>ac_cv_host=arm-unknown-linux-gnu<br>ac_cv_host_alias=arm-unknown-linux-gnu<br>
ac_cv_prog_AWK=gawk<br>ac_cv_prog_CC='/home/zxx/sysroot/build/gcc-build/./gcc/xgcc -B/home/zxx/sysroot/build/gcc-build/./gcc/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/lib/ -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/include -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/sys-include'<br>
ac_cv_prog_STRIP=/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/strip<br>ac_cv_prog_make_make_set=yes<br>ac_cv_target=arm-unknown-linux-gnu<br>ac_cv_target_alias=arm-unknown-linux-gnu<br><br>## ----------------- ##<br>
## Output variables. ##<br>## ----------------- ##<br><br>ACLOCAL='${SHELL} /home/zxx/sysroot/build/gcc-4.4.1/missing --run aclocal-1.9'<br>AMDEPBACKSLASH=''<br>AMDEP_FALSE=''<br>AMDEP_TRUE=''<br>
AMTAR='${SHELL} /home/zxx/sysroot/build/gcc-4.4.1/missing --run tar'<br>AR='/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/ar'<br>AUTOCONF='${SHELL} /home/zxx/sysroot/build/gcc-4.4.1/missing --run autoconf'<br>
AUTOHEADER='${SHELL} /home/zxx/sysroot/build/gcc-4.4.1/missing --run autoheader'<br>AUTOMAKE='${SHELL} /home/zxx/sysroot/build/gcc-4.4.1/missing --run automake-1.9'<br>AWK='gawk'<br>BUILD_INFO_FALSE=''<br>
BUILD_INFO_TRUE=''<br>CC='/home/zxx/sysroot/build/gcc-build/./gcc/xgcc -B/home/zxx/sysroot/build/gcc-build/./gcc/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/ -B/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/lib/ -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/include -isystem /home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/sys-include'<br>
CCDEPMODE=''<br>CFLAGS='-g -O2  '<br>CPP=''<br>CPPFLAGS=''<br>CYGPATH_W='echo'<br>DEFS=''<br>DEPDIR=''<br>DSYMUTIL=''<br>DUMPBIN=''<br>ECHO_C=''<br>
ECHO_N='-n'<br>ECHO_T=''<br>EGREP=''<br>EXEEXT=''<br>FC=''<br>FCFLAGS=''<br>FGREP=''<br>GENINSRC_FALSE=''<br>GENINSRC_TRUE='#'<br>GREP=''<br>
INSTALL_DATA='/usr/bin/install -c -m 644'<br>INSTALL_PROGRAM='/usr/bin/install -c'<br>INSTALL_SCRIPT='/usr/bin/install -c'<br>INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'<br>LD='/home/zxx/sysroot/build/gcc-build/./gcc/collect-ld'<br>
LDFLAGS=''<br>LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE=''<br>LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE=''<br>LIBOBJS=''<br>LIBS=''<br>LIBTOOL=''<br>LIPO='arm-unknown-linux-gnu-lipo'<br>
LN_S=''<br>LTLIBOBJS=''<br>MAINT=''<br>MAINTAINER_MODE_FALSE=''<br>MAINTAINER_MODE_TRUE=''<br>MAKEINFO='makeinfo --split-size=5000000'<br>NM='/home/zxx/sysroot/build/gcc-build/./gcc/nm'<br>
NMEDIT=''<br>OBJDUMP='/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/objdump'<br>OBJEXT=''<br>OMP_LOCK_25_ALIGN=''<br>OMP_LOCK_25_KIND=''<br>OMP_LOCK_25_SIZE=''<br>
OMP_LOCK_ALIGN=''<br>OMP_LOCK_KIND=''<br>OMP_LOCK_SIZE=''<br>OMP_NEST_LOCK_25_ALIGN=''<br>OMP_NEST_LOCK_25_KIND=''<br>OMP_NEST_LOCK_25_SIZE=''<br>OMP_NEST_LOCK_ALIGN=''<br>
OMP_NEST_LOCK_KIND=''<br>OMP_NEST_LOCK_SIZE=''<br>OPT_LDFLAGS=''<br>OTOOL64=''<br>OTOOL=''<br>PACKAGE='libgomp'<br>PACKAGE_BUGREPORT=''<br>PACKAGE_NAME='GNU OpenMP Runtime Library'<br>
PACKAGE_STRING='GNU OpenMP Runtime Library 1.0'<br>PACKAGE_TARNAME='libgomp'<br>PACKAGE_VERSION='1.0'<br>PATH_SEPARATOR=':'<br>PERL=''<br>RANLIB='/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/ranlib'<br>
SECTION_LDFLAGS=''<br>SED=''<br>SET_MAKE=''<br>SHELL='/bin/bash'<br>STRIP='/home/zxx/sysroot/clfs/cross-tools/arm-unknown-linux-gnu/bin/strip'<br>USE_FORTRAN_FALSE=''<br>USE_FORTRAN_TRUE=''<br>
VERSION='1.0'<br>XCFLAGS=''<br>XLDFLAGS=''<br>ac_ct_AR=''<br>ac_ct_CC=''<br>ac_ct_DSYMUTIL=''<br>ac_ct_DUMPBIN=''<br>ac_ct_FC=''<br>ac_ct_LIPO=''<br>
ac_ct_NMEDIT=''<br>ac_ct_OBJDUMP=''<br>ac_ct_OTOOL64=''<br>ac_ct_OTOOL=''<br>ac_ct_RANLIB=''<br>ac_ct_STRIP=''<br>am__fastdepCC_FALSE=''<br>am__fastdepCC_TRUE=''<br>
am__include=''<br>am__leading_dot='.'<br>am__quote=''<br>am__tar='${AMTAR} chof - "$$tardir"'<br>am__untar='${AMTAR} xf -'<br>bindir='${exec_prefix}/bin'<br>build='i486-cross-linux-gnu'<br>
build_alias='i486-cross-linux-gnu'<br>build_cpu='i486'<br>build_os='linux-gnu'<br>build_vendor='cross'<br>config_path=''<br>datadir='${prefix}/share'<br>enable_shared='yes'<br>
enable_static=''<br>exec_prefix='NONE'<br>host='arm-unknown-linux-gnu'<br>host_alias='arm-unknown-linux-gnu'<br>host_cpu='arm'<br>host_os='linux-gnu'<br>host_vendor='unknown'<br>
includedir='${prefix}/include'<br>infodir='${prefix}/info'<br>install_sh='/home/zxx/sysroot/build/gcc-4.4.1/install-sh'<br>libdir='${exec_prefix}/lib'<br>libexecdir='${exec_prefix}/libexec'<br>
libtool_VERSION=''<br>link_gomp=''<br>localstatedir='${prefix}/var'<br>lt_ECHO='echo'<br>mandir='${prefix}/man'<br>mkdir_p='mkdir -p --'<br>multi_basedir='../../../gcc-4.4.1/libgomp/..'<br>
oldincludedir='/usr/include'<br>prefix='/home/zxx/sysroot/clfs/cross-tools'<br>program_transform_name='s,^,arm-unknown-linux-gnu-,'<br>sbindir='${exec_prefix}/sbin'<br>sharedstatedir='${prefix}/com'<br>
sysconfdir='${prefix}/etc'<br>target='arm-unknown-linux-gnu'<br>target_alias='arm-unknown-linux-gnu'<br>target_cpu='arm'<br>target_os='linux-gnu'<br>target_vendor='unknown'<br>
toolexecdir='$(exec_prefix)/$(target_alias)'<br>toolexeclibdir='$(toolexecdir)/lib'<br><br>## ----------- ##<br>## confdefs.h. ##<br>## ----------- ##<br><br>#define PACKAGE "libgomp"<br>#define PACKAGE_BUGREPORT ""<br>
#define PACKAGE_NAME "GNU OpenMP Runtime Library"<br>#define PACKAGE_STRING "GNU OpenMP Runtime Library 1.0"<br>#define PACKAGE_TARNAME "libgomp"<br>#define PACKAGE_VERSION "1.0"<br>
#define VERSION "1.0"<br><br>configure: exit 77<br><br>--------------------------------------------------------------------------------------------------------------------------------------<br><br><br><br>I search this error with google and find this guy have the same error with me:<br>
<br><a href="http://comments.gmane.org/gmane.linux.lfs.clfs.devel/1442">http://comments.gmane.org/gmane.linux.lfs.clfs.devel/1442</a><br><br>According thie url, I find the there are 3 solution to solve this problem:<br><br>
1. using 64bit linux to compile<br>2. change the configure of gcc (--enable-shared --> --disble-shared)<br>3. patch the gcc4.4.1<br><br>I think the best solution is patch gcc4.4.1, but this " <a href="http://quandary.cross-lfs.org/%7Eanimeloe/">http://quandary.cross-lfs.org/~animeloe/</a>" is not exist.<br>
<br>Could you give me this patch or some advice to solve this problem?<br><br>thanks<br><br><br><br><br><h1 class="sect1"><br></h1><br>