Difference between revisions of "JA/Documentation/Building Guide/Building on Linux"

From Apache OpenOffice Wiki
Jump to: navigation, search
(翻訳作業)
m (翻訳作業)
Line 54: Line 54:
 
* gtk2 and libtiff including the development headers<ref name="Foot4e">{{Template:Documentation/Note|The gtk2, jpeg and tiff libraries are not required if you disable the crash-reporter when running <CODE>./configure</CODE>.}}</ref>
 
* gtk2 and libtiff including the development headers<ref name="Foot4e">{{Template:Documentation/Note|The gtk2, jpeg and tiff libraries are not required if you disable the crash-reporter when running <CODE>./configure</CODE>.}}</ref>
 
* 開発用ヘッダーを含む gtk2 と libriff<ref name="Foot4">{{Template:Documentation/Note|<CODE>./configure</CODE> を実行するときに、クラッシュレポーターを無効にするのなら、 gtk2 や jpeg および tiff ライブラリは必要ではありません。}}</ref>
 
* 開発用ヘッダーを含む gtk2 と libriff<ref name="Foot4">{{Template:Documentation/Note|<CODE>./configure</CODE> を実行するときに、クラッシュレポーターを無効にするのなら、 gtk2 や jpeg および tiff ライブラリは必要ではありません。}}</ref>
 +
 +
