Difference between revisions of "Documentation/Building Guide/Basic Concepts"

From Apache OpenOffice Wiki
Jump to: navigation, search
(cleaned up builds sections)
 
(13 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
{{Documentation/Building Guide TOC
 +
|ShowNextPage=none
 +
|ShowPrevPage=none
 +
}}
 
{{DISPLAYTITLE:Basic Concepts}}
 
{{DISPLAYTITLE:Basic Concepts}}
[[Category:Development]]
 
[[Category:Build_System]]
 
{| style="font-size: 11px; float: right; width: 180px; border: 1px solid #9BC0F5;" cellspacing="0"
 
|-
 
| <div id="doc_toctitle" class="docooo_toctitle docsection" style="text-align: center;"><strong class="selflink">Building Guide</strong></div>
 
|-
 
| [[Development/OpenOffice.org_Building_Guide | Introduction]]<br>
 
[[Development/OpenOffice.org_Building_Guide/Getting the source | Getting the source]]<br>
 
[[Development/OpenOffice.org_Building_Guide/Basic Concepts | Basic Concepts]]<br>
 
[[Development/OpenOffice.org_Building_Guide/Build Requirements | Build Requirements]]<br>
 
[[Development/OpenOffice.org_Building_Guide/Building on Windows | Building on Windows]]<br>
 
[[MacOSXBuildInstructions | Building on Mac OS X]]<br>
 
[[Development/OpenOffice.org_Building_Guide/Building on Linux | Building on Linux]]<br>
 
[[Development/OpenOffice.org_Building_Guide/Building on Solaris | Building on Solaris]]<br>
 
|-
 
|}
 
  
 
To understand all concepts, techniques and the terminology described in this guide, make sure you understand the following basic concepts.
 
To understand all concepts, techniques and the terminology described in this guide, make sure you understand the following basic concepts.
Line 30: Line 18:
 
|}
 
|}
  
= Branches =
+
== Branches ==
== Development branch (currently DEV300) ==
+
=== Development branch ===
 +
 
 +
The current development branch is located at:
 +
 
 +
http://svn.apache.org/viewvc/openoffice/trunk/
  
 
This is where most development is done. It has the most open policy for applying patches and it is typically where new features are developed and debugged.
 
This is where most development is done. It has the most open policy for applying patches and it is typically where new features are developed and debugged.
  
The good side to this is that you have the latest features, the down side is that you get the side effects of the changes. We don't discourage you from working here, but you can might be problems at times (esp. if you work on the head revision and not on an milestone release by RelEng).
+
The good side to this is that you have the latest features, the down side is that you get the side effects of the changes.  
  
Developer releases are merged back to the stable branch on a semi-regular basis. All features migrated to the stable branch must be stable.
 
  
== Stable branch (OOO3XX) ==
+
=== Stable branch, specialized branches ===
  
A stable branch is base for a release build of the OpenOffice.org product. This is where bug fix tracking takes place. The policy on these branches are to fix functional errors only.
+
The latest stable release as well as branches that are used for development of some specialized aspect are located at:
 +
 
 +
http://svn.apache.org/viewvc/openoffice/branches/
 +
 
 +
A stable branch is base for a release build of the OpenOffice product. This is where bug fix tracking takes place. The policy on these branches are to fix functional errors only.
  
 
The good side is that any patches are more thoroughly vetted before going into a stable release. Therefore you have fewer mystery bugs. The downside is that there are fewer features and some bug fixes are already in the developer release.
 
The good side is that any patches are more thoroughly vetted before going into a stable release. Therefore you have fewer mystery bugs. The downside is that there are fewer features and some bug fixes are already in the developer release.
  
== Porting branch ==
+
<!-- no longer used
 +
=== Porting branch ===
  
 
This is where a lot of porting to new platforms takes place. There are few features added in these branches and sometimes they are somewhat outdated in terms of functionality as a port needs some stability so that they are not solving new problems but working to an end goal together.
 
