LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1227|回复: 11

哪位有在Debian Sid上成功编译LFS 6.1.1的经验?

[复制链接]
发表于 2006-2-8 00:23:39 | 显示全部楼层 |阅读模式
列出你们所装的开发包集吧
我的sid是最新的
第一次编译binutils就通不过
在linuxquestion上也有人问同样的问题
无果
真是郁闷
http://www.linuxquestions.org/qu ... php?threadid=338822


  1. lfs@darkstar:/mnt/lfs/sources/binutils-build$ time { /bin/sh ../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls && make && make install; }
  2. loading cache ./config.cache
  3. checking host system type... i686-pc-linux-gnu
  4. checking target system type... i686-pc-linux-gnu
  5. checking build system type... i686-pc-linux-gnu
  6. checking for a BSD compatible install... (cached) /usr/bin/install -c
  7. checking whether ln works... (cached) yes
  8. checking whether ln -s works... (cached) yes
  9. checking for gcc... (cached) gcc
  10. checking whether the C compiler (gcc  ) works... yes
  11. checking whether the C compiler (gcc  ) is a cross-compiler... yes
  12. checking whether we are using GNU C... (cached) yes
  13. checking whether gcc accepts -g... (cached) yes
  14. checking for gnatbind... no
  15. checking whether compiler driver understands Ada... (cached) no
  16. checking how to compare bootstrapped objects... (cached) cmp --ignore-initial=16 $$f1 $$f2
  17. checking for correct version of gmp.h... no
  18. checking for bison... (cached) bison
  19. checking for bison... (cached) bison -y
  20. checking for gm4... (cached) m4
  21. checking for flex... (cached) flex
  22. checking for flex... (cached) flex
  23. checking for makeinfo... no
  24. checking for i686-pc-linux-gnu-ar... no
  25. checking for ar... (cached) ar
  26. checking for i686-pc-linux-gnu-as... no
  27. checking for as... (cached) as
  28. checking for i686-pc-linux-gnu-dlltool... no
  29. checking for dlltool... (cached) dlltool
  30. checking for i686-pc-linux-gnu-ld... no
  31. checking for ld... (cached) ld
  32. checking for i686-pc-linux-gnu-nm... no
  33. checking for nm... (cached) nm
  34. checking for i686-pc-linux-gnu-ranlib... no
  35. checking for ranlib... (cached) ranlib
  36. checking for i686-pc-linux-gnu-windres... no
  37. checking for windres... (cached) windres
  38. checking for i686-pc-linux-gnu-objcopy... no
  39. checking for objcopy... (cached) objcopy
  40. checking for i686-pc-linux-gnu-objdump... no
  41. checking for objdump... (cached) objdump
  42. checking for i686-pc-linux-gnu-ar... no
  43. checking for ar... (cached) ar
  44. checking for i686-pc-linux-gnu-as... no
  45. checking for as... (cached) as
  46. checking for i686-pc-linux-gnu-dlltool... no
  47. checking for dlltool... (cached) dlltool
  48. checking for i686-pc-linux-gnu-ld... no
  49. checking for ld... (cached) ld
  50. checking for i686-pc-linux-gnu-nm... no
  51. checking for nm... (cached) nm
  52. checking for i686-pc-linux-gnu-ranlib... no
  53. checking for ranlib... (cached) ranlib
  54. checking for i686-pc-linux-gnu-windres... no
  55. checking for windres... (cached) windres
  56. checking whether to enable maintainer-specific portions of Makefiles... nochecking if symbolic links between directories work... (cached) yes
  57. creating ./config.status
  58. creating Makefile
  59. Configuring in libiberty
  60. configure: loading cache ./config.cache
  61. checking whether to enable maintainer-specific portions of Makefiles... nochecking for makeinfo... /mnt/lfs/sources/binutils-2.15.94.0.2.2/missing makeinfo
  62. configure: WARNING:
  63. *** Makeinfo is missing. Info documentation will not be built.
  64. checking for perl... perl
  65. checking build system type... i686-pc-linux-gnu
  66. checking host system type... i686-pc-linux-gnu
  67. checking for i686-pc-linux-gnu-ar... ar
  68. checking for i686-pc-linux-gnu-ranlib... ranlib
  69. checking for i686-pc-linux-gnu-gcc... gcc
  70. checking for C compiler default output file name... a.out
  71. checking whether the C compiler works... configure: error: cannot run C compiled programs.
  72. If you meant to cross compile, use `--host'.
  73. See `config.log' for more details.
  74. make: *** [configure-libiberty] Error 1

  75. real    0m5.439s
  76. user    0m3.876s
  77. sys     0m0.940s

