在Ubuntu下編譯Openoffice (4)

來源:互聯網
上載者:User

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


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.