在升级2台机器openssl-0.9.8i时都,安装到make test时都出现了[test_bn] line 139的错误.比较2台机器的版本是redhat 7.2 和redhat 7.3都是比较老的版本。
检查GCC版本 2.9.6-110 升级到3.2.1发现错误依旧。 后来通过在编译选项上加上 no-sse2,make test通过。
另一种方法是升级binutils。但是我选择了第一种版本,在openssh-5.1p1时很顺利,但是在安装squid-3.0stables10时,又出现了奇怪的问题,在另一台机器上面也是一样 错误。
make[1]: Entering directory `/usr/local/src/squid-3.0.STABLE10/src'
depbase=`echo cf_gen.o | sed 's|[^/]*$|.deps/&|;s|/.o$||'`; /
if g++ -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=/"/usr/local/squid/etc/squid.conf/" -I. -I. -I../include -I. -I. -I../include -I../include -I../lib/libTrie/include -I/usr/include/libxml2 -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -fhuge-objects -g -O2 -MT cf_gen.o -MD -MP -MF "$depbase.Tpo" -c -o cf_gen.o cf_gen.cc; /
then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
cf_gen.cc:120: `const char WS[]' redeclared as different kind of symbol
/usr/include/g++-3/stream.h:56: previous declaration of `istream &WS
(istream &)'
make[1]: *** [cf_gen.o] Error 1
make[1]: Leaving directory `/usr/local/src/squid-3.0.STABLE10/src'
make: *** [all-recursive] Error 1
ps:其实原始错误是includ/Rang.h找不到ostream,但是我在/usr/includ/g++下面是可以看到这个文件的,因此我修改了原文件把includ <ostream> 为includ <ostream.h> 就出现了上面的错误。
用make执行squid-2.6的编译是正常的,看来2.6--3.0的升级变化还是挺大的。
解决方法:升级binutils http://www.gnu.org/software/binutils/