LinuxSir.cn,穿越时空的Linuxsir!

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

Debian上编译通过,发现一些小问题

[复制链接]
发表于 2006-3-18 09:34:23 | 显示全部楼层 |阅读模式
CPU:CR2.4超到2.8
Mem: 768M
OS: Deiban Sarge/Testing
GCC:
[0 No.515 apps $ ] dpkg -l | grep gcc-
ii  gcc-3.3                              3.3.6-10                   The GNU C compiler
ii  gcc-3.3-base                         3.3.6-10                   The GNU Compiler Collection (base package)
ii  gcc-4.0                              4.0.2-9                    The GNU C compiler
ii  gcc-4.0-base                         4.0.2-9                    The GNU Compiler Collection (base package)




  1. [0 No.505 ~ $ ] cat lfs_err_note
  2. 1
  3. huan:/mnt/lfs/sources/glibc-build

  4. Q:
  5. /mnt/lfs/sources/glibc-build/csu/version-info.h:2: error: missing terminating " charact er
  6. /mnt/lfs/sources/glibc-build/csu/version-info.h:3: error: missing terminating " charact er
  7. version.c:40: error: parse error before string constant
  8. make[2]: *** [/mnt/lfs/sources/glibc-build/csu/version.o] Error 1
  9. make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.3.6/csu'
  10. make[1]: *** [csu/subdir_lib] Error 2
  11. make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.3.6'
  12. make: *** [all] Error 2


  13. lfs@huan:/mnt/lfs/sources/glibc-build$ cat /mnt/lfs/sources/glibc-build/csu/version-info.h "Compiled on a Linux 2.6.11 system on 2006-03-17.\n"
  14. [b]"Available extensions:
  15. "[/b]
  16. "       GNU libio by Per Bothner\n"
  17. "       crypt add-on version 2.1 by Michael Glad and others\n"
  18. "       Native POSIX Threads Library by Ulrich Drepper et al\n"
  19. "       BIND-8.2.3-T5B\n"
  20. "       NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk\n"
  21. lfs@huan:/mnt/lfs/sources/glibc-build$
复制代码