This is where a lot of porting to new platforms takes place. There are few features added in these branches and sometimes they are somewhat outdated in terms of functionality as a port needs some stability so that they are not solving new problems but working to an end goal together.
Line 52: Line 48:
  
 
This branch is used for platforms that are not yet part of the official release platforms, e.g. Irix and Linux s390.
 
This branch is used for platforms that are not yet part of the official release platforms, e.g. Irix and Linux s390.
 +
-->
  
 
+
== Modules ==
= modules and projects =
+
The source code directory contains a lot of folders, each one representing a module. A module provides an application, a function, or simply just a collection of classes. A module is the smallest unit of the office suite that can be built.
The source code directory contains a lot of folders, each one representing a module. A module belongs to a project within the community, and provide an application, a function, or simply just a collection of classes. A module is the smallest unit of the office suite that can be built.
 
 
 
A project builds a particular component of the office suite. For example, the Writer project builds the Writer application. A project is an application, function, or simply a summary of classes. A project may be subdivided into modules, see above.
 
  
 
Modules correspond to the directories under the top-level directory of the source tree. For example, the Writer project includes the sw, starmath, res modules, etc.
 
Modules correspond to the directories under the top-level directory of the source tree. For example, the Writer project includes the sw, starmath, res modules, etc.
Line 68: Line 62:
 
We find that sw depends on connectivity etc. These modules in turn depend on others creating a large complex dependancy tree.
 
We find that sw depends on connectivity etc. These modules in turn depend on others creating a large complex dependancy tree.
  
{{Template:Documentation/Note|For more information on modules, see:
+
{{Note|For more information on modules, see:
 
* [[Source code directories]]
 
* [[Source code directories]]
* [[Module Build Order]]}}
+
* [[Module Build Order]]
 +
* [[New Module]]}}
  
= Build Styles =
+
== Build Styles ==
  
== full builds ==
+
=== Full Builds ===
OpenOffice.org developers typically perform a full build of OpenOffice.org in order to build their modules. A full build also recompiles all of the source code. It can take up to a few hours to perform a full build of OpenOffice.org even on modern workstations. Using tools such as distcc and ccache can have dramatic time improvements however.
+
Developers typically perform a full build of OpenOffice in order to build their modules. A full build also recompiles all of the source code. It can take up to a few hours to perform a full build of OpenOffice.org even on modern workstations. However using tools such as distcc and ccache can have dramatic time improvements.
  
== partial compatible/incompatible builds ==
+
=== Partial Compatible/Incompatible Builds ===
To avoid the need of a time-expensive complete re-build each time a change in the code is introduced, the developers are asked to introduce only ''binary compatible'' changes in the code unless the it is agreed with the project owner. This means that the changes made are of such a nature that no recompilation of further dependent modules become necessary (inserting a new, non-virtual method in a C++ class would be an example of such a binary compatible change). The office suite will then be re-compiled as a so-called ''respin build'' before the next 'master' s declared. A respin build obeys only weak dependencies, i.e. dependencies within a module. Using weak dependencies allows you to, for example, to modify a base library header file without needing to perform a full build. Since a respin build relies on binary compatible changes, modules can be build in parallel, and the build takes much less time (a few hours) in contrast to a full build.
+
To avoid the need of a time-expensive complete re-build each time a change in the code is introduced, the developers are asked to introduce only ''binary compatible'' changes in the code unless it is agreed with the project owner. This means that the changes made are of such a nature that no recompilation of further dependent modules become necessary (inserting a new, non-virtual method in a C++ class would be an example of such a binary compatible change). The office suite will then be re-compiled as a so-called ''respin build'' before the next 'master' s declared. A respin build obeys only weak dependencies, i.e. dependencies within a module. Using weak dependencies allows you to, for example, to modify a base library header file without needing to perform a full build. Since a respin build relies on binary compatible changes, modules can be build in parallel, and the build takes much less time (a few hours) in contrast to a full build.
  
{{Template:Documentation/Note|By contrast, ''binary incompatible'' changes require a full build. For reasons of efficiency, this is allowed only with the approval of the project owner.}}
+
{{Note|By contrast, ''binary incompatible'' changes require a full build. For reasons of efficiency, this is allowed only with the approval of the project owner.}}
  
