LinuxSir.cn,穿越时空的Linuxsir!

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

FCC4下安装gcc遇到的问题

[复制链接]
发表于 2007-8-6 23:58:53 | 显示全部楼层 |阅读模式
  首先更正一下主题,应该是FC4,不是FCC4,不小心多打了一个C,不知怎么改。
  以前玩Debian,就是因为想装什么就装什么,Debian源CN99特快,比大家在网络上说的都还要快,可能是人比较懒吧,再加上网速快,所以一直都习惯用Debian。所以从来都没有编译安装过任何软件,由于Redhat和Ubuntu的源都较慢,所以一直都不喜欢。
  但现在要考试,是基于FC4的,这个问题可苦了。自己的本本没有光驱(外置的,一般不接在电脑上)和软驱,所以只能下载FC4后在VMware6中安装,VMware中的CD-ROM是“use ISO image”的,安装不存在什么问题,只要一路默认就可以了,由于要考试用的,所有按个人桌面方式安装。
  但好像这种方式没有安装gcc,所以要安装新软件时yum不好使,因为版本太旧,其实也是源太慢,只好下载软件来安装。首先想装个五笔输入法SCIM,最新的scim-1.4.7.tar.gz,因为没有gcc支持,所以想到先装gcc,于是“桌面”->“系统设置”->“添加/删除应用程序”->勾上“开发工具”后去安装,可是找不到1号安装盘,VMware中明明是挂的1号盘,为什么找不到,安装系统时不就是采用这种办法吗,为什么?怎么解决?这是第1个问题。
  于是在Windows中把1号盘中自己感觉跟gcc有关的rpm文件(请参看后面ls列出的文件)取出来,再下载(因我的windows中建有FTP)到FC4中,选用RPM命令把这些文件都安装上,然后再用命令“#tar -zxvf scim-1.4.7.tar.gz”解压scim并“./configure”,这时显示信息中有些的结果是no,也不知哪些是对的哪些是不对,请参看下面的真实信息,反正接下来make时“make: *** 没有指明目标并且找不到 makefile。 停止。”
  究竟这里安装的gcc文件够不够,./configure时有没有问题,不能make的真正原因是什么?这是第2个问题。
  下面是终端里复制下来的内容:
[root@localhost ~]# ls
anaconda-ks.cfg                  glibc-kernheaders-2.4-9.1.94.i386.rpm
Desktop                          install.log
gcc-4.0.0-8.i386.rpm             install.log.syslog
glibc-2.3.5-10.i386.rpm          libgcc-4.0.0-8.i386.rpm
glibc-common-2.3.5-10.i386.rpm   libstdc++-4.0.0-8.i386.rpm
glibc-devel-2.3.5-10.i386.rpm    scim-1.4.7
glibc-headers-2.3.5-10.i386.rpm  scim-1.4.7.tar.gz

[root@localhost ~]# cd scim-1.4.7