如加粗行所示
问题出于引号换行了
挪上去问题解决
这个问题不知有人没遇见过
我在VM里用lfs-livecd没发现
但Debian下几字编译都出这个问题



  1. [0 /sources/hotplug-2004_09_23 #] make install
  2. /usr/bin/install -c -D sbin/hotplug /sbin/hotplug
  3. make: /usr/bin/install: Command not found
  4. make: *** [install] Error 127

  5. [2 /sources/hotplug-2004_09_23 #] ln -s /bin/install /usr/bin/
  6. [0 /sources/hotplug-2004_09_23 #] make install
  7. /usr/bin/install -c -D sbin/hotplug /sbin/hotplug
  8. /usr/bin/install -c -d /etc/hotplug/{usb,pci}
  9. /usr/bin/install -c -D etc/hotplug.d/default/default.hotplug /etc/hotplug.d/default/default.hotplug
  10. for F in etc/hotplug/{*.{agent,rc},hotplug.functions} ; do \
  11.     /usr/bin/install -c $F /etc/hotplug ; \
  12.     done
  13. for F in etc/hotplug/{blacklist,usb.{user,hand,dist}map} ; do \
  14.     /usr/bin/install -c -m 644 $F /etc/hotplug ; \
  15.     done
  16. /usr/bin/install -c -D etc/rc.d/init.d/hotplug /etc/init.d/hotplug
  17. /usr/bin/install -c -m 644 -D hotplug.8  /usr/share/man/man8/hotplug.8
  18. /usr/bin/install -c -d /var/log/hotplug /var/run
  19. /usr/bin/install -c -d -m 700 /var/run/usb
  20. [0 /sources/hotplug-2004_09_23 #]
复制代码


觉得这种问题好傻



  1. [0 /sources/udev-056 #] make udevdir=/dev
  2. [0 /sources/udev-056 #] make udevdir=/dev install
  3. /usr/bin/install -c -d /etc/udev/rules.d
  4. /usr/bin/install -c -m 644 -D udev.8 /usr/share/man/man8/udev.8
  5. /usr/bin/install -c -m 644 -D udevinfo.8 /usr/share/man/man8/udevinfo.8
  6. /usr/bin/install -c -m 644 -D udevtest.8 /usr/share/man/man8/udevtest.8
  7. /usr/bin/install -c -m 644 -D udevstart.8 /usr/share/man/man8/udevstart.8
  8. /usr/bin/install -c -m 644 -D udevd.8 /usr/share/man/man8/udevd.8
  9. ln -f -s udevd.8 /usr/share/man/man8/udevsend.8
  10. /usr/bin/install -c -d /etc/dev.d/default
  11. /usr/bin/install -c -D etc/dev.d/net/hotplug.dev /etc/dev.d/net/hotplug.dev
  12. /usr/bin/install -c -d /dev
  13. /usr/bin/install -c -d /etc/hotplug.d/default
  14. /usr/bin/install -c -D udev /sbin/udev
  15. /usr/bin/install -c -D udevd /sbin/udevd
  16. /usr/bin/install -c -D udevsend /sbin/udevsend
  17. /usr/bin/install -c -D udevinfo /usr/bin/udevinfo
  18. /usr/bin/install -c -D udevtest /usr/bin/udevtest
  19. /usr/bin/install -c -D udevstart /sbin/udevstart
  20. ln -f -s /sbin/udevsend /etc/hotplug.d/default/10-udev.hotplug
  21. killall udevd
  22. udevd: no process killed
  23. make: [install] Error 1 (ignored)
  24. rm -rf /dev/.udevdb
  25. [b][0 /sources/udev-056 #] cp ../udev-config-3.rules /etc/udev/rules.d/25-lfs.rules
  26. cp: cannot stat `../udev-config-3.rules': No such file or directory
  27. [1 /sources/udev-056 #][/b]

  28. [0 No.506 ~ $ ]
复制代码
Udev 的默认配置很不完美,所以请在这里安装配置文件:

cp ../udev-config-3.rules /etc/udev/rules.d/25-lfs.rules

并没提到这点

  1.        
  2. 置顶的主题 [精] [置顶] [原创]手把手教你如何建立自己的Linux系统(LFS速成手册) ( 多页主题 1 2 3 )
  3. http://linuxsir.cn/bbs/showthread.php?t=244052


  4. 代码:

  5. make DESTDIR=/ udevdir=/dev install cp -v $LFS/udev-config-4.rules /etc/udev/rules.d/25-lfs.rules /sbin/udevstart cd .. rm -rf udev-056


复制代码

也是没提到


最终是用GCC3编译成功的
内核直接把Debian里自己编译过的2.6.15.6版本与config复制进去编译了。。。。。。
一个错都没有

从第一次在VM里尝试到最终启动成功
到可以在真实硬盘上启动
用了三个晚上两个白天
收益最大的
莫过于tar,patch,configure, make && make install
这几个命令的输入速度
发表于 2006-3-18 14:24:20 | 显示全部楼层
第一个问题:暂时不能下断言,但觉得可能跟你用的Debian下的某个软件的版本有关系

第二个问题:这个不算什么问题,只不过hotplug的安装程序默认到/usr/bin下找install命令.

第三个问题:更不算什么问题了,你没有把udev-config-3.rules下载到sources下,而照搬书上的命令,当然会出错.

之所以没有在LFS速成手册中提到,是因为手册中用的是lfs-livecd,而lfs-livecd中已经包含了所有制作中需要的文件,而在做第六章的时候已经用了
  1. [b]cp -a /lfs-sources/* $LFS/sources[/b]
复制代码

将所有的文件都复制到了sources下。
所以
  1. [b]cp -v ../udev-config-4.rules /etc/udev/rules.d/25-lfs.rules[/b]
复制代码

没有问题,似乎也不需要说明。

另外:
  1. [b]
  2. make DESTDIR=/ udevdir=/dev install
  3. cp -v $LFS/udev-config-4.rules /etc/udev/rules.d/25-lfs.rules
  4. /sbin/udevstart
  5. cd ..
  6. rm -rf udev-056
  7. [/b]
复制代码

是5条命令,不是一条命令
回复 支持 反对

使用道具 举报

发表于 2006-3-18 14:44:31 | 显示全部楼层
不过这些问题写出来也好,这样下次有相同问题的朋友就知道怎么回事了。
回复 支持 反对

使用道具 举报

发表于 2006-3-19 01:36:07 | 显示全部楼层
第一个问题比较奇怪,其他的,都很容易解决。

查了一下,结果如下:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=229

It's already fixed in CVS using printf instead echo.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-19 22:23:46 | 显示全部楼层
容易和程度那要看是对谁说了

另外对两位版主的关注表示感谢
回复 支持 反对

使用道具 举报

发表于 2006-3-19 23:05:34 | 显示全部楼层
如果你觉得这2个问题很难,也许 LFS 还不适合你。。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-20 09:00:44 | 显示全部楼层
倒不是说难
只是奇怪为什么没被指出来
是环境不一样?
还是他们只是照搬别人的步骤
回复 支持 反对

使用道具 举报

发表于 2006-3-20 09:20:27 | 显示全部楼层
因为不需要指出。看到这类错误,就知道怎么解决的。

(就好像你台阶你会抬腿一样,除非你想摔跤)。。。
回复 支持 反对

使用道具 举报

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

本版积分规则

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