复制代码


  1. lfs@darkstar:/mnt/lfs/sources/binutils-build$ more config.log
  2. This file contains any messages produced by compilers while
  3. running configure, to aid debugging if configure makes a mistake.

  4. configure:595: checking host system type
  5. configure:616: checking target system type
  6. configure:634: checking build system type
  7. configure:689: checking for a BSD compatible install
  8. configure:742: checking whether ln works
  9. configure:766: checking whether ln -s works
  10. configure:1798: checking for gcc
  11. configure:1911: checking whether the C compiler (gcc  ) works
  12. configure:1927: gcc -o conftest    conftest.c  1>&5
  13. configure:1953: checking whether the C compiler (gcc  ) is a cross-compiler
  14. configure:1958: checking whether we are using GNU C
  15. configure:1986: checking whether gcc accepts -g
  16. configure:2053: checking for gnatbind
  17. configure:2118: checking whether compiler driver understands Ada
  18. configure:2151: checking how to compare bootstrapped objects
  19. configure:2249: checking for correct version of gmp.h
  20. configure:2262: gcc -c -g -O2   conftest.c 1>&5
  21. configure:2252:17: error: gmp.h: No such file or directory
  22. configure: In function 'main':
  23. configure:2256: error: 'choke' undeclared (first use in this function)
  24. configure:2256: error: (Each undeclared identifier is reported only once
  25. configure:2256: error: for each function it appears in.)
  26. configure:2256: error: syntax error before 'me'
  27. configure: failed program was:
  28. #line 2251 "configure"
  29. #include "confdefs.h"
  30. #include "gmp.h"
  31. int main() {

  32. #if __GNU_MP_VERSION < 3
  33. choke me
  34. #endif

  35. ; return 0; }
  36. configure:2775: checking for bison
  37. configure:2810: checking for bison
  38. configure:2845: checking for gm4
  39. configure:2880: checking for flex
  40. configure:2915: checking for flex
  41. configure:2950: checking for makeinfo
  42. configure:3596: checking for i686-pc-linux-gnu-ar
  43. configure:3629: checking for ar
  44. configure:3668: checking for i686-pc-linux-gnu-as
  45. configure:3701: checking for as
  46. configure:3740: checking for i686-pc-linux-gnu-dlltool
  47. configure:3773: checking for dlltool
  48. configure:3812: checking for i686-pc-linux-gnu-ld
  49. configure:3845: checking for ld
  50. configure:3884: checking for i686-pc-linux-gnu-nm
  51. configure:3917: checking for nm
  52. configure:3956: checking for i686-pc-linux-gnu-ranlib
  53. configure:3989: checking for ranlib
  54. configure:4028: checking for i686-pc-linux-gnu-windres
  55. configure:4061: checking for windres
  56. configure:4100: checking for i686-pc-linux-gnu-objcopy
  57. configure:4133: checking for objcopy
  58. configure:4172: checking for i686-pc-linux-gnu-objdump
  59. configure:4205: checking for objdump
  60. configure:4251: checking for i686-pc-linux-gnu-ar
  61. configure:4284: checking for ar
  62. configure:4323: checking for i686-pc-linux-gnu-as
  63. configure:4356: checking for as
  64. configure:4395: checking for i686-pc-linux-gnu-dlltool
  65. configure:4428: checking for dlltool
  66. configure:4467: checking for i686-pc-linux-gnu-ld
  67. configure:4500: checking for ld
  68. configure:4539: checking for i686-pc-linux-gnu-nm
  69. configure:4572: checking for nm
  70. configure:4611: checking for i686-pc-linux-gnu-ranlib
  71. configure:4644: checking for ranlib
  72. configure:4683: checking for i686-pc-linux-gnu-windres
  73. configure:4716: checking for windres
  74. configure:4801: checking whether to enable maintainer-specific portions of Makefiles
  75. configure:4848: checking if symbolic links between directories work