[root@localhost scim-1.4.7]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for ranlib... ranlib
checking for strerror in -lcposix... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for an ANSI C-conforming const... yes
checking for signed... yes
checking for inline... inline
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for off_t... yes
checking for size_t... yes
checking for long long... yes
checking for long double... yes
checking for wchar_t... yes
checking for wint_t... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for intmax_t... yes
checking whether printf() supports POSIX/XSI format strings... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether we are using the GNU C Library 2.1 or newer... yes
checking whether integer division by zero raises SIGFPE... yes
checking for unsigned long long... yes
checking for inttypes.h... yes
checking whether the inttypes.h PRIxNN macros are broken... no
checking for stdint.h... (cached) yes
checking for SIZE_MAX... yes
checking for stdint.h... (cached) yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for ptrdiff_t... yes
checking argz.h usability... yes
checking argz.h presence... yes
checking for argz.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking nl_types.h usability... yes
checking nl_types.h presence... yes
checking for nl_types.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for asprintf... yes
checking for fwprintf... yes
checking for getcwd... yes
checking for getegid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getuid... yes
checking for mempcpy... yes
checking for munmap... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for snprintf... yes
checking for stpcpy... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strtoul... yes
checking for tsearch... yes
checking for wcslen... yes
checking for __argz_count... yes
checking for __argz_stringify... yes
checking for __argz_next... yes
checking for __fsetlocking... yes
checking whether _snprintf is declared... no
checking whether _snwprintf is declared... no
checking whether feof_unlocked is declared... yes
checking whether fgets_unlocked is declared... no
checking whether getc_unlocked is declared... yes
checking for iconv... yes
checking for iconv declaration...
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for nl_langinfo and CODESET... yes
checking for LC_MESSAGES... yes
checking for bison... no
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for a sed that does not truncate output... /bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking which extension is used for loadable modules... .so
checking which variable specifies run-time library path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib /usr/lib/qt-3.3/lib /usr/X11R6/lib
checking for objdir... .libs
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dlopen in -ldl... (cached) yes
checking for dlerror... yes
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking for argz.h... (cached) yes
checking for error_t... yes
checking for argz_append... yes
checking for argz_create_sep... yes
checking for argz_insert... yes
checking for argz_next... yes
checking for argz_stringify... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for malloc.h... (cached) yes
checking for memory.h... (cached) yes
checking for stdlib.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for unistd.h... (cached) yes
checking dl.h usability... no
checking dl.h presence... no
checking for dl.h... no
checking sys/dl.h usability... no
checking sys/dl.h presence... no
checking for sys/dl.h... no
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking mach-o/dyld.h usability... no
checking mach-o/dyld.h presence... no
checking for mach-o/dyld.h... no
checking for string.h... (cached) yes
checking for strchr... yes
checking for strrchr... yes
checking for memcpy... yes
checking for memmove... yes
checking for strcmp... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
checking whether we are using the GNU C++ compiler... (cached) no
checking whether g++ accepts -g... (cached) no
checking dependency style of g++... (cached) none
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for doxygen... no
checking for dot... NO
checking for dot... no
dirname: too few arguments
Try `dirname --help' for more information.
checking for perl... /usr/bin/perl
checking for xsltproc... /usr/bin/xsltproc
checking for /usr/share/sgml/docbook/xsl-stylesheets/html/tldp-html.xsl... no
checking for /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl... no
checking for /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl... no
checking for intltool >= 0.33... 0.33 found
checking for perl... /usr/bin/perl
checking for iconv... /usr/bin/iconv
checking for msgfmt... /usr/bin/msgfmt
checking for msgmerge... /usr/bin/msgmerge
checking for xgettext... /usr/bin/xgettext
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... no
checking langinfo.h usability... no
checking langinfo.h presence... no
checking for langinfo.h... no
checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
checking for string.h... (cached) yes
checking dirent.h usability... no
checking dirent.h presence... no
checking for dirent.h... no
checking hash_map usability... no
checking hash_map presence... no
checking for hash_map... no
checking ext/hash_map usability... no
checking ext/hash_map presence... no
checking for ext/hash_map... no
checking for an ANSI C-conforming const... (cached) yes
checking for inline... (cached) inline
checking for size_t... (cached) yes
checking for char... no
checking size of char... 0
checking for unsigned short int... no
checking size of unsigned short int... 0
checking for unsigned int... no
checking size of unsigned int... 0
checking for unsigned long int... no
checking size of unsigned long int... 0
checking for unsigned long long int... no
checking size of unsigned long long int... 0
checking for stdint.h... (cached) yes
configure: error:
*** SCIM requires
***      sizeof (unsigned short int)  == 2
***      sizeof (char)                == 1
*** You might want to consider using the GNU C compiler.

[root@localhost scim-1.4.7]# make
make: *** 没有指明目标并且找不到 makefile。 停止。
[root@localhost scim-1.4.7]#
发表于 2007-8-7 09:55:18 | 显示全部楼层
第一个问题: 虚拟机加载了 iso 文件 不等于 linux 系统就 会自动挂载了光驱,mount 一下看看光驱是否已经挂载

第二个问题:在终端运行 gcc -v 可以查看 gcc是否已经正常安装, 另外为什么configure 不过,只能查看 configure 文件,看看到底什么地方出了错!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-7 23:36:59 | 显示全部楼层
我搜索了网络上,虚拟机中无法mount物理分区,不知现在有没有办法?

Post by tangxn_1
第二个问题:在终端运行 gcc -v 可以查看 gcc是否已经正常安装, 另外为什么configure 不过,只能查看 configure 文件,看看到底什么地方出了错!

gcc -v的结果是:
[root@localhost ~]# gcc -v
使用内建 specs。
目标:i386-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux
线程模型:posix
gcc 版本 4.0.0 20050519 (Red Hat 4.0.0-8)
不知有没有问题?

我安装了这么多scim版本:
scim-1.0.1.tar.gz
scim-1.2.3.tar.gz
scim-1.4.4.tar.gz
scim-1.4.7.tar.gz
结果都一样,所以怀疑是gcc的问题,又安装了一下文件:
eclipse-ecj-3.1.0_fc-0.M6.22.i386.rpm
gcc-4.0.0-8.i386.rpm
gcc-java-4.0.0-8.i386.rpm
gjdoc-0.7.4-5.i386.rpm
glibc-2.3.5-10.i386.rpm
glibc-common-2.3.5-10.i386.rpm
glibc-devel-2.3.5-10.i386.rpm
glibc-headers-2.3.5-10.i386.rpm
glibc-kernheaders-2.4-9.1.94.i386.rpm
java-1.4.2-gcj-compat-1.4.2.0-40jpp_31rh.i386.rpm
java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp_31rh.i386.rpm
jessie-1.0.0-8.noarch.rpm
libgcc-4.0.0-8.i386.rpm
libgcj-4.0.0-8.i386.rpm
libgcj-devel-4.0.0-8.i386.rpm
libstdc++-4.0.0-8.i386.rpm
zlib-1.2.2.2-3.i386.rpm
zlib-devel-1.2.2.2-3.i386.rpm
结果还是一样.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-8 11:57:33 | 显示全部楼层
  由于在虚拟机中无法挂载硬盘分区,于是通过FTP把FC4的几个ISO文件下载到虚拟机内,再挂载到cdrom中,挂了第一张盘,然后开始在“添加删除应用程序”中安装gcc等,读完第一张盘后,需要第2张盘,于是umount第一张盘,再挂第二张盘,结果就认不出第二张盘了,查看挂进cdrom中的内容,确实是第二张盘的内容,为何认不出了呢?
  没办法,于是删除了这个虚拟机,下载一DVD版来在新建的虚拟机中安装,同样的方法用FTP下载进虚拟机中,挂载到cdrom中后再来“添加删除应用程序”,可是安装程序也不认这挂载进来DVD版,它要去找第一张光盘,奇怪,DVD的不就一张盘吗?难道挂开命令“#mount -o loop -t iso9660 /root/FC4-i386-DVD.iso /media/cdrom”中有问题?
  折腾死人了,每次用FC都不顺利,要不是为了考试,谁愿意用这破玩意,还是Debian好,适合我这种懒人。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-8 15:54:37 | 显示全部楼层
在虚拟机中用mount挂进/media/cdrom和在Virtual Machine settings中通过“use ISO image:”挂载,这两种办法在FC4的识别上可能都存在一些问题,我采用了[color="Red"]在Virtual Machine settings中“Use physical drive:”中选“Auto detect”后,用Alcohol 120%来挂载,就应用自如了,只要Alcohol 120%中加载,FC的桌面上就会出现光驱的图标,卸载时FC桌面上的光驱图标就自动消失,很灵的,不管是4张盘的FC4还是DVD版的FC4都可以。采用这种方法终于可以在FC4中用“添加删除应用程序”的方法了。
回复 支持 反对

使用道具 举报

发表于 2007-8-9 12:58:02 | 显示全部楼层
把安装盘里的 gcc-c++ rpm 包 装一下再试试呢?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-10 00:14:20 | 显示全部楼层
可能吧,已经被删除掉了,因在成功安装时,发现还要第2张盘等。
回复 支持 反对

使用道具 举报

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

本版积分规则

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