Solaris 安装gcc-3.4.6 常见错误及解决方法
- 格式:docx
- 大小:27.20 KB
- 文档页数:8
GCC常见错误解析一、错误类型第一类∶C语法错误错误信息∶文件source.c中第n行有语法错误(syntex errror)。
这种类型的错误,一般都是C语言的语法错误,应该仔细检查源代码文件中第n行及该行之前的程序,有时也需要对该文件所包含的头文件进行检查。
有些情况下,一个很简单的语法错误,gcc会给出一大堆错误,此时要保持清醒的头脑,不要被其吓倒,必要的时候再参考一下C语言的基本教材。
第二类∶头文件错误错误信息∶找不到头文件head.h(Can not find include file head.h)。
这类错误是源代码文件中的包含头文件有问题,可能的原因有头文件名错误、指定的头文件所在目录名错误等,也可能是错误地使用了双引号和尖括号。
第三类∶档案库错误错误信息∶连接程序找不到所需的函数库,例如∶ld: -lm: No such file or directory.这类错误是与目标文件相连接的函数库有错误,可能的原因是函数库名错误、指定的函数库所在目录名称错误等,检查的方法是使用find命令在可能的目录中寻找相应的函数库名,确定档案库及目录的名称并修改程序中及编译选项中的名称。
第四类∶未定义符号错误信息∶有未定义的符号(Undefined symbol)。
这类错误是在连接过程中出现的,可能有两种原因∶一是使用者自己定义的函数或者全局变量所在源代码文件,没有被编译、连接,或者干脆还没有定义,这需要使用者根据实际情况修改源程序,给出全局变量或者函数的定义体;二是未定义的符号是一个标准的库函数,在源程序中使用了该库函数,而连接过程中还没有给定相应的函数库的名称,或者是该档案库的目录名称有问题,这时需要使用档案库维护命令ar检查我们需要的库函数到底位于哪一个函数库中,确定之后,修改gcc 连接选项中的-l和-L项。
排除编译、连接过程中的错误,应该说这只是程序设计中最简单、最基本的一个步骤,可以说只是开了个头。
关于gcc中遇到的问题,这里有你想要的全部答案前言什么是 gcc[gcc 官方网站](/)GCC(GNU Compiler Collection,GNU编译器套件),是由GNU 开发的编程语言编译器。
它是以GPL(General Public License)许可证所发行的自由软件,也是GNU 计划的关键部分(GPU 是一个软件工程项目,是 GNU's Not Unix 的缩写)。
GCC 原本作为GNU 操作系统的官方编译器,现已被大多数类Unix 操作系统(如Linux、BSD、Mac OS X等)采纳为标准的编译器,GCC 同样适用于微软的Windows。
GCC 是自由软件过程发展中的著名例子,由自由软件基金会以 GPL 协议发布。
什么是 glibc[glibc 官方网站](/software/libc/)glibc 是 gnu 发布的 libc 库,即 c 运行库。
glibc 是 linux 系统中最底层的 api,几乎其他任何的运行库都会依赖 glibc. glibc 除了封装linux 操作系统所提供的系统服务外,它本身提供了许多其它一些必要服务的实现,主要有:•string:字符串处理•signal:信号处理•dlfcn:管理共享库的动态加载•direct:文件目录操作•elf:共享库的动态加载器,即 interpreter•iconv:不同字符集的编码转换•inet:socket 接口的实现•intl:gettext 的实现•io•linuxthreads•locale:本地化•login:虚拟终端设备的管理,及系统的安全访问•malloc:动态内存管理的分配与管理•nis•stdlib•mathgcc 和 glibc 的关系首先,gcc 是编译器,基本上 linux 下所有程序(包括内核)都是gcc 编译的,libc 也是。
但 gcc 和 libc 又是相互依赖的,什么意思呢?就是在编译 c/cpp 代码时,既需要 gcc,也需要 libc.gcc 发行版本截止2021年8月,最新版本已经到 gcc11.2 了。
Intel平台Solaris[tm]操作环境常见问题我如何将多个(虚拟)IP地址绑定到一个网卡上?当在x86平台的Solaris[tm]7操作环境里创建源文件时,我总会得到一个错误"/usr/ucb/cc:?language optional software package not installed",并且编译器会异常终止。
我该怎么办?我们如何在Solaris服务器操作环境下加载Windows NT文件系统?我们从哪里可以得到Solaris操作环境支持的硬件配置清单(HCL)?我们从哪里可以下载到Solaris操作环境的DCA(设备配置助理引导盘)?我们从哪里可以得到正式的免费Solaris操作环境补丁?我们从哪里可以下载到第三方供应商的硬件驱动程序?我如何为Intel平台Solaris操作环境的网卡设置一个IP地址?我从哪里可以得到关于Sun公司Solaris操作环境认证的更多信息?Solaris操作环境不能加载光盘和软盘设备,可能的原因是什么?有配置Intel平台的Solaris操作环境显示器属性的工具吗?我正在安装Intel平台的Solaris8操作环境。
当我从DCA引导系统时,我总得到如下错误提示:Warning: ACPI tables not in reclaim memoryprom_panic:Kmem_free block already freeEntering boot debugger[12ff05]请问我在x86平台的Solaris8操作环境里如何禁用ACPI我从哪里可以得到Intel平台Solaris8操作环境的Solstice管理套件(AdminSuite[tm])软件?为什么我会在我的NFS分区上得到如下错误"RPC:Program not registered" ?我如何才能在一个Solaris服务器操作环境里拥有两个FTP端口?如果超级用户在做管理任务或正在关闭系统,我如何临时地禁止用户登录?我想实现这样的功能:在任何用户登录到系统前显示一个消息条幅。
计算机硬件知识——故障解析(七)SUNSolaris常见问题集锦SUN Solaris常见问题集锦1. Q: Solaris 的系统配置文件一般在什么地方?A: 可以查看/etc/system文件,里面有一些solaris启动时默认加载的选项,包括共享内存大小等的设置。
2. Q: 在solaris中,用户默认的Shell在什么文件中规定?A: 可以查看/etc/passwd中,用户默认的shell在这里规定。
3. Q: 如果solaris不幸忘记了root密码,如何解决?A: 可以有如下两种情况1. 工作站只有root用户,无其他用户。
2. 工作站除了root用户以外,还有其他的用户1. 如果连接了网络,我们可以采用远程缓冲溢出的方法,但是这样的方法不属于“经典”方法,且有的远程缓冲溢出具有一定的破坏性,不建议使用。
还有一种方法就是采用SUN公司自带的光盘采取引导,建议采取这种方法:1. boot cdrom -s2. fsck /dev/dsk/c0t0d0s0 (取决于根分区的设备)3. mount -F ufs /dev/dsk/c0t0d0s0 /mnt4. TERM=ansi; export TERM5. 编辑/mnt/etc shadow文件,把root对应的口令去掉。
6. 重启后的root的口令为空。
2. 如果还有普通用户,方法可以采用本地缓冲溢出,这种方法虽然破坏性小,但是也有损毁硬盘引导区的危险,建议采用“文件连接”错误是获得root权限,这种方法没有什么危险性。
4. Q: 有时候用vi编辑器的时候,显示窗口过大,如何处理?A: 只需要用鼠标拖曳终端窗口,使其缩小,即可解决。
5. Q: 共享内存大小如何设置?A: 在system文件的最后一行加入Set shmsys:shminfo_shmmax=XXX/etc/set shmsys:shminfo_shmmin=XXX这里的XXX是代表共享内存的大小。
SUN Solaris SUN Solairs服务器可能遇到的问题总结(一)(二)(三)部分1)Q:现在遇到这样一个问题,telnet一台SUN机时报下面的错误:No utmpx entry. You must exec "login" from the lowest level "shell".做了下面的处理后:cd /var/admmv utmpx utmpxbaktouch utmpxtelnet 恢复了正常,可在该机器的终端下执行login 命令时,又报了上面相同的错误。
而且重新启动机器以后,telnet时还是报相同的错误!A:进入单用户模式,清空(不是删除)这两个文件# cat /dev/null > /var/adm/wtmpx# cat /dev/null > /var/adm/utmpx之后,重新启动系统找了很多国外的论坛,都是这么说的:The problem comes if utmp or wtmp file becomes corrupted . You need to initialize these and reboot the system to correct the error.These files are log files and can be initialized without affecting the system, as long as you reboot the system after truncating the files. Perform these steps:1. Bring the system into System Maintenance mode.2. Make copies of the files /etc/utmp, /etc/utmpx, /etc/wtmp, and/etc/wtmpx before proceeding with the next step.3. Delete the contents of these files by executing the followingcommands:# > /etc/utmp# > /etc/wtmp# > /etc/utmpx# > /etc/wtmpx4. Shutdown the system:# shutdown -y -g0Restart the system2)Q:我用setenv PA TH=$PATH:/path/to/my/program的方式来赋值,总显示语法或者修饰符有问题。
个人总结:1. gcc 预处理阶段-E常见错误:No such file or directorygcc -E file.c -o file.i 其中file.i为预处理后的c文件,gcc所做的工作是将头文件的内容迭代包含到i 文件,c文件的代码不变。
此时如果gcc在默认路径没有搜索到c 文件中包含的h文件,则出现错误。
i 文件仍是c文件。
解决办法:增加搜索路径。
2.gcc 编译阶段-S常见错误:变量未声明;expected ";" before ;提供给函数"function-name"的参数太少这一阶段将c文件转为s 汇编文件,会对变量是否声明,“;”是否缺失等进行简单语法检查;但并不对函数是否声明进行检查,即使没有声明第一次使用,函数转换后的汇编为:call function-name 。
解决办法:查看变量的声明是否被包含进c文件,是否头文件未包含,或根本未定义。
语句末加" ; "。
函数声明的参数少于调用时的参数不会出现问题,反过来就不可以。
3.gcc 汇编阶段-c4.gcc 链接阶段常见错误:a) 如:In function ' main': undefined reference to ' funtion-name'Collect2: ld return 1解决办法:不能找到函数的声明,看是否函数声明了,或者相应的头文件有无包含。
b) 如:解决办法:5 Segmentation fault报错Char* string;String = (char*)malloc(sizeof(char)*1000);String="";Strcat(string, "sfasfasf");原因:string="", 使string指针指向另一块地址,不再是malloc申请的地址。
Solaris9(sparc)系统安装gcc-3.1步骤Solaris上安装gcc编译器,目前SUN公司售出的机器,处理器有两种一种是,intel处理器,也就是常说的x86或i386,另一种就是RISC处理器。
如何判断是那个处理器,只要在命令行中输入uname –a 就可以看出来。
如果是intel处理器的有i386的字样,如果是RISC处理器,就会有sparc的字样。
这样就要到不同的网站去下载对应的gcc包。
Intel处理器可以到ftp:///pub/freeware/intel/9/RISC处理器的到ftp:///pub/freeware/sparc/9/下边我们RISC处理器为例,介绍Solaris9安装gcc-3.1的过程步骤如下:1、查看操作系统及版本Solaris9#uname -aSunOS an-host 5.9 Generic_117171-07 sun4u sparc SUNW,Sun-Blade-1500 这个就是一个标准的SUN工作站,其中的处理器为RISC,因为有sparc的字样。
主机名为an-host。
2、下载gcc和lib库从下载gcc,libiconv,make文件#wget ftp:///pub/freeware/sparc/9/gcc-3.1-sol9-intel-local.gz#wget ftp:///pub/freeware/sparc/9/libiconv-1.8-sol9-intel-local.gz#wget ftp:///pub/freeware/sparc/9/make-3.80-sol9-intel-local.gz分别得到下边这三个文件gcc-3.1-sol9-intel-local.gzlibiconv-1.8-sol9-intel-local.gzmake-3.80-sol9-intel-local.gz3、安装可以用ssh以root的身份(这样有权限修改文件)登录Solaris系统,如果root不能登录的话可以编辑文件sshd_config.conf#cd /etc/ssh#vi sshd_config.conf修改PermitRootLogin no 为PermitRootLogin yes重新启动ssh服务#cd /etc/init.d# ./sshd stop# ./sshd start或者直接reboot就可以root登录了。
gcc常见的编译警告与错误(按字母顺序排列)备课讲稿g c c常见的编译警告与错误(按字母顺序排列)gcc 常见的编译警告与错误(按字母顺序排列)C语言初学者遇到的最大问题往往是看不懂编译错误,进而不知如何修改程序。
有鉴于此,本附录罗列了用gcc编译程序时经常出现的编译警告与错误。
需要提醒读者的是,出现警告(warning)并不影响目标程序的生成,但出现错误(error)则无法生成目标程序。
为便于读者查阅,下面列出了经常遇到的警告与错误,给出了中英文对照(英文按字典顺序排列),并对部分错误与警告做了必要的解释。
#%s expects \FILENAME\ or …#%s 需要 \FILENAME\ 或…#%s is a deprecated GCC extension#%s 是一个已过时的 GCC 扩展#%s is a GCC extension#%s 是一个 GCC 扩展#~ error:#~ 错误:#~ In file included from %s:%u#~ 在包含自 %s:%u 的文件中#~ internal error:#~ 内部错误:#~ no newline at end of file#~ 文件未以空白行结束#~ warning:#~ 警告:#elif after #else#elif 出现在 #else 后#elif without #if#elif 没有匹配的 #if#else after #else#else 出现在 #else 后#else without #if#else 没有匹配的 #if#endif without #if#endif 没有匹配的 #if#include nested too deeply#include 嵌套过深#include_next in primary source file #include_next 出现在主源文件中#pragma %s %s is already registered #pragma %s %s 已经被注册#pragma %s is already registered#pragma %s 已经被注册#pragma once in main file#pragma once 出现在主文件中#pragma system_header ignored outside include file #pragma system_heade 在包含文件外被忽略%.*s is not a valid universal character%.*s 不是一个有效的 Unicode 字符%s in preprocessing directive预处理指示中出现 %s%s is a block device%s 是一个块设备%s is shorter than expected%s 短于预期%s is too large%s 过大%s with no expression%s 后没有表达式%s: not used because `%.*s’ defined as `%s’ not `%.*s’ %s:未使用因为‘%.*s’被定义为‘%s’而非‘%*.s’%s: not used because `%.*s’ is poisoned%s:未使用因为‘%.*s’已被投毒%s: no t used because `%.*s’ not defined%s:未使用因为‘%.*s’未定义%s: not used because `%s’ is defined%s:未使用因为‘%s’已定义%s: not used because `__COUNTER__’ is invalid%s:未使用因为‘__COUNTER__’无效(\%s\ is an alternative token for \%s\ in C++)(在 C++ 中“%s”会是“%s”的替代标识符)(this will be reported only once per input file)(此警告为每个输入文件只报告一次)\%s\ after # is not a positive integer# 后的“%s”不是一个正整数\%s\ after #line is not a positive integer#line 后的“%s”不是一个正整数\%s\ cannot be used as a macro name as it is an operator in C++ “%s”不能被用作宏名,因为它是 C++ 中的一个操作符\%s\ is not a valid filename“%s”不是一个有效的文件名\%s\ is not defined“%s”未定义\%s\ may not appear in macro parameter list“%s不能出现在宏参数列表中\%s\ re-asserted重断言“%s”\%s\ redefined“%s重定义\/*\ within comment“/*出现在注释中\\x used with no following hex digits\\x 后没有 16 进制数字\defined\ cannot be used as a macro name“defined不能被用作宏名__COUNTER__ expanded inside directive with -fdirectives-only带 -fdirectives-only 时 __COUNTER__ 在指示中扩展__VA_ARGS__ can only appear in the expansion of a C99 variadic macro __VA_ARGS__ 只能出现在 C99 可变参数宏的展开中_Pragma takes a parenthesized string literal_Pragma 需要一个括起的字符串字面常量‘%.*s’ is not in NFC‘%.*s’不在 NFC 中‘%.*s’ is not in NFKC‘%.*s’不在 NFKC 中‘##’ c annot appear at either end of a macro expansion‘##’不能出现在宏展开的两端‘#’ is not followed by a macro parameter‘#’后没有宏参数‘$’ in identifier or number‘$’出现在标识符或数字中‘:’ without preceding ‘?’‘:’前没有‘?’‘?’ without following ‘:’‘?’后没有‘:’'return' with a value, in function returning void在void返回类型的函数中,return返回值。
目录目录 (1)常见问题解答 (4)操作系统部分常见问题解答 (4)1. 如何正确开启、关闭工作站 (4)2. 如何正确使用工作站的CD-ROM (5)3. 如何正确使用磁带机 (5)4. 如何正确使用软盘 (5)5. 如何让工作站从光驱启动 (6)6. 如何修改工作站的主机名 (6)7. 如何修改工作站网卡的IP地址 (7)8. 如何查看工作站的分区使用情况 (7)9. 用ftp程序传送文件,发现文件大小有变化 (8)10. 如何取消工作站的ftp与 telnet服务 (8)11. 如何通过网络安装UNIX操作系统 (8)12. 如何创建另一个超级用户 (9)13. Solaris一般用户口令丢失的处理 (10)14. Solaris超级用户root口令丢失的处理 (10)15. 如何在X.WIN模拟终端上或别的客户端工作站上能够以root用户登录? (10)16. 如何处理口令过时问题 (11)17. 计算机不能通过直联网线和SUN工作站相联 (11)18. 工作站异常关机后的处理 (11)19. 工作站对键盘和鼠标失去反应、工作站死机怎么办 (11)20. 用mapview用户登录CDE时,口令验证通过,但进入桌面后就死机,该如何处理 (13)21. 如何查看系统信息 (13)22. 如何在Solaris系统下寻求帮助 (13)23. SUN工作站的夏时制问题 (14)24. 如何屏蔽电源键 (14)25. solaris光盘取不出的处理 (15)26. 在 A8010网管拓扑视图中,增加IP设备失败。
(16)27. 因下端设备的板件发生变化,而导致网管拓扑出现告警 (16)28.A8010接入服务器安装设置完成,拓扑不能正确反映设备状态,图标呈蓝色。
(16)29.容量配置问题导致sybase服务器不能安装 (17)30.因软件设计缺陷导致N2000客户端无法运行 (17)31.环境变量配置错误导致 iMaganer 平台远程客户端无法启动 (18)32.在Solaris 7.0平台安装SYbase 11.9由于tempdb.dat设置太大导致安装SYbase 11.9失败 (19)33.宽带产品iManagerN2000网管安装由于Sun工作站PROM参数出错导致显示器黑屏 (19)34.上下级网管之间通信,大于292字节网络就不通 (20)35.用N2000标准客户端的方式同时访问多台N2000 Server的实现方法 (21)36.在xwinpro仿真终端上不能显示网管中的“全网浏览树” (21)37.因BAM的时间问题而造成的“性能业务应用”的所有模板9月份数据统计不到 (22)38.因Solaris安装时选择中文字体为zh.GBK导致N2000网管启动后界面显示出现乱码.. 22 39.一种特殊的5100网管通道规划 (23)40.由于局点名称相同导致ATM网卡的PVC表无法建立 (23)41.由于master数据库的spt_values遭到破坏导致N2000无法查询数据库空间使用情况. 2542.由于把所有的MA5100设备规划为同一网段导致无法使两条静态路由同时生效 (26)43. MIB Browser使用小经验 (27)44. Sun工作站Solaris操作系统安装后不能启动。
Solaris的启动问题及解决办法Booting problems poses serious challenge to the system administrators as system is down and no one can use it . This article tries to cover some of the general booting problems and their possible solutions to enable understand the problem cause and bring the system up very quickly.Following are some of the booting issues ,error messages their meaning and possible solutions1) Booting in single user mode and mounting root hard disk.2) Making boot device alias3) "Timeout waiting for ARP/RARP packet"? error message.4) "The file just loaded does not appear to be executable." error message.5) "bootblk: can't find the boot program" error message.6) "boot: cannot open kernel/unix" error message .7) "Error reading ELF header."? error message .8) "Cannot open '/etc/path_to_inst'" error message.9) "Can't stat /dev/rdsk/c0t3d0s0" error message .1.Booting in single user mode and mounting root hard disk.Most important step in diagnosing the booting problems is booting the system in single user mode and examining the hard disk for possible errors & work out the corrective measure. Single user mode can be achieved by any of the following methods :- ok> boot -s ;from root diskok> boot net -s ;from networkok>boot cdrom -s ;from cdromRebooting with command: cdrom -sConfiguring the /devices directoryConfiguring the /dev directory |INIT: SINGLE USER MODE## fsck /dev/rdsk/c0t3d0s0# mount /dev/dsk/c0t3d0s0 /mntPerform the required operation on mounted disk , now accessible through /mnt ,& unmount the hard disk after you are done ;# umount /mnt# reboot2.Making boot device aliasIn case system can not boot from primary disk and it is needed to make another boot disk to access the data , nvalias command is used .nvalias command makes the device alias and assigns an alternate name to a physical disk. Physical address of target disk is required which can be had by show-disk command on ok>.ok> nvalias disk7 /iommu@f,e0000000/sbus@f,e0001000/dma@3,81000/esp@3,8 0000/sd2,0The new aliased disk can be named as boot disk or can beused for booting by refering its name .ok> setenv boot-device disk7ok>resetorok> boot disk73."Timeout waiting for ARP/RARP packet"?At ok> type printenv and look for these parameters .boot-device diskmfg-switch? falsediag-switch? falseif you see "boot-device net " or true value for the other two parameter change it to the values above.In case you wants to boot from network make sure your client is properly configured in boot server and network connections & configuration are proper.4."The file just loaded does not appear to be executable."Boot block on the hard disk is corrupted .Boot the system in single user mode with cdrom and reinstall boot block . #installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s05."bootblk: can't find the boot program"boot block can not find the boot programe - ufsboot in Solaris .Either ufsboot is missing or corrupted . In such cases it can be restored from the cdrom after booting from cdrom & mounting the hard disk# cp /platform/`uname -i`/ufsboot /mnt/platform/`uname -i`6."boot: cannot open kernel/unix"Kernel directory or unix kernel file in this directory is not found .Probably deleted during fsck or deleted by mistake .Copy it from the cdrom or restore from the backup tape.# cp /platform/`uname -i`/kernel/unix /mnt/platform/`uname -i`/kernel7."Error reading ELF header."?Kernel directory or unix kernel file in this directory is corrupted.Copy it from the cdrom or restore from the backup tape.# cp /platform/`uname -i`/kernel/unix /mnt/platform/`uname -i`/kernel8."Cannot open '/etc/path_to_inst'"System can not find the /etc/path_to_install file .It might be missing or corrupted and needs to be rebuild.To rebuild this file boot the system with -ar option :ok>boot -arPress enter to select default values for the questions asked during booting and select yes to rebuild /etc/path_to_install The /etc/path_to_inst on your system does not exist or is empty. Do you want to rebuild this file [n]? ysystem will continue booting after rebuilding the file.9."Can't stat /dev/rdsk/c0t3d0s0"When booted from cdrom and done fsck the root partition comes out to be fine but on booting from root disk this error occurs. The device name for / is missing from /dev/dsk directoryand to resolve the issue /dev & /devices directories has to be restored from root backup tapes .5."bootblk: can't find the boot program"boot block can not find the boot programe - ufsboot in Solaris .Either ufsboot is missing or corrupted . In such cases it can be restored from the cdrom after booting from cdrom & mounting the hard disk# cp /platform/`uname -i`/ufsboot /mnt/platform/`uname -i` `uname -i` 应该是 `uname -m`。
Solaris Container上 Source包安装gcc-3.4.6 部分报错及解决(OS version : s9)(2012-03-21 21:42:25)转载▼分类:技术文档标签:gcc-3.4.6solaris9杂谈Solaris 9 安装gcc3.4.6LD_LIBRARY_PATH=/usr/local/curl/lib:/usr/local/zlib/lib:/usr/local/curl/lib:/usr/local/zlib/lib:/usr/ local/lib:/usr/lib:/usr/local/lib:/opt/openssl/lib:/usr/sfw/lib:/opt/csw/lib:/usr/ccs/libPATH=/usr/local/curl/bin:/usr/local/make-3.82/bin:/usr/local/autoconf/bin:/bin:/usr/bin:/usr/ccs /bin:/usr/local/autoconf/bin:/usr/local/curl/bin:/usr/local/bin:/proj/application/tools/openssl-0.9.8r-sol-sparc/bin:/sbin:/opt/quest/bin因为我尝试多次安装git都有报错,所以我想升级gcc的版本,从3.3.2升级到3.4.6。
所以,我现在安装gcc,但是在make 的时候发生报错:configuring in libF77running /bin/sh ../../.././libf2c/libF77/configure --host=sparc-sun-solaris2.9 --build=sparc-sun-solaris2.9 --enable-multilib --with-gcc-version-trigger=/tmp/gcc-3.4.6/gcc/version.c --program-transform-name=s,y,y, --with-target-subdir=sparc-sun-solaris2.9 --cache-file=.././config.cache --srcdir=../../.././libf2c/libF77loading cache .././config.cachechecking for gcc... (cached) /tmp/gcc-3.4.6/gcc/xgcc -B/tmp/gcc-3.4.6/gcc/ -B/usr/local/sparc-sun-solaris2.9/bin/ -B/usr/local/sparc-sun-solaris2.9/lib/ -isystem /usr/local/sparc-sun-solaris2.9/include -isystem /usr/local/sparc-sun-solaris2.9/sys-includechecking whether we are using GNU C... (cached) yeschecking whether /tmp/gcc-3.4.6/gcc/xgcc -B/tmp/gcc-3.4.6/gcc/ -B/usr/local/sparc-sun-solaris2.9/bin/ -B/usr/local/sparc-sun-solaris2.9/lib/ -isystem /usr/local/sparc-sun-solaris2.9/include -isystem /usr/local/sparc-sun-solaris2.9/sys-include accepts -g... (cached) yeschecking whether make sets ${MAKE}... (cached) yeschecking how to run the C preprocessor... (cached) /tmp/gcc-3.4.6/gcc/xgcc -B/tmp/gcc-3.4.6/gcc/ -B/usr/local/sparc-sun-solaris2.9/bin/ -B/usr/local/sparc-sun-solaris2.9/lib/ -isystem /usr/local/sparc-sun-solaris2.9/include -isystem /usr/local/sparc-sun-solaris2.9/sys-include -Echecking for stdio.h... (cached) yeschecking for ANSI C header files... (cached) yeschecking for posix... (cached) yeschecking return type of signal handlers... voidchecking for drem in -lm... noupdating cache .././config.cachecreating ./config.statuscreatingMakefilemake[1]: Entering directory `/tmp/gcc-3.4.6/sparc-sun-solaris2.9/libf2c'rm -f config.cachecd /tmp/gcc-3.4.6/libf2c &&autoconf/bin/sh: autoconf: not foundmake[1]: *** [/tmp/gcc-3.4.6/libf2c/configure] Error 1make[1]: Leaving directory `/tmp/gcc-3.4.6/sparc-sun-solaris2.9/libf2c'make: *** [all-target-libf2c] Error 2bash-2.05#查找了一些资料,找到这篇经验文档/ml/cygwin/1998-07/msg00162.htmlJust a simple timestamp problem, nothing more. You can do one of twothings:1. Change the timestamp (using "touch") on the regenerated files suchconfigure and config.status; or,2. Install autoconf.Normally, packagers are careful to get the timestamps right, so it mightbe a local problem (clock skew, time change etc).这里边解释为timestamp的问题,安装autoconf 2.68……checking whether we are using GNU C... (cached) yeschecking whether /tmp/gcc-3.4.6/gcc/xgcc -B/tmp/gcc-3.4.6/gcc/ -B/usr/local/gcc-3.4.6//sparc-sun-solaris2.9/bin/ -B/usr/local/gcc-3.4.6//sparc-sun-solaris2.9/lib/ -isystem /usr/local/gcc-3.4.6//sparc-sun-solaris2.9/include -isystem /usr/local/gcc-3.4.6//sparc-sun-solaris2.9/sys-include accepts -g... (cached) yeschecking whether make sets ${MAKE}... (cached) yeschecking how to run the C preprocessor... (cached) /tmp/gcc-3.4.6/gcc/xgcc -B/tmp/gcc-3.4.6/gcc/ -B/usr/local/gcc-3.4.6//sparc-sun-solaris2.9/bin/ -B/usr/local/gcc-3.4.6//sparc-sun-solaris2.9/lib/ -isystem /usr/local/gcc-3.4.6//sparc-sun-solaris2.9/include -isystem /usr/local/gcc-3.4.6//sparc-sun-solaris2.9/sys-include -Echecking for stdio.h... (cached) yeschecking for ANSI C header files... (cached) yeschecking for posix... (cached) yeschecking return type of signal handlers... voidchecking for drem in -lm... noupdating cache .././config.cachecreating ./config.statuscreatingMakefilemake[1]: Entering directory `/tmp/gcc-3.4.6/sparc-sun-solaris2.9/libf2c'rm -f config.cachecd /tmp/gcc-3.4.6/libf2c &&autoconfconfigure.in:38: error: defn: undefined macro: _AC_PROG_CC_GNUaclocal.m4:150: GLIBCPP_CONFIGURE is expanded from...configure.in:38: the top levelautom4te: m4 failed with exit status: 1make[1]: *** [/tmp/gcc-3.4.6/libf2c/configure] Error 1make[1]: Leaving directory `/tmp/gcc-3.4.6/sparc-sun-solaris2.9/libf2c'make: *** [all-target-libf2c] Error 2bash-2.05#根据资料/ml/gcc/2003-06/msg00347.htmlAfter some research, and trial and error, I found that this incarnation ofconfigure.indoesn't seem to work well with a newer version of autoconf. The version ofautoconf that I used was 2.53. The configure script mentions 2.13 as theversion it was built with. So, I downloaded and a copy of version 2.13 ofautoconf, installed it, and ran it, and it ran without problems.GCC3.x 和autoconf2.13的兼容性更好,而且2.68里有bug,应该是自己的configure和2.68有冲突,删除autoconf-2.68,尝试安装autoconf-2.13。