在Ubuntu下编译Openoffice (4)

来源:互联网 发布:windows 7没有iis 编辑:程序博客网 时间:2024/05/11 12:58

根据《在Ubuntu下编译Openoffice (3)》的提示,输入:./bootstrap

接着输入:

source LinuxX86Env.Set.sh

or

source LinuxX86-64Env.Set.sh

然后就可以make啦!!我这里是直接用sudo make命令啦!

编译过程遇到的错误:

#######错误1:
copy libgcc_s.so.1 to ../unxlngi6.pro/lib
/bin/cp: cannot stat `libgcc_s.so.1': No such file or directory
copy failed: Bad file descriptor at /media/newDisk/OOo/OOO330_m20/solenv/bin/gccinstlib.pl line 53.
dmake:  Error code 9, while making '../unxlngi6.pro/lib/libgcc_s.so.1'


1 module(s): 
external
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:external


make: *** [all] Error 1


【FIX】将libgcc_s.so.1放到lib目录

####### 错误2:
error:../../inc/uno/lbnames.h:67:2: error: #error "Supported gcc majors are 2 , 3 and 4 <= 4.4.  Unsupported gcc major version."
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
这个应该是我的gcc版本不符合要求,太高了,高于4.5,通过apt-cache search gcc找到了gcc-4.4的版本,喜出望外地安装了,但安装发现其版本是是4.4.5,编译过程还是报错,高了0.5也不行,o(︶︿︶)o 唉.....

没办法,只能自己找gcc的低版本来安装了:

【下载gcc 4.3.2.tar.gz2】

http://debian.ustc.edu.cn/ubuntu/pool/main/g/
编译 gcc 4.3.2
sudo ./../configure --enable-languages=c,c++ --prefix=/usr/local/gcc-4.3.2 --enable-shared --with-system-zlib --without-included-gettext --enable-

threads=posix --enable-nls --enable-libstdcxx-debug --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-

gnu --target=i486-linux-gnu --disable-multilib
如果成功 make,接着 sudo make install
make gcc过程中遇到:"asm/errno.h: No such file or directory"
【解决】
查找 errno.h:

/usr/src/linux-headers-2.6.32-32/arch/sparc/include/asm/errno.h

/usr/src/linux-headers-2.6.32-32/arch/x86/include/asm/errno.h

/usr/src/linux-headers-2.6.32-32/arch/xtensa/include/asm/errno.h

机器应该是x86 ,因此做个链接即可
cd /usr/include 
sudo ln -s /usr/src/linux-headers-2.6.32-32/arch/x86/include/asm/ ./【FIX】

编译gcc的过程也很久,我那破机子,想砸掉的心都有了~~