= Snapshots / Milestone Builds =
+
=== Snapshots Builds ===
  
OpenOffice.org is built and tested. Tarballs of the current source as well as solver and installation tarballs are published in the download page at www.openoffice.org. This happens roughly every four weeks. As a result, a snapshot of the current state of OpenOffice.org is available. In case the snapshot contains some outstanding 'milestone' improvements in functionality or coding, we may also refer to the snapshot as a milestone build.
+
OpenOffice employs a buildbot for snapshot builds. However, the output of these builds are for developer use/information only. They are not advertised for public consumption -- beta testing.
 +
We follow Apache rules for the announcement of releases.
  
  
= Source and Output Trees =
+
== Source and Output Trees ==
OpenOffice.org developers work in parallel on all platforms. The source code for all platforms is identical, with the exception of the code for the interface to the operating and window managers. This allows you to build for the different platforms simultaneously from a single ''source tree'', i.e. the directory structure that stores all of the source code for the office suite.
+
OpenOffice.org developers work in parallel on all platforms. The source code for all platforms is identical, with the exception of the code for the interface to the operating system and window managers. This allows you to build for the different platforms simultaneously from a single ''source tree'', i.e. the directory structure that stores all of the source code for the office suite.
  
 
The <code>solenv</code> tree contains the environment tools that the build process uses, for all supported platforms. Formerly it also included the platform-specific build tools. Now these build tools are created with a <code>bootstrap</code> script created with the <code>configure</code> script.
 
The <code>solenv</code> tree contains the environment tools that the build process uses, for all supported platforms. Formerly it also included the platform-specific build tools. Now these build tools are created with a <code>bootstrap</code> script created with the <code>configure</code> script.
  
The build process generates files from the ''source tree'' and copies them into an ''output tree'', i.e. a directory structure that the build process populates with all the files necessary to build. The output tree is called ''solver''.
+
When building multiple modules, these steps are taken for each module:
 +
* The build process generates files from the ''source tree'' into the ''output tree'' of the module (this is a directory named after the platform, e.g. unxlngi6.pro for 32-bit Linux)
 +
* After the module has been build, the results are copied to the ''solver'', a directory sitting next to the top-level modules in the <code>SRC_ROOT</code>. This step is called <code>deliver</code> (there is a tool with the same name). Modules cannot link/compile against the ''output'' directory of other modules, they only compile/link against objects in the solver.
  
 
When you run <code>bootstrap</code>, the <code>solver</code> directory is created. Initially, the <code>solver</code> directory is empty. The build process populates this directory. The build process delivers all binary files, shared libraries, and dynamic link libraries to solver.
 
When you run <code>bootstrap</code>, the <code>solver</code> directory is created. Initially, the <code>solver</code> directory is empty. The build process populates this directory. The build process delivers all binary files, shared libraries, and dynamic link libraries to solver.
Line 98: Line 96:
 
When you want to build a specific project, you only need the sources of the relevant SVN modules and the output tree <code>solver</code>. You do not need the entire source tree, though typically a developer will check out one of the branches and build it from scratch.
 
When you want to build a specific project, you only need the sources of the relevant SVN modules and the output tree <code>solver</code>. You do not need the entire source tree, though typically a developer will check out one of the branches and build it from scratch.
  
