gcc4.3.2编不过去... 谁帮我看一下
时间:2009-01-20
来源:互联网
In file included from /usr/include/features.h:354, from /usr/include/stdio.h:28, from ../../../../gcc-4.3.2/libgcc/../gcc/tsystem.h:90, from ../../../../gcc-4.3.2/libgcc/../gcc/libgcc2.c:33: /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory make[5]: *** [_muldi3.o] Error 1 make[5]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-unknown-linux-gnu/32/libgcc' make[4]: *** [multi-do] Error 1 make[4]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc' make[3]: *** [all-multi] Error 2 make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc' make[2]: *** [all-stage1-target-libgcc] Error 2 make[2]: Leaving directory `/mnt/lfs/sources/gcc-build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/mnt/lfs/sources/gcc-build' make: *** [all] Error 2
作者: kimux 发布时间: 2009-01-20
如果我想要64位的系统。只能用CLFS?
http://cross-lfs.org/view/svn/x86_64/
纯64位好像比multilib简单一些。。
但是在一般桌面应用上 multilib 更好一些吧?
犹豫中~~现在应用纯64位应该也没什么太大问题吧,64位软件已经很普及了
作者: kimux 发布时间: 2009-01-20
如果你确定要做的话,再帮我个忙:
做完http://cross-lfs.org/view/svn/native...stem/mpfr.html这一步后把
ldd /tools/lib/libmpfr.so的结果贴出来。
我答应聚焦深空兄去做这个实验,可我一直没空。
作者: newper 发布时间: 2009-01-20
|
作者: newper
如果你感兴趣,可以试一下这个版本的CLFS:http://cross-lfs.org/view/svn/native/
如果你确定要做的话,再帮我个忙: 做完http://cross-lfs.org/view/svn/native...stem/mpfr.html这一步后把 ldd /tools/lib/libmpfr.so的结果贴出来。 我答应聚焦深空兄去做这个实验,可我一直没空。 |
纯64位哦。。 好吧,我现在去做,出结果了帖上来
作者: kimux 发布时间: 2009-01-20
作者: newper 发布时间: 2009-01-20
bash-3.2# ./version-check.sh bash, version 3.2.48(1)-release Binutils: (GNU Binutils) 2.19.0.20081119 bison (GNU Bison) 2.4.1 bzip2, Version 1.0.5, 10-Dec-2007. Coreutils: 6.12 diff (GNU diffutils) 2.8.1 find (GNU findutils) 4.4.0 GNU Awk 3.1.6 gcc (GCC) 4.3.2 GNU C Library stable release version 2.9, GNU grep 2.5.3 gzip 1.3.12 GNU Make 3.81 ncurses 5.7.20081102 patch 2.5.9 GNU sed version 4.1.5 tar (GNU tar) 1.21 makeinfo (GNU texinfo) 4.13
作者: kimux 发布时间: 2009-01-20
作者: newper 发布时间: 2009-01-20
cat > hello.c << eof
#include <stdio.h>
int main ()
{
printf ("hello,world!\n");
return 0;
}
eof
gcc hello.c
./a.out
您是不是升级过宿主,如是这样,请先修复工具链。
宿主软件版本新一点一般不是问题,如果 archlinux 使用了特殊的补丁,那就不一定适合作宿主。
|
作者: newper
我答应聚焦深空兄去做这个实验,可我一直没空。
|
作者: 聚焦深空 发布时间: 2009-01-20
|
作者: 聚焦深空
楼主,检查一下自己宿主的编译环境先,比如编译一个 hello.c 试试。
代码:
cat > hello.c << eof
#include <stdio.h>
int main ()
{
printf ("hello,world!\n");
return 0;
}
eof
gcc hello.c
./a.out
您是不是升级过宿主,如是这样,请先修复工具链。 宿主软件版本新一点一般不是问题,如果 archlinux 使用了特殊的补丁,那就不一定适合作宿主。 |
bash-3.2# cat > hello.c << eof
> #include <stdio.h>
> int main()
> {
> printf ("hello,world!\n");
> return 0;
> }
> eof
bash-3.2# gcc hello.c
bash-3.2# ./a.out
hello,world!
bash-3.2#
作者: kimux 发布时间: 2009-01-20
我在ftp://sources.redhat.com/pub/glibc/snapshots/
下载了一个glibc-2.9-latest.tar.bz2
作者: kimux 发布时间: 2009-01-20
x86_64 -> i386?
您宿主是 pure64 还是 mulitlib 的?
作者: 聚焦深空 发布时间: 2009-01-20
|
作者: 聚焦深空
您现在使用的具体是哪一个手册?
x86_64 -> i386? 您宿主是 pure64 还是 mulitlib 的? |
宿主是arch x86_64 .. 具体我也不清楚是pure64还是mulitlib ..
作者: kimux 发布时间: 2009-01-20
因为有置顶帖不推荐用gentoo的GCC。。
所以我换了个ARCH 。。不太了解ARCH的版本区别
作者: kimux 发布时间: 2009-01-20
那个手册是建立 i386 系统的,并且是 i386 -> i386,宿主不能是 x86_64。
作者: 聚焦深空 发布时间: 2009-01-20
作者: newper 发布时间: 2009-01-20
这个是针对 x86_64 的。
个人不建议您使用 "native" 系列的两个手册,太新没有足够验证,如果您不介意,可以继续。
建议您使用稳定版,CLFS-1.1.0。
http://cross-lfs.org/view/1.1.0/
如果您激进些,可参考 CLFS-Sysroot,官方无x86_64手册,但您可以参考偶、地球发动机 的精华贴。
http://cross-lfs.org/view/clfs-sysroot/
http://www.linuxsir.org/bbs/thread331921.html 帖子里东西有些老,等过些时间更新。pure64
http://www.linuxsir.org/bbs/thread326858.html 帖子里东西也有些老。mulitlib
作者: 聚焦深空 发布时间: 2009-01-20
|
作者: newper
如果你感兴趣,可以试一下这个版本的CLFS:http://cross-lfs.org/view/svn/native/
如果你确定要做的话,再帮我个忙: 做完http://cross-lfs.org/view/svn/native...stem/mpfr.html这一步后把 ldd /tools/lib/libmpfr.so的结果贴出来。 我答应聚焦深空兄去做这个实验,可我一直没空。 |
/tools 里没有lib这个目录。。。 难道是我做错了?
作者: kimux 发布时间: 2009-01-20
作者: newper 发布时间: 2009-01-20
|
作者: newper
看来是我错了,或许不能用这个手册。不好意思问一下你现在做到第5.8节还是6.4节
|
作者: kimux 发布时间: 2009-01-20
作者: newper 发布时间: 2009-01-20
|
作者: newper
看来是我错了,或许不能用这个手册。不好意思问一下你现在做到第5.8节还是6.4节
|
作者: kimux 发布时间: 2009-01-20
clfs:/mnt/clfs/sources/glibc-build$ BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" CFLAGS="-march=$(cut -d- -f1 <<< $CLFS_TARGET) -mtune=generic -g -O2" ../glibc-2.9-20090119/configure --prefix=/tools --host=${CLFS_TARGET} --build=${CLFS_HOST} --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.0 --with-__thread --with-binutils=/cross-tools/bin --with-headers=/tools/include --cache-file=config.cache
configure: loading cache config.cache
checking build system type... x86_64-cross-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
configure: running configure fragment for add-on libidn
configure: running configure fragment for add-on nptl
checking sysdep dirs... sysdeps/x86_64/elf nptl/sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/wordsize-64 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/x86_64 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/x86_64/fpu nptl/sysdeps/x86_64 sysdeps/x86_64 sysdeps/wordsize-64 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /bin/install -c
checking whether ln -s works... yes
checking for x86_64-unknown-linux-gnu-gcc... x86_64-unknown-linux-gnu-gcc
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
clfs:/mnt/clfs/sources/glibc-build$
作者: kimux 发布时间: 2009-01-20
clfs:/mnt/clfs/sources/glibc-build$ cat config.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 Library configure (see version.h), which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ../glibc-2.9-20090119/configure --prefix=/tools --host=x86_64-unknown-linux-gnu --build=x86_64-cross-linux-gnu --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.0 --with-__thread --with-binutils=/cross-tools/bin --with-headers=/tools/include --cache-file=config.cache
## --------- ##
## Platform. ##
## --------- ##
hostname = Boxer
uname -m = x86_64
uname -r = 2.6.28-ARCH
uname -s = Linux
uname -v = #1 SMP PREEMPT Tue Jan 6 09:25:48 UTC 2009
/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: /cross-tools/bin
PATH: /bin
PATH: /usr/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1753: loading cache config.cache
configure:2183: checking build system type
configure:2201: result: x86_64-cross-linux-gnu
configure:2223: checking host system type
configure:2238: result: x86_64-unknown-linux-gnu
configure:2418: running configure fragment for add-on libidn
configure:2418: running configure fragment for add-on nptl
configure:2555: checking sysdep dirs
configure:2791: result: sysdeps/generic/elf sysdeps/generic
configure:2869: checking for a BSD-compatible install
configure:2925: result: /bin/install -c
configure:2940: checking whether ln -s works
configure:2944: result: yes
configure:2960: checking for x86_64-unknown-linux-gnu-gcc
configure:2987: result: x86_64-unknown-linux-gnu-gcc
configure:3265: checking for C compiler version
configure:3272: x86_64-unknown-linux-gnu-gcc --version >&5
x86_64-unknown-linux-gnu-gcc (GCC) 4.3.2
Copyright (C) 2008 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:3275: $? = 0
configure:3282: x86_64-unknown-linux-gnu-gcc -v >&5
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.3.2/configure --prefix=/cross-tools --build=x86_64-cross-linux-gnu --host=x86_64-cross-linux-gnu --target=x86_64-unknown-linux-gnu --with-sysroot=/mnt/clfs --with-local-prefix=/tools --disable-nls --disable-shared --with-mpfr=/cross-tools --with-gmp=/cross-tools --without-headers --with-newlib --disable-decimal-float --disable-libgomp --disable-libmudflap --disable-libssp --disable-threads --enable-languages=c --disable-multilib
Thread model: single
gcc version 4.3.2 (GCC)
configure:3285: $? = 0
configure:3292: x86_64-unknown-linux-gnu-gcc -V >&5
x86_64-unknown-linux-gnu-gcc: '-V' option must have argument
configure:3295: $? = 1
configure:3299: checking for suffix of object files
configure:3325: x86_64-unknown-linux-gnu-gcc -c -march=x86_64 -mtune=generic -g -O2 conftest.c >&5
conftest.c:1: error: bad value (x86_64) for -march= switch
configure:3328: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "c-library"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "glibc"
| #define HAVE_LIBIDN 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3343: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-cross-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=x86_64-unknown-linux-gnu-gcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-march=x86_64 -mtune=generic -g -O2'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_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=set
ac_cv_env_build_alias_value=x86_64-cross-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=x86_64-unknown-linux-gnu
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_path_install='/bin/install -c'
ac_cv_prog_CC=x86_64-unknown-linux-gnu-gcc
libc_cv_c_cleanup=yes
libc_cv_forced_unwind=yes
libc_cv_gnu99_inline=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR='x86_64-unknown-linux-gnu-ar'
AS=''
ASFLAGS_config=''
AUTOCONF=''
AWK=''
BASH_SHELL=''
BISON=''
BUILD_CC='gcc'
CC='x86_64-unknown-linux-gnu-gcc'
CFLAGS='-march=x86_64 -mtune=generic -g -O2'
CPP=''
CPPFLAGS=''
CXX=''
CXXFLAGS=''
CXX_SYSINCLUDES=''
DEFINES=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_INFO=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
KSH=''
LD=''
LDFLAGS=''
LIBGD=''
LIBOBJS=''
LIBS=''
LN_S='ln -s'
LTLIBOBJS=''
MAKE=''
MAKEINFO=''
MIG=''
MSGFMT=''
OBJDUMP=''
OBJEXT=''
PACKAGE_BUGREPORT='glibc'
PACKAGE_NAME='GNU C Library'
PACKAGE_STRING='GNU C Library (see version.h)'
PACKAGE_TARNAME='c-library'
PACKAGE_VERSION='(see version.h)'
PATH_SEPARATOR=':'
PERL=''
PWD_P=''
RANLIB='x86_64-unknown-linux-gnu-ranlib'
RELEASE=''
SED=''
SHELL='/bin/sh'
SYSINCLUDES=''
VERSION=''
VERSIONING=''
ac_ct_CC=''
ac_ct_CXX=''
add_on_subdirs=' libidn'
add_ons='libidn nptl'
all_warnings=''
base_machine='x86_64'
bindir='${exec_prefix}/bin'
bindnow='no'
bounded='no'
build='x86_64-cross-linux-gnu'
build_alias='x86_64-cross-linux-gnu'
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='cross'
cross_compiling='yes'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
elf='yes'
enable_check_abi='no'
exceptions=''
exec_prefix='NONE'
fno_unit_at_a_time=''
force_install='yes'
have_libaudit=''
have_libcap=''
have_selinux=''
host='x86_64-unknown-linux-gnu'
host_alias='x86_64-unknown-linux-gnu'
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
ldd_rewrite_script=''
libc_cv_Bgroup=''
libc_cv_as_needed=''
libc_cv_cc_submachine=''
libc_cv_cc_with_libgcc_eh=''
libc_cv_cc_with_libunwind=''
libc_cv_cpp_asm_debuginfo=''
libc_cv_forced_unwind='yes'
libc_cv_fpie=''
libc_cv_gcc_static_libgcc=''
libc_cv_gcc_unwind_find_fde=''
libc_cv_gnu89_inline=''
libc_cv_hashstyle=''
libc_cv_have_bash2=''
libc_cv_have_initfini=''
libc_cv_have_ksh=''
libc_cv_libgcc_s_suffix=''
libc_cv_localedir=''
libc_cv_rootsbindir=''
libc_cv_slibdir=''
libc_cv_ssp=''
libc_cv_sysconfdir=''
libc_cv_z_combreloc=''
libc_cv_z_execstack=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mach_interface_list=''
mandir='${datarootdir}/man'
no_whole_archive=''
nopic_initfini=''
old_glibc_headers=''
oldest_abi='default'
oldincludedir='/usr/include'
omitfp='no'
pdfdir='${docdir}'
pic_default=''
prefix='/tools'
profile='no'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
shared='default'
sharedstatedir='${prefix}/com'
sizeof_long_double=''
static='yes'
static_nss='no'
subdirs=' '
submachine=''
sysconfdir='${prefix}/etc'
sysdeps_add_ons=' nptl'
sysnames=' sysdeps/x86_64/elf nptl/sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/wordsize-64 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/x86_64 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/x86_64/fpu nptl/sysdeps/x86_64 sysdeps/x86_64 sysdeps/wordsize-64 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic'
target_alias=''
uname_release=''
uname_sysname=''
uname_version=''
use_ldconfig=''
with_cvs='no'
with_fp='yes'
xcoff='no'
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME "GNU C Library"
#define PACKAGE_TARNAME "c-library"
#define PACKAGE_VERSION "(see version.h)"
#define PACKAGE_STRING "GNU C Library (see version.h)"
#define PACKAGE_BUGREPORT "glibc"
#define HAVE_LIBIDN 1
configure: exit 1
作者: kimux 发布时间: 2009-01-20
可是这样一改以后每个包都要改,就成了Pure64了,还不如直接去看Pure64手册
作者: newper 发布时间: 2009-01-20
作者: kimux 发布时间: 2009-01-20
|
作者: newper
把CC="${CLFS_TARGET}-gcc" 改成 CC="${CLFS_TARGET}-gcc -m64"
可是这样一改以后每个包都要改,就成了Pure64了,还不如直接去看Pure64手册 |

