LinuxSir.cn,穿越时空的Linuxsir!

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

gcc升级后版本错误

[复制链接]
发表于 2008-3-18 11:46:45 | 显示全部楼层 |阅读模式
这两天老出问题。我使用emerge -uavDN world ,在编译buzybox得时候报错说找不到gcc,找i686-pc-linux-gnu-4.1.1得时候找不到,但是没有记录下来错误信息。用gcc-config -l一看,gcc-4.1.1变成了i486-pc-linux-gnu-4.1.1,心想686怎么变成486了?我于是直接emerge gcc,把gcc升级成了i686-pc-linux-gnu-4.1.2.然后接下来得emerge -uavDN world没有错误。使用revdep-rebuild也没有问题。之后进行了etc-update,env-update,source /etc/profile
但是接下来emerge xorg-11得时候编译jpeg包时又报错,不知道i486-pc-linux-gnu-4.1.1怎么又蹦出来了?

  1. checking whether we are using GNU C... yes
  2. checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E
  3. checking for function prototypes... yes
  4. checking for stddef.h... yes
  5. checking for stdlib.h... yes
  6. checking for string.h... yes
  7. checking for size_t... yes
  8. checking for type unsigned char... yes
  9. checking for type unsigned short... yes
  10. checking for type void... yes
  11. checking for working const... yes
  12. checking for inline... __inline__
  13. checking for broken incomplete types... ok
  14. checking for short external names... ok
  15. checking to see if char is signed... yes
  16. checking to see if right shift is signed... yes
  17. checking to see if fopen accepts b spec... yes
  18. checking for a BSD compatible install... /usr/bin/install -c
  19. checking for ranlib... i686-pc-linux-gnu-ranlib
  20. checking host system type... i686-pc-linux-gnu
  21. checking whether we are using GNU C... yes
  22. checking for i686-pc-linux-gnu-gcc option to produce PIC... -fPIC
  23. checking if i686-pc-linux-gnu-gcc PIC flag -fPIC works... yes
  24. checking if i686-pc-linux-gnu-gcc static flag -static works... -static
  25. checking whether ln -s works... yes
  26. checking for ld used by GCC... /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld
  27. checking if the linker (/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld) is GNU ld... yes
  28. checking whether the linker (/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld) supports shared libraries... yes
  29. checking for BSD-compatible nm... /usr/bin/nm -B
  30. checking command to parse /usr/bin/nm -B output... yes
  31. checking how to hardcode library paths into programs... immediate
  32. checking for /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld option to reload object files... -r
  33. checking dynamic linker characteristics... Linux ld.so
  34. checking if libtool supports shared libraries... yes
  35. checking whether to build shared libraries... yes
  36. checking whether to build static libraries... yes
  37. checking for objdir... .libs
  38. creating libtool
  39. checking for 'tmpfile()'... yes
  40. checking libjpeg version number... 62
  41. creating ./config.status
  42. creating Makefile
  43. creating jconfig.h
  44. .........................................
  45. i686-pc-linux-gnu-gcc -o rdjpgcom .libs/rdjpgcom.o   
  46. ./libtool-wrap --mode=link i686-pc-linux-gnu-gcc  -o wrjpgcom wrjpgcom.lo
  47. i686-pc-linux-gnu-gcc -o wrjpgcom .libs/wrjpgcom.o   
  48. i686-pc-linux-gnu-gcc -march=prescott -O2 -pipe -fomit-frame-pointer -I. -c ./transupp.c -o transupp.o >/dev/null 2>&1
  49. g++ -shared -nostdlib /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/../../../crti.o /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/crtbeginS.o  .libs/jcapimin.o .libs/jcapistd.o .libs/jctrans.o .libs/jcparam.o .libs/jdatadst.o .libs/jcinit.o .libs/jcmaster.o .libs/jcmarker.o .libs/jcmainct.o .libs/jcprepct.o .libs/jccoefct.o .libs/jccolor.o .libs/jcsample.o .libs/jchuff.o .libs/jcphuff.o .libs/jcdctmgr.o .libs/jfdctfst.o .libs/jfdctflt.o .libs/jfdctint.o .libs/jdapimin.o .libs/jdapistd.o .libs/jdtrans.o .libs/jdatasrc.o .libs/jdmaster.o .libs/jdinput.o .libs/jdmarker.o .libs/jdhuff.o .libs/jdphuff.o .libs/jdmainct.o .libs/jdcoefct.o .libs/jdpostct.o .libs/jddctmgr.o .libs/jidctfst.o .libs/jidctflt.o .libs/jidctint.o .libs/jidctred.o .libs/jdsample.o .libs/jdcolor.o .libs/jquant1.o .libs/jquant2.o .libs/jdmerge.o .libs/jcomapi.o .libs/jutils.o .libs/jerror.o .libs/jmemmgr.o .libs/jmemansi.o  -L/usr/lib/gcc/i486-pc-linux-gnu/4.1.1 -L/usr/lib/gcc/i486-pc-linux-gnu/4.1.1/../../../../i486-pc-linux-gnu/lib -L/usr/lib/gcc/i486-pc-linux-gnu/4.1.1/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/crtendS.o /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/../../../crtn.o  -Wl,-soname -Wl,libjpeg.so.62 -o .libs/libjpeg.so.62.0.0
  50. g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/../../../crti.o: No such file or directory
  51. g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/crtbeginS.o: No such file or directory
  52. g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/crtendS.o: No such file or directory
  53. g++: /usr/lib/gcc/i486-pc-linux-gnu/4.1.1/../../../crtn.o: No such file or directory
  54. make: *** [libjpeg.la] Error 1