For more information on the solenv and solver trees, see the [http://tools.openoffice.org/ Tools] project.
+
{{Note|For more information on the solenv and solver trees, see the [http://tools.openoffice.org/ Tools] project.}}
  
 
{{PDL1}}
 
{{PDL1}}

Latest revision as of 07:50, 7 July 2018

[[{{{PrevPage}}}|< Previous Page

]]

[[{{{NextPage}}}|Next Page
>]]


To understand all concepts, techniques and the terminology described in this guide, make sure you understand the following basic concepts.

Terminology

Term Description
SRC_ROOT The environment variable containing the path to the directory of the source code.
Example: /home/john/projects/ooo/builds/OOO310_m11

Branches

Development branch

The current development branch is located at:

http://svn.apache.org/viewvc/openoffice/trunk/

This is where most development is done. It has the most open policy for applying patches and it is typically where new features are developed and debugged.

The good side to this is that you have the latest features, the down side is that you get the side effects of the changes.


Stable branch, specialized branches

The latest stable release as well as branches that are used for development of some specialized aspect are located at:

http://svn.apache.org/viewvc/openoffice/branches/

A stable branch is base for a release build of the OpenOffice product. This is where bug fix tracking takes place. The policy on these branches are to fix functional errors only.

The good side is that any patches are more thoroughly vetted before going into a stable release. Therefore you have fewer mystery bugs. The downside is that there are fewer features and some bug fixes are already in the developer release.


Modules

The source code directory contains a lot of folders, each one representing a module. A module provides an application, a function, or simply just a collection of classes. A module is the smallest unit of the office suite that can be built.

Modules correspond to the directories under the top-level directory of the source tree. For example, the Writer project includes the sw, starmath, res modules, etc.

There are many dependencies between the modules, and the modules must build in a particular order. Module prerequisites are described in first line of the file prj/build.lst for example:

froddo: /data2/office/sw/prj$ cat build.lst
sw      sw      :       connectivity svx stoc uui sch NULL

We find that sw depends on connectivity etc. These modules in turn depend on others creating a large complex dependancy tree.

Documentation note.png For more information on modules, see:

Build Styles

Full Builds

Developers typically perform a full build of OpenOffice in order to build their modules. A full build also recompiles all of the source code. It can take up to a few hours to perform a full build of OpenOffice.org even on modern workstations. However using tools such as distcc and ccache can have dramatic time improvements.

Partial Compatible/Incompatible Builds

To avoid the need of a time-expensive complete re-build each time a change in the code is introduced, the developers are asked to introduce only binary compatible changes in the code unless it is agreed with the project owner. This means that the changes made are of such a nature that no recompilation of further dependent modules become necessary (inserting a new, non-virtual method in a C++ class would be an example of such a binary compatible change). The office suite will then be re-compiled as a so-called respin build before the next 'master' s declared. A respin build obeys only weak dependencies, i.e. dependencies within a module. Using weak dependencies allows you to, for example, to modify a base library header file without needing to perform a full build. Since a respin build relies on binary compatible changes, modules can be build in parallel, and the build takes much less time (a few hours) in contrast to a full build.

Documentation note.png By contrast, binary incompatible changes require a full build. For reasons of efficiency, this is allowed only with the approval of the project owner.

Snapshots Builds

OpenOffice employs a buildbot for snapshot builds. However, the output of these builds are for developer use/information only. They are not advertised for public consumption -- beta testing. We follow Apache rules for the announcement of releases.


Source and Output Trees

OpenOffice.org developers work in parallel on all platforms. The source code for all platforms is identical, with the exception of the code for the interface to the operating system and window managers. This allows you to build for the different platforms simultaneously from a single source tree, i.e. the directory structure that stores all of the source code for the office suite.

The solenv tree contains the environment tools that the build process uses, for all supported platforms. Formerly it also included the platform-specific build tools. Now these build tools are created with a bootstrap script created with the configure script.

When building multiple modules, these steps are taken for each module:

  • The build process generates files from the source tree into the output tree of the module (this is a directory named after the platform, e.g. unxlngi6.pro for 32-bit Linux)
  • After the module has been build, the results are copied to the solver, a directory sitting next to the top-level modules in the SRC_ROOT. This step is called deliver (there is a tool with the same name). Modules cannot link/compile against the output directory of other modules, they only compile/link against objects in the solver.

When you run bootstrap, the solver directory is created. Initially, the solver directory is empty. The build process populates this directory. The build process delivers all binary files, shared libraries, and dynamic link libraries to solver.

When you want to build a specific project, you only need the sources of the relevant SVN modules and the output tree solver. You do not need the entire source tree, though typically a developer will check out one of the branches and build it from scratch.

Documentation note.png For more information on the solenv and solver trees, see the Tools project.
Content on this page is licensed under the Public Documentation License (PDL).



Personal tools