复制代码
发表于 2006-2-8 00:26:53 | 显示全部楼层
gcc的版本是?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-8 01:50:21 | 显示全部楼层
lfs@darkstar:/mnt/lfs/sources/binutils-2.15.94.0.2.2$ gcc -v
Reading specs from /usr/lib/gcc/i486-linux-gnu/4.0.3/specs
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 20060128 (prerelease) (Debian 4.0.2-8)
lfs@darkstar:/mnt/lfs/sources/binutils-2.15.94.0.2.2$
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-8 01:58:49 | 显示全部楼层
仔细看了一下youbest兄的文章
不懂这一段在干什么
主要指的是
" LFS的方法是:"
  1.   问题二:
  2.     接下来的调整工具链的时候一定会发现按照原来的方法:
  3.       gcc --print-file specs
  4.     什么文件名也得不到?天,这怎么调整。
  5.   解决方法:
  6.     我原来的方法是:
  7.       gcc -dumpspecs > /tools/lib/gcc/i686-pc-linux-gnu/4.0.1/specs
  8.       SPECFILE=`gcc --print-file specs`
  9.       sed 's@/lib/ld-linux.so.2@/tools/lib/ld-linux.so.2@g' $SPECFILE > tempspecfile
  10.       mv -f tempspecfile $SPECFILE &&
  11.       unset SPECFILE
  12.     需要注意的是/lib/ld-linux.so.2和/tools/lib/ld-linux.so.2前面的空格要去掉。
  13.     LFS上的方法是:
  14.       SPECFILE=`gcc -print-search-dirs | head -n 1 | awk '{ print $2 "specs" }'` &&
  15.       gcc -dumpspecs > $SPECFILE &&
  16.       sed -i -e 's@^/lib/ld-linux.so.2@/tools&@g' $SPECFILE &&
  17.       unset SPECFILE
  18.   结果都是一样的,不过人家还是棋高一照,写的比我自己写的通用多了。
  19.   原因:
  20.     我觉得是因为GCC3.4.4之前的默认使用文件形式的specs文件,而4.0以后使用的是默认的specs设置,不需要文件了,不过如果有文件则使用文件的定义。因此休整工具链的时候必须将设置导出成文件,然后再修改文件即可。gcc -dumpspecs就是导出specs设置的命令。
复制代码