复制代码


是不是哪里得配置文件还没有更新?

gcc版本只有4.1.2

  1. localhost gcc # gcc-config -B
  2. /usr/i686-pc-linux-gnu/gcc-bin/4.1.2
  3. localhost gcc # gcc-config -X
  4. /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4
  5. localhost gcc # gcc-config -l
  6. [1] i686-pc-linux-gnu-4.1.2 *
复制代码


emerge --info

  1. Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r3 i686)
  2. =================================================================
  3. System uname: 2.6.24-gentoo-r3 i686 Intel(R) Pentium(R) D CPU 3.00GHz
  4. Timestamp of tree: Mon, 17 Mar 2008 09:30:01 +0000
  5. app-shells/bash:     3.2_p17-r1
  6. dev-lang/python:     2.4.4-r9
  7. dev-python/pycrypto: 2.0.1-r6
  8. sys-apps/baselayout: 1.12.11.1
  9. sys-apps/sandbox:    1.2.18.1-r2
  10. sys-devel/autoconf:  2.61-r1
  11. sys-devel/automake:  1.9.6-r2, 1.10
  12. sys-devel/binutils:  2.18-r1
  13. sys-devel/gcc-config: 1.4.0-r4
  14. sys-devel/libtool:   1.5.26
  15. virtual/os-headers:  2.6.23-r3
  16. ACCEPT_KEYWORDS="x86"
  17. CBUILD="i686-pc-linux-gnu"
  18. CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
  19. CHOST="i686-pc-linux-gnu"
  20. CONFIG_PROTECT="/etc"
  21. CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
  22. CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
  23. DISTDIR="/usr/portage/distfiles"
  24. FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
  25. GENTOO_MIRRORS="ftp://ftp3.tsinghua.edu.cn/mirror/gentoo"
  26. LINGUAS="zh_CN"
  27. MAKEOPTS="-j3"
  28. PKGDIR="/usr/portage/packages"
  29. PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
  30. PORTAGE_TMPDIR="/var/tmp"
  31. PORTDIR="/usr/portage"
  32. SYNC="rsync://61.135.158.199/gentoo-portage"
  33. USE="X acl alsa apache2 avi berkdb cairo cjk cli cracklib crypt dri dvb ffmpeg firefox fortran ftp gdbm gif glx gnome gpm gtk gtk2 gtkhtml icc iconv isdnlog javascript jpeg mad midi mp3 mpeg mpeg4 msn mudflap mysql ncurses nls nptl nptlonly opengl openmp oss pam pcre pdf perl php png pppd python qq quicktime readline real reflection rmvb ruby session spl ssl svg tcpd tiff truetype unicode usb win32codecs wma x86 xml xml2 xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN" USERLAND="GNU" VIDEO_CARDS="i810"
  34. Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
复制代码
发表于 2008-3-18 11:59:38 | 显示全部楼层
CHOST你是不是改过这个变量?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-18 12:41:47 | 显示全部楼层
回老大的话,没改过。make.conf里面的东西好久没改过了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-18 14:05:28 | 显示全部楼层
我现在只好把4.1.2做了个连接,连到i486-pc-linux-gnu/4.1.1,至少编jpeg没什么问题。
请问如果我想再把i486-pc-linux-gnu/4.1.1再装上应该怎么做?就是gcc-config时同时有两个版本。貌似我把4.1.2装上了4.1.1就没了
回复 支持 反对

使用道具 举报

发表于 2008-3-18 14:12:52 | 显示全部楼层
gcc-config list
上次从4.1.2升到4.2.3
因为/env/gcc下面有一个.NATIVE的链接错误找了很久
然后再重新emerge gcc搞定
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-18 14:20:16 | 显示全部楼层
确实这里有些问题。

  1. localhost gcc # gcc-config list
  2. * gcc-config: Could not locate 'list' in '/etc/env.d/gcc/' !

  3. localhost gcc # cd /etc/env.d/gcc
  4. localhost gcc # ls -al
  5. total 16
  6. drwxr-xr-x 2 root root 4096 Mar 18 05:42 .
  7. drwxr-xr-x 4 root root 4096 Mar 18 01:59 ..
  8. lrwxrwxrwx 1 root root   23 Mar 18 05:42 .NATIVE -> i686-pc-linux-gnu-4.1.2
  9. -rw-r--r-- 1 root root   32 Mar 18 05:42 config-i686-pc-linux-gnu
  10. -rw-r--r-- 1 root root  235 Mar 17 16:56 i686-pc-linux-gnu-4.1.2

  11. localhost gcc # cat config-i686-pc-linux-gnu
  12. CURRENT=i686-pc-linux-gnu-4.1.2

  13. localhost gcc # cat i686-pc-linux-gnu-4.1.2
  14. LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/4.1.2"
  15. MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/man"
  16. INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/info"
  17. STDCXX_INCDIR="g++-v4"
  18. GCC_PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.1.2"
复制代码

为什么这里说Could not locate 'list' in '/etc/env.d/gcc/'?
应该怎么办?emerge gcc?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-3-18 14:36:56 | 显示全部楼层
Post by heejun;1827935
gcc-config list
上次从4.1.2升到4.2.3
因为/env/gcc下面有一个.NATIVE的链接错误找了很久
然后再重新emerge gcc搞定


heejun兄,貌似gcc-config没有list这个参数哦
回复 支持 反对

使用道具 举报

发表于 2008-3-18 18:16:53 | 显示全部楼层
Post by woodenapple;1827945
heejun兄,貌似gcc-config没有list这个参数哦
gcc-config -l
回复 支持 反对

使用道具 举报

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

本版积分规则

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