(訳注:[http://wiki.services.openoffice.org/wiki/Ubuntu_Build_Instructions]にUbuntu 9.10用のパッケージインストールのスクリプトがあります。また、訳者の環境では、さらに libcurl3-gnutls-dev のインストールが必要でした。)
  
 
= Full Builds / 完全ビルド =
 
= Full Builds / 完全ビルド =
Line 88: Line 90:
 
OpenOffice.org をビルドするために必要な dmake を作成します。
 
OpenOffice.org をビルドするために必要な dmake を作成します。
  
== setting the environment ==
+
== setting the environment / 環境の設定 ==
  
When the configure script has been run successfully a file <code>LinuxX86Env.Set.sh</code> was created<ref name="Foot5">{{Template:Documentation/Note|When you want to use tcsh instead of bash, you will need to use the file <code>LinuxX86Env.Set</code> instead:<br>
+
When the configure script has been run successfully a file <code>LinuxX86Env.Set.sh</code> was created<ref name="Foot5e">{{Template:Documentation/Note|When you want to use tcsh instead of bash, you will need to use the file <code>LinuxX86Env.Set</code> instead:<br>
 
<pre> source LinuxX86Env.Set
 
<pre> source LinuxX86Env.Set
 
  rehash</pre>
 
  rehash</pre>
 
If you do not use tcsh, it is better to delete that file, as it will get in the way for tab-completion sooner or later.}}
 
If you do not use tcsh, it is better to delete that file, as it will get in the way for tab-completion sooner or later.}}
 
</ref>.
 
</ref>.
Do this:
+
Do this:<br>
 +
configure スクリプトが正常に実行されると、 <code>LinuxX86Env.Set.sh</code> が作成されます。<ref name="Foot5">{{Template:Documentation/Note|bash の代わりに tcsh を使用している場合は、代わりに <code>LinuxX86Env.Set</code> を使用します。<br>
 +
<pre> source LinuxX86Env.Set
 +
rehash</pre>
 +
tcsh を使用していないなら、タブ補完の邪魔になるので、このファイルを削除する方が良いでしょう。}}
 +
</ref>
  
 
  source LinuxX86Env.Set.sh
 
  source LinuxX86Env.Set.sh
  
to set up the environment for the build<ref name="Foot6">By default, native packages (.deb/.rpm) will be build.<br>
+
to set up the environment for the build<ref name="Foot6e">By default, native packages (.deb/.rpm) will be build.<br>
 
{{Template:Documentation/Tip|If you want to have something faster and easier to test:<br>
 
{{Template:Documentation/Tip|If you want to have something faster and easier to test:<br>
 
<pre>export FORCE2ARCHIVE=true</pre>
 
<pre>export FORCE2ARCHIVE=true</pre>
 
This will create a tarball that can easily be unpacked and run anywhere.}}
 
This will create a tarball that can easily be unpacked and run anywhere.}}
 +
</ref>.<br>
 +
ビルドのための環境をセットします。<ref name="Foot6">デフォルトでは、ネイティブパッケージ(.deb/.rpm) をビルドします。<br>
 +
{{Template:Documentation/Tip|もし、高速で簡単にテストをしたい場合は、<br>
 +
<pre>export FORCE2ARCHIVE=true</pre>
 +
これは、どこでも簡単に解凍・実行できるターボール(tarball) を作成します。}}
 
</ref>.
 
</ref>.
  
== starting the build ==
+
== starting the build / ビルドの開始 ==
Build the software by typing the following in <code>$SRC_ROOT</code><ref name="Foot7">{{Template:Documentation/Note|You can also run:<br>
+
Build the software by typing the following in <code>$SRC_ROOT</code><ref name="Foot7e">{{Template:Documentation/Note|You can also run:<br>
 
<pre>make</pre>
 
<pre>make</pre>
 
but GNU/make will just start dmake. You can also run the following in the <code>instetoo_native</code> module:<br>
 
but GNU/make will just start dmake. You can also run the following in the <code>instetoo_native</code> module:<br>
Line 112: Line 124:
 
For details run:<br>
 
For details run:<br>
 
<pre>build --help</pre>}}
 
<pre>build --help</pre>}}
</ref>:
+
</ref>:<br>
 +
<code>$SRC_ROOT</code> で以下を打ち込んでビルドを開始します。<ref name="Foot7e">{{Template:Documentation/Note|代わりに以下を実行できます。<br>
 +
<pre>make</pre>
 +
しかし、 GNU/make は dmake を開始するだけです。また、 <code>instetoo_native</code> モジュールで以下を実行できます。<br>
 +
<pre>build --all</pre>
 +
詳細を見るには以下を実行します。<br>
 +
<pre>build --help</pre>}}
 +
</ref>
 
  dmake
 
  dmake
  
 
The building procedure will take at least an hour (on a 3 GHz Quad-Core with 8GB RAM).
 
The building procedure will take at least an hour (on a 3 GHz Quad-Core with 8GB RAM).
 +
ビルドには、(3GhzのクアッドコアCPU,8GByteのメモリーで)少なくとも1時間かかるでしょう。
  
 
= Partial Builds =
 
= Partial Builds =

Revision as of 12:08, 12 January 2010

Book.png
[[{{{PrevPage}}}|< 前のページ]] [[{{{NextPage}}}|次のページ >]]

このページは翻訳作業中です(User:Matayoshi)。
翻訳ステータス:翻訳中 −> 査読 −> 完成
使用した原文の更新日時:2009年12月13日(日)22:56

Overview / 概要

Template:Documentation/Linux Template:Documentation/Note Template:Documentation/Tip

Requirements / システム要件

hardware requirements / ハードウェア

  • 1 or more reasonable fast CPUs, x-way CPU's recommended.
  • 1つ以上の高速な CPU(複数の CPU を推奨します)
  • 1 GB Ram ( 2 GB recommended )
  • 1GByte のメモリー(2GByte を推奨)
  • at least 10 GB free disk space
  • 10GByte 以上のハードディスク空き容量

software requirements / ソフトウェア

  • glibc:
    • for OOo<=3.1: 2.2.x or higher
    • OOo3.1以前 : 2.2.x もしくは、それ以降
    • for OOo>3.1: 2.3.2 or higher
    • OOo3.1より後 : 2.3.2 もしくは、それ以降
  • C/C++ Compiler:
  • C/C++ コンパイラー:
    • gcc >= 3.3
    • gcc 3.3 以降
    • gcc 4.2.3 is the current reference compiler
    • gcc 4.2.3 が最新版です(訳注:4.4.2が最新です)
  • The X11 development libraries and header files[1]
  • X11のヘッダーファイルと開発用ライブラリ[2]
  • PAM including the development headers[3]
  • 開発用ヘッダーを含む PAM[4]
  • gtk2 and libtiff including the development headers[7]
  • 開発用ヘッダーを含む gtk2 と libriff[8]

(訳注:[1]にUbuntu 9.10用のパッケージインストールのスクリプトがあります。また、訳者の環境では、さらに libcurl3-gnutls-dev のインストールが必要でした。)

Full Builds / 完全ビルド

To perform a full build, you need to follow these steps:
完全なビルドを行うには、以下のステップを行う必要があります。

configure / 構成

  • Run the configure script to check all requirements. Run the following command to view all possible options.
  • configure スクリプトを実行してすべての要件をチェックしてください。すべてのオプションを見るには、以下のコマンドを実行します。
./configure --help

An example configure command (on Ubuntu 9.10 with as much libraries by the system used as possible):
構成コマンドの例(Ubuntu 9.10 ではシステムで使用している多くのライブラリを利用することが可能です):

./configure --with-use-shell=bash --with-system-libs \
--without-system-jars --without-system-icu --without-system-agg \
--without-system-lpsolve --without-system-mspack --disable-mozilla

See the last information box in the configure script or Category:Distribution-Specific_Build_Instructions for more information for your platform.
お使いのプラットフォームの詳細については、 configure スクリプトの末尾の情報欄か Category:Distribution-Specific_Build_Instructions(英語) を見てください。

Documentation caution.png Please check for any warnings emitted by the configure-script.
configure スクリプトが出す、すべての warnings(警告) をチェックしてください。

bootstrap / ブートストラップ

When configure finished successfully, run:
構成が成功したら、以下を実行します:

./bootstrap

to create the dmake executable required to build OpenOffice.org.
OpenOffice.org をビルドするために必要な dmake を作成します。

setting the environment / 環境の設定

When the configure script has been run successfully a file LinuxX86Env.Set.sh was created[9]. Do this:
configure スクリプトが正常に実行されると、 LinuxX86Env.Set.sh が作成されます。[10]

source LinuxX86Env.Set.sh

to set up the environment for the build[11].
ビルドのための環境をセットします。[12].

starting the build / ビルドの開始

Build the software by typing the following in $SRC_ROOT[13]:
$SRC_ROOT で以下を打ち込んでビルドを開始します。[13]

dmake

The building procedure will take at least an hour (on a 3 GHz Quad-Core with 8GB RAM). ビルドには、(3GhzのクアッドコアCPU,8GByteのメモリーで)少なくとも1時間かかるでしょう。

Partial Builds

There are two ways to do partial builds:

  • compatible
  • incompatible

Only do compatible partial builds if you know exactly what you are doing. Template:Documentation/Note

rebuilding from a module (incompatible build)

If you decide to change a module in an incompatible way, you will need to rebuild all modules depending on it (directly or indirectly):

cd $SRC_ROOT/instsetoo_native
build --from $INCOMPATIPLEMODULE --prepare
build --from $INCOMPATIBLEMODULE

rebuilding a module (compatible build)

To rebuild a module you can delete all output directories with, rebuild and redeliver into the solver with:

cd $MODULE
build --from $MODULE --prepare
build && deliver

A simple build in $SRC_ROOT/instsetoo_native will recreate the installation sets, provided all other modules have already been build.[14]


Documentation caution.png This does not check for incompatible modules. If unsure, use an incompatible build (see above).


Building a Module with Debug Information

To rebuild a module with debug information and additional assertions and checks, run:

cd $MODULE
build --from $MODULE --prepare # removes old output trees and solver
build debug=true --from $MODULE

Drop the newly created binaries into an existing installation. Building an installation set with them will not help, as binaries are stripped on packing by default.

Template:Documentation/Tip

Finding Installation Sets

The english installation set will be located at $SRC_ROOT/instsetoo_native/unxlngi6.pro/OpenOffice/{deb,rpm,archive}/install/en-US/[15].

Template:Documentation/Note

Tips And Tricks

ccache

export CCACHE_DIR="some/place/with/space"
ccache -M 2G -F 100000
export CXX="ccache g++"
export CC="ccache gcc"

dependencies

nodep

If you set the environment variable nodep to TRUE, then dependency information files are not created - the build finishes faster.

Documentation caution.png But only enable that on a clean build. Once you have built OOo and then made modifications, unset the variable again to be on the safe side.

NO_HIDS

Similar to the nodep variable, this one prevents the generation of HIDs (Help IDs) that are mainly used for automated testing - if you only want to build OOo, you don't need those.

parallel builds

If you have a multiprocessor machine or similar, you can run a parallel build. There are two levels of parallelism - one operating on makefile (directory) level, the other one on the global level. The two levels of parallelism result from the two-step build procedure in the OOo build environment. The build script runs through all the directories it reads from the build.lst files in all modules and calls dmake for every directory.

parallelism on the global level

For parallelism on the global level, you have to run build from $SRC_ROOT>/instsetoo_native with the -P<number> switch, for example:

build -P2

This takes build how many dmake processes it is allowd to start in parallel.

parallelism on the directory level

export MAXPROCESS=<numer or processes> 

This tells dmake how many targets it is allowed to build in parallel. When you don't use build.pl but build a single directory (single makefile), you can achieve the same with

dmake -P2

combining both levels

If you want to have parallelism on both levels, you can call

build -P2 -- -P2

"--" is a special build.pl parameter that passes every further parameters to the dmake processes it starts.

Recommendation

Experience tells that using the doubled number of cores in your machine is a good choice, using more threads does not make a big difference, except if the combined option is chosen. So even on single core machines using two threads will speed up the build considerably.

create prebuilt mozilla

For the mozilla-components you have the choice to either build from mozilla sources, to use precompiled packages or to use system-mozilla (the one installed on your buildsystem, not everything might work, depending on the version you got installed). You can easily create your own version of the prepacked binaries if you wish to do so (either because you cannot use the official ones because of mismatch of compiler version used to build them/other technical reasons or because you want to use stuff you didn't build yourself). To do so:

  • build the moz module from the mozilla sources
  • use --enable-build-mozilla when running configure and put the mozilla-source tarball to moz/download
  • in moz run dmake zip to create the zip files
  • you'll find the zips in {platform}.pro/zipped

Copy them to a location of your liking. Now instead of using --enable-build-mozilla, use --disable-build-mozilla and copy the zips you created or downloaded to moz/zipped and these will be used when compiling. This will greatly reduce build-time (you save the time that would otherwise be spent on compiling mozilla).

See Also


  1. Template:Documentation/Note
  2. Template:Documentation/Note
  3. Template:Documentation/Note
  4. Template:Documentation/Note
  5. Template:Documentation/Note
  6. Template:Documentation/Note
  7. Template:Documentation/Note
  8. Template:Documentation/Note
  9. Template:Documentation/Note
  10. Template:Documentation/Note
  11. By default, native packages (.deb/.rpm) will be build.
    Template:Documentation/Tip
  12. デフォルトでは、ネイティブパッケージ(.deb/.rpm) をビルドします。
    Template:Documentation/Tip
  13. 13.0 13.1 Template:Documentation/Note
  14. Documentation caution.png build --all would rebuild changed/missing files. However, it does not check for incompatible modules. If unsure, use build --from --prepare.
  15. The en-US in the path names indicates that the localization is American English. This value corresponds to the language tags defined by RFC 1766 (Tags for the Identification of Languages). The German installation set will be located in a de subdirectory. This scheme holds true for all localizations you may have chosen explicitly. Template:Documentation/Tip Template:Documentation/Note
    Documentation caution.png Note that you can only build the language packs after you have build the complete office with all selected languages.
Content on this page is licensed under the Public Documentation License (PDL).




翻訳者:
Matayoshi

査読者:

Personal tools
In other languages