根據《在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的過程也很久,我那破機子,想砸掉的心都有了~~