看来也没必要继续下去了。。。
作者: kimux 发布时间: 2009-01-20
作者: newper 发布时间: 2009-01-20

反正我很闲。。
这次要好好准备准备。。。一次成功最好
话说我刚才第一遍GCC make的时候加了 -j3 只用了不到3分钟。。
作者: kimux 发布时间: 2009-01-20
|
作者: 聚焦深空
http://cross-lfs.org/view/svn/native64/
这个是针对 x86_64 的。 个人不建议您使用 "native" 系列的两个手册,太新没有足够验证,如果您不介意,可以继续。 建议您使用稳定版,CLFS-1.1.0。 http://cross-lfs.org/view/1.1.0/ 如果您激进些,可参考 CLFS-Sysroot,官方无x86_64手册,但您可以参考偶、地球发动机 的精华贴。 http://cross-lfs.org/view/clfs-sysroot/ http://www.linuxsir.org/bbs/thread331921.html 帖子里东西有些老,等过些时间更新。pure64 http://www.linuxsir.org/bbs/thread326858.html 帖子里东西也有些老。mulitlib |
http://cross-lfs.org/view/svn/x86_64-64/ 或者
http://cross-lfs.org/view/svn/x86_64/
如何呢?
作者: kimux 发布时间: 2009-01-21
|
作者: kimux
多谢指教
http://cross-lfs.org/view/svn/x86_64-64/ 或者 http://cross-lfs.org/view/svn/x86_64/ 如何呢? |
偶有点怀疑用其进行"伪交叉编译"(x86_64-cross-linux-gnu -> x86_64-unknown-linux-gnu)的临时系统的纯度,这个要实际做才能验证。
如果您使用这两个手册进行真正的交叉编译成功,也可以从侧面验证偶的猜测错误。(如使用 i686 的宿主系统: i686-cross-linux-gnu -> x86_64-unknown-linux-gnu)
作者: 聚焦深空 发布时间: 2009-01-21
|
作者: 聚焦深空
还好,不过它们也是开发版本。
偶有点怀疑用其进行"伪交叉编译"(x86_64-cross-linux-gnu -> x86_64-unknown-linux-gnu)的临时系统的纯度,这个要实际做才能验证。 如果您使用这两个手册进行真正的交叉编译成功,也可以从侧面验证偶的猜测错误。(如使用 i686 的宿主系统: i686-cross-linux-gnu -> x86_64-unknown-linux-gnu) |
如果遇到问题还请多多指教
作者: kimux 发布时间: 2009-01-21
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28














