Build Environment Running on Fedora Core 4
Build Environment Running on Fedora Core 4
Prerequisites
Firstly, it would be meaningful to know the System Requirements for OpenOffice.org 2 released by the community. It says that
Linux kernel version 2.2.13 or higher, glibc2 version 2.2.0 or higherThe Linux kernel-2.2.13 became available late in 1999. Looking for similar distributions, you would find some:
- Red Hat Linux 6.1 released in October, 2000 comes with kernel-2.2.12.
- Red Hat Linux 6.2 released in April, 2000 comes with kernel-2.2.14.
- Turbolinux Workstation 6.0 released in June, 2000 comes with kernel-2.2.13 and glibc-2.1.2.
Nowadays it is relatively difficult to get such a somewhat antique distribution. So we will need to find an alternative.
Secondarily, refer to Compiler versions used by port maintainers and release engineers to find out what version of tools are used for release engineering.
Choosing a Linux distribution
Then, choose a Linux distribution. There are many distributions currently available. Since the 'solver' seems to be created on the environment firstly prepared in the year of around 2000, some of the distributions can work with it, but others can not.
Fedora Core Distributions
Fedora Core and Fedora distributions are freely available and widely used in the world.
Versions of the packages bundled in the Fedora Core and Fedora distributions
Package FC1 FC2 FC3 FC4 FC5 FC6 Fedora 7 Fedora 8 kernel 2.6.5 2.6.9 2.6.11 2.6.15 2.6.18 2.6.21 2.6.23 glibc 2.3.3 2.3.3 2.3.5 2.4 2.5 2.6 2.7 gcc 3.3.3 3.4.2 4.0.0 4.1.0 4.1.1 4.1.2 4.1.2 binutils 2.15.90 2.15.92 2.15.94 2.16.91 2.17.50 2.17.50 2.17.50 ant 1.5.2 n/a 1.6.2 1.6.5 1.6.5 n/a 1.7.0 scim n/a n/a n/a 1.4.4 1.4.4 1.4.5 1.4.7 n/a: Not Available
Dependencies
- gcc-3.4.x series does not work with binutils-2.16.x due to gcc's bug
- configure of OpenOffice.org 2.3.0 requires ant-1.6.0 or later.
Choice
Fedora Core 4 plus gcc-3.4.1 seems to be the better choice among the Fedora distributions.
Setting up development environment
Setting up a Fedora Core 4 box
- Visit http://fedoraproject.org/
- Follow links to find a list of mirror servers.
- Download core/4/i386/iso/FC4-i386-DVD.iso
- Install it.
- Additionally install necessary packages, if needed.
To use yum, you will need to create a directory 'repodata' since FC4-i386-DVD.iso does not have it while an iso image of Fedora 8 does.
mount -o /dev/cdrom /mnt mkdir /var/tmp/RPMS cd /var/tmp/RPMS ln -s /mnt/Fedora/RPMS/* . createrepo .To use the repodata, specify a path of the directory in which repodata is.
cd /etc/yum.repos.d mkdir disabled mv *.repo disabled cat > dvd.repo [dvd] name=Fedora 4 Install DVD baseurl=file:///var/tmp/RPMS gpgcheck=0 ^D yum list yum install name_of_package mv disabled/* . mv dvd.repo disabled umount /mntInstalling gcc-3.4.1
- Visit http://gcc.gnu.org/
- Follow links to find a list of mirror servers.
- Download releases/gcc-3.4.1/gcc-3.4.1.tar.gz
- Apply two patches following an article [porting-dev] OOo Linux builds: Hamburg RE switches over to gcc-3.4.1 by Jens-Heiner Rechtien.
- enum patch - http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html by Jakub Jelinek
- visibility patch - http://www.nedprod.com/programs/gccvisibility.html by Niall Douglas
- Install it following instructions at gcc-3.4.1/INSTALL/index.html
bunzip2 -dc gcc-3.4.1.tar.bz2 | tar zxf - cd gcc-3.4.1 patch -p0 < ../Fix_C++_enums_handling_in_build_range_check.patch patch -p1 < ../GCC3.4.0VisibilityPatch2.diff mkdir -p build/object cd build/object ../../configure '--enable-languages=c,c++' make bootstrap make installHere is an example file Fix_C++_enums_handling_in_build_range_check.patch
This example is cited from http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html
and then a portion "--- gcc/fold-const.c.jj" in the first line is intentionally replaced with "--- gcc.original/fold-const"--- gcc.original/fold-const 2004-07-09 13:50:54.000000000 +0200 +++ gcc/fold-const.c 2004-07-09 18:10:52.945905468 +0200 @@ -3844,7 +3844,13 @@ build_range_check (tree type, tree exp, HOST_WIDE_INT hi; int prec; - prec = TYPE_PRECISION (etype); + /* For enums the comparison will be done in the underlying type, + so using enum's precision is wrong here. + Consider e.g. enum { A, B, C, D, E }, low == B and high == D. */ + if (TREE_CODE (etype) == ENUMERAL_TYPE) + prec = GET_MODE_BITSIZE (TYPE_MODE (etype)); + else + prec = TYPE_PRECISION (etype); if (prec <= HOST_BITS_PER_WIDE_INT) { hi = 0;Installing JDK
- Visit http://java.sun.com/products/archive/j2se/1.4.1_03/index.html
- Download SDK of Java 2 Platform, Standard Edition, v 1.4.1_03 (J2SE).
- Install it.
sh j2sdk-1_4_1_03-linux-i586-rpm.bin rpm -ivh j2sdk-1_4_1_03-fcs-linux-i586.rpm