弄了一晚上这个东西
连猜加蒙
  1. lfs@darkstar:/mnt/lfs/sources/binutils-build$ gcc --print-file specs
  2. /usr/lib/gcc/i486-linux-gnu/4.0.3/specs
  3. lfs@darkstar:/mnt/lfs/sources/binutils-build$ cat /usr/lib/gcc/i486-linux-gnu/4.0.3/specs
  4. *asm:
  5. %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}  %{Wa,*:%*} %{!m64:--32} %{m64:--64}
  6. *asm_debug:
  7. %{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}
  8. *asm_final:
  9. *asm_options:
  10. %a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}
  11. *invoke_as:
  12. %{!S:-o %|.s |
  13. as %(asm_options) %|.s %A }
  14. *cpp:
  15. %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}
  16. *cpp_options:
  17. %(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} %{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*} %{undef} %{save-temps:-fpch-preprocess}
  18. *cpp_debug_options:
  19. %{d*}
  20. *cpp_unique_options:
  21. %{C|CC:%{!E:%eGCC does not support -C or -CC without -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*&F*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{fmudflap:-D_MUDFLAP -include mf-runtime.h} %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h} %{E|M|MM:%W{o*}}
  22. *trad_capable_cpp:
  23. cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}
  24. *cc1:
  25. %(cc1_cpu) %{profile:-p}
  26. *cc1_options:
  27. %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} %{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants}
  28. *cc1plus:
  29. *link_gcc_c_sequence:
  30. %{static:--start-group} %G %L %{static:--end-group}%{!static:%G}
  31. *endfile:
  32. %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s
  33. *link:
  34. %{!static:--eh-frame-hdr} %{m64:-m elf_x86_64} %{!m64:-m elf_i386}   %{shared:-shared}   %{!shared:     %{!static:       %{rdynamic:-export-dynamic}       %{!m64:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}}  %{m64:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}}   %{static:-static}}
  35. *lib:
  36. %{pthread:-lpthread}    %{shared:-lc}    %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}
  37. *mfwrap:
  38. %{static: %{fmudflap|fmudflapth:  --wrap=malloc --wrap=free --wrap=calloc --wrap=realloc --wrap=mmap --wrap=munmap --wrap=alloca} %{fmudflapth: --wrap=pthread_create --wrap=pthread_join --wrap=pthread_exit}} %{fmudflap|fmudflapth: --wrap=main}
  39. *mflib:
  40. %{fmudflap|fmudflapth: -export-dynamic}
  41. *libgcc:
  42. %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed}%{shared-libgcc:-lgcc_s%{!shared: -lgcc}}}}
  43. *startfile:
  44. %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}    crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}
  45. *switches_need_spaces:
  46. *cross_compile:
  47. 0
  48. *version:
  49. 4.0.3
  50. *multilib:
  51. . !m64 !m32;64:../lib64 m64 !m32;32:../lib !m64 m32;
  52. *multilib_defaults:
  53. m32
  54. *multilib_extra:
  55. *multilib_matches:
  56. m64 m64;m32 m32;
  57. *multilib_exclusions:
  58. *multilib_options:
  59. m64/m32
  60. *linker:
  61. collect2
  62. *link_libgcc:
  63. %D
  64. *md_exec_prefix:
  65. *md_startfile_prefix:
  66. *md_startfile_prefix_1:
  67. *startfile_prefix_spec:
  68. *sysroot_suffix_spec:
  69. *sysroot_hdrs_suffix_spec:
  70. *cc1_cpu:
  71. %{!mtune*: %{m386:mtune=i386 %n`-m386' is deprecated. Use `-march=i386' or `-mtune=i386' instead.
  72. } %{m486:-mtune=i486 %n`-m486' is deprecated. Use `-march=i486' or `-mtune=i486' instead.
  73. } %{mpentium:-mtune=pentium %n`-mpentium' is deprecated. Use `-march=pentium' or `-mtune=pentium' instead.
  74. } %{mpentiumpro:-mtune=pentiumpro %n`-mpentiumpro' is deprecated. Use `-march=pentiumpro' or `-mtune=pentiumpro' instead.
  75. } %{mcpu=*:-mtune=%* %n`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
  76. }} %<mcpu=* %{mintel-syntax:-masm=intel %n`-mintel-syntax' is deprecated. Use `-masm=intel' instead.
  77. } %{mno-intel-syntax:-masm=att %n`-mno-intel-syntax' is deprecated. Use `-masm=att' instead.
  78. }
  79. *link_emulation:
  80. elf_i386
  81. *dynamic_linker:
  82. /tools/lib/ld-linux.so.2
  83. *link_command:
  84. %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker) %l %{pie:-pie} %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}    %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}    %{static:} %{L*} %(mfwrap) %(link_libgcc) %o %(mflib)    %{fprofile-arcs|fprofile-generate:-lgcov}    %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}}    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}
复制代码


以前都怪debian更新太慢
现在反而怪太新了
回复 支持 反对

使用道具 举报

发表于 2006-2-8 03:50:05 | 显示全部楼层
gcc用那么新,总觉得不爽。呵呵。
回复 支持 反对

使用道具 举报

发表于 2006-2-8 05:52:27 | 显示全部楼层
你可以在host系统加装gcc-3.3问题不就解决了?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-8 08:35:46 | 显示全部楼层
那还得改几个软链接
更不想改
昨天晚上不想搞了
就罢手了
最后又想搞
结果能竟然能编译成功了binutils
现在正在编译glibc-2.3.4

真tmd痛苦
我的1sbu =15min

一个glibc估计一下有二个多小时
回复 支持 反对

使用道具 举报

发表于 2006-2-9 03:21:56 | 显示全部楼层
Post by d00m3d
你可以在host系统加装gcc-3.3问题不就解决了?

不过 gcc-4.0.2 似乎还算稳定,到现在好像还没出现什么大问题。
回复 支持 反对

使用道具 举报

发表于 2006-2-9 06:09:12 | 显示全部楼层
用gcc-4.0.2的话,那就download svn的包及阅读svn的handbook好了
回复 支持 反对

使用道具 举报

发表于 2006-2-9 06:58:39 | 显示全部楼层
难道兄弟还在看 6.1.1 版本的book?嘿嘿。。。。(闪)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表