Thứ Hai, 27 tháng 6, 2011

A try on LibO build

Đang build thử LibO trên CentOS 5.6
(Với Fedora, chắc chắn cũng tương tự)

Đọc http://www.documentfoundation.org/develop/

Thử git clone git://anongit.freedesktop.org/libreoffice/bootstrap
=> bị báo lỗi chưa cài git
=> Google git và cài

wget http://kernel.org/pub/software/scm/git/git-1.7.5.4.tar.bz2
tar xvjf git-1.7.5.4.tar.bz2
cd git
./configure; make; make install -> cài xong

sau đó chạy lại
git clone git://anongit.freedesktop.org/libreoffice/bootstrap


cd bootstrap
./autogen.sh --with-num-cpus=2


lại bị báo lỗi thiếu jdk, python...
-> Cài bằng lệnh

sudo yum -y install java-1.6.0-openjdk-devel
sudo yum -y install python-devel

Chú ý: devel

Cứ như thế, chạy

./autogen.sh --with-num-cpus=2

và cài các gói bị thiếu cho đến khi hết lỗi thì OK.


Chắng hạn như

checking for jakarta-ant... no
checking for ant... /opt/ant/bin/ant
checking if /opt/ant/bin/ant works... Ant works
checking Ant lib directory... Ant lib directory found.
checking whether Ant is >= 1.6.0... yes, 1.8.2
checking for JUnit 4... no
configure: error: cannot find JUnit 4 jar; please install one in the default
location (/usr/share/java), specify its pathname via
--with-junit=..., or disable it via --without-junit

-> Thiếu junit

Ok, vậy thì disable thử junit và build

 ./autogen.sh --with-num-cpus=2 --without-junit

-> lần này thì OK

setting up the post_download check script
configure: creating ./config.status
config.status: creating ooo.lst
config.status: creating set_soenv
config.status: creating Makefile
config.status: creating bin/repo-list
Setting up the environment for building LibreOffice
Setting Linux x86 specific values... done

******************************
**********************************************
*
* LibreOffice configuration finished.
*
****************************************************************************
To build, issue:
make

To install when the build is finished, issue:
make install

If you want to develop LibreOffice, you might prefer:
make dev-install

If you want to run the smoketest, issue:
make check

->

sau đó sẽ chạy make, sẽ ra lỗi nhưng gặp lỗi đâu thì sửa đấy.


1 nhận xét:

  1. Build lỗi:
    http://pastebin.com/S3J1DxBu

    Hóa ra cần patch cái này :)
    http://pkgs.fedoraproject.org/gitweb/?p=libreoffice.git;a=blob_plain;f=vbahelper.visibility.patch;hb=HEAD

    Trả lờiXóa