在Ubuntu下编译Openoffice (5)

经过了一番折腾,gcc 4.2.3终于编译完了,在sudo make install 之后 终于在 /usr/local/下看到了gcc的目录!!

小小的成就感,接下来link 到 /usr/bin/ 下的gcc:

sudo ln -sf /usr/local/gcc-4.2.3/bin/gcc /usr/bin/gcc 

最后check一下: 

gcc --version

看到版本信息,gcc的版本总算降下来了。

接下来又要继续编译Openoffice,时间不够 了,明天再搞吧。


-----------------------------------------------2011年7月28日 10:51:43


今天早上过来发现还是有昨天的那个问题:“Supported gcc majors are 2 , 3 and 4 <= 4.4.  Unsupported gcc major version”,以为改了gcc的版本就ok了,郁闷.....

想到现在g++版本也还是4.5,于是也改为gcc-4.2.3目录下bin目录中的g++,也就是4.2.3版本,发现没报“Supported gcc majors are 2 , 3 and 4 <= 4.4.  Unsupported gcc major version”这个错误了,但另一个错误又出现了:

/usr/include/c++/4.5/cstring: In function 'void* std::memchr(void*, int, size_t)':
/usr/include/c++/4.5/cstring:102: error: '__builtin_memchr' was not declared in this scope
dmake:  Error code 1, while making '../../unxlngi6.pro/slo/LogBridge.obj'

1 module(s): 
	cppu
need(s) to be rebuilt

Reason(s):

Attention: if you fix the errors in above module(s) you may prolongue your the build issuing command:

	build --all:cppu

make: *** [all] Error 1

唉,那就继续奋斗吧.........

-------------------------------------------------------------------------------2011年7月28日 11:36:32

上面 的问题解决了,其实是自己不够细心,想想只是简单地把编译器的可执行文件(gcc/g++)换了版本而没有把对应的库也换掉肯定是不行的!!

从错误信息可以看到系统默认到/usr/include/c++/4.5下去找相应的头文件,所以想想只要把这个库文件夹也换了就可以了吧,试试便知。

把 我编译好的gcc-4.2.3下的include/c++/4.2.3复制到了/usr/include/c++目录下,为了谨慎起见,把4.5备份一份。

然后 把4.5删除掉:sudo rm -r 4.5

然后把4.2.3改名为4.5,直接mv就行了 sudo mv 4.2.3 4.5.

然后 继续编译OOo,OK,没报那个问题了!!!(*^__^*) 

编译进行中.........

------------------------------------------------------------------------------------------------2011年7月28日 13:59:05

下午发现又出错误了:

Entering /media/newDisk/OOo/OOO330_m20/lucene


mkout -- version: 1.8
if [ -f ./unxlngi6.pro/misc/build/lucene-2.3.2 ] ; then mv ./unxlngi6.pro/misc/build/lucene-2.3.2 ./unxlngi6.pro/misc/build/lucene-2.3.2_removeme ; fi
make writeable...
patching file lucene-2.3.2/common-build.xml
mkdir: cannot create directory `./unxlngi6.pro/misc/build/lucene-2.3.2/.': File exists
Buildfile: ./contrib/analyzers/build.xml
     [echo] Building analyzers...


BUILD FAILED
/media/newDisk/OOo/OOO330_m20/lucene/unxlngi6.pro/misc/build/lucene-2.3.2/common-build.xml:454: Class org.apache.tools.ant.taskdefs.MacroDef$TemplateElement doesn't support the "implicit" attribute.



Total time: 3 seconds
dmake:  Error code 1, while making './unxlngi6.pro/misc/build/so_built_so_lucene'

【解决】试过找到把common-build.xml,把 implicit去掉,但随后又出现了另外一些元素不支持的错误,如不支持classpath,想想是因为Class org.apache.tools.ant.taskdefs.MacroDef$TemplateElement  不支持,那么会不会是我的Ant版本太低了呢,我的是1.6.0的,于是把Ant换成了1.8的,办法依然是偷梁换柱,把下载1.8的ant放到/usr/local/apache-ant-1.6.0,原先的apache-ant-1.6.0做个备份后删除。

最终问题解决!!


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值