Successful build of Apache Open Office 4.1.10 on Fedora 34

Issues with installing under all GNU/Linux Distributions
Post Reply
philthegitter
Posts: 4
Joined: Tue Nov 17, 2020 9:09 pm

Successful build of Apache Open Office 4.1.10 on Fedora 34

Post by philthegitter »

I love Apache Open Office, specifically scalc. LibreOffice's scalc requires about ten seconds of fumbling with the mouse, to insert a new row. AOO scalc, just Alt-I R boom done. Which is one reason why LO is in my estimation a sick joke.

However, the official RPM of AOO-4.1.10 creates an scalc which, on Fedora 34, crashes every time within two minutes of starting. So I built it. Here is the configure which succeeded.

Preliminaries: in /etc/profile, $HOME/.bashrc, and /root/.bashrc I placed the following environment variables:

Code: Select all

export JAVA_HOME=/j
export CCACHE_DIR=/hdd5/ccache
export ANT_HOME=/home/spot/ant
export ANT=/home/spot/ant/bin/ant
export PATH=/root/.local/bin:/root/bin:/home/spot/.local/bin:/home/spot/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/spot/ant/bin:/j/bin
export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:/j/lib
and then reboot.

/j is a symlink to /etc/alternatives/java_sdk (note: earlier i erroneously wrote here it was a symlink to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-0.fc34.x86_64).

/etc/alternatives/java_sdk is a symlink to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-0.fc34.x86_64

***update: later, when openjdk is updated via dnfdragora or dnf update, the /etc/alternatives/java_sdk symlink will be reset by the installation script to point to the current version of java-11-openjdk. And so, /j will likewise point to java-11-openjdk. As far as I can tell, this does not affect the operation of, and does not diminish the stability of, AOO scalc (but, see next paragraph). I do not know if keeping the two symlinks pointing to the current version of java-11-openjdk works okay nowadays for the compile. It did not work okay for me, when I tried compiling AOO with the two symlinks pointing to the then-current version of java-11-openjdk.***

***update to the above update: I have discovered that AOO Calc starts noticeably faster if I make /j be a symlink to /usr/lib/jvm/java-1.8.0-openjdk, which is itself a symlink to the latest current version of the version 1.8.0 openjdk. It seems AOO Calc likes openjdk-1.8.0 better than it likes openjdk-11.***

The reason i created /j is that, specifying JAVA_HOME by its full pathname caused the build to fail with a preprocessor error message. I guess the command line was too long for the preprocessor to digest.

/hdd5 is a fast rotational hard disk, /hdd5/Downloads is symlinked into $HOME (/home/spot) which resides on the ssd on which my main filesystem resides. I didn't want to thrash the ssd, so I built AOO on a fast hdd.

My main user is named spot because I graduated from Windows to Linux via Puppy Linux.

ant is Apache Ant 1.10.10, /home/spot/ant is a symlink to /home/spot/apache-ant-1.10.10

For --enable-crashdump=yes to succeed I had to dnf install libnsl before the build.

It was necessary to use system nss, coinmp, and cairo.

The build failed if I used --with-dmake-url and --with-epm-url. I had to download the source code from these two url's (dmake-4.12 and epm-5.0.0) and build these first, in /usr/local/bin.

I was unable to get it to build an RPM. I leave that task to more experienced hands.

The secret sauce:

Code: Select all

cd $HOME/Downloads
mkdir aoo-4.1.10_source
cd aoo-4.1.10_source
git clone https://github.com/apache/openoffice.git
cd openoffice/main
wget -O external/unowinreg/unowinreg.dll https://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll
ccache -C
autoconf
./configure \
	--with-build-version="$(date +"%Y-%m-%d %H:%M") - `uname -sm`" \
	--enable-verbose \
    --prefix=/opt/openoffice-4.1.10 \
    --with-system-stdlibs \
	--enable-crashdump=yes \
	--enable-category-b \
	--enable-wiki-publisher \
	--enable-bundled-dictionaries \
	--enable-opengl \
	--enable-dbus \
	--enable-gstreamer \
	--with-jdk-home=/j \
	--without-junit \
	--without-stlport \
	--with-ant-home=$HOME/ant \
	--with-dmake-path=/usr/local/bin/dmake \
	--with-epm=/usr/local/bin/epm \
	--with-package-format=installed \
	--with-lang='ast bg ca ca-XR ca-XV cs da de el en-GB en-US es eu fi fr gd gl he hi hu it ja km ko lt nb nl pl pt pt-BR ru sk sl sr sv ta th tr vi zh-CN zh-TW' \
    --with-system-nss \
    --with-system-coinmp \
	--with-vendor=philthegitter \
	--with-x \
	--enable-cairo \
	--with-system-cairo \
	| tee config.out || exit 1
The resulting scalc is as stable as Gibraltar. Thanks again for maintaining this wonderful office suite.
OpenOffice 4110, Fedora 34
yves-lec
Posts: 2
Joined: Fri Aug 20, 2021 11:02 am

Re: Successful build of Apache Open Office 4.1.10 on Fedora

Post by yves-lec »

Thank you Philthegitter, with this hard work.

I migrated all my PC from Fedora 31 to Fedora 34, in a single day (passing through Fedora 33 step because dnf upgrade-system doesn't work well, if you make a jump more then n+2). And on each of them, OpenOffice did not work any more !!!

For people arriving here because they just notice than from fedora 32, the standard rpm package found on opernoffice.org crash, just keep in mind some important point before following the Philthegitter's tuto:
ALL The stuf described here was performed by root
1) environment:
====================
in order not to disturb all the other standard fedora applications, in Fedora repos or rpmfusion, do not change anything in /etc/profile.
Personally I just change the /root/.bashrc, just to compile all the stuff, with:
+++++++++++++++++++++++++++++++++
TEMPO=1
if [ $TEMPO -eq 1 ]
then
# required during Apache OpenOffice build from sources
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
export CCACHE_DIR=/var/cache/ccache
export ANT_HOME=/root/ant/
export ANT=/root/ant/bin/ant
export PATH=$PATH:/usr/local/bin:$JAVA_HOME/bin
export LD_LIBRARY_PATH=/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:$JAVA_HOME/lib
fi

+++++++++++++++++++++++++++++++++++==+
By changing TEMPO value you can disable easily this abnormal environment

Later, once all will have been tested, you will build a desktop launcher, or a /usr/share/applications/openoffice-writer.desktop, referencing a /usr/bin/openoffice-writer script including all this environment, so that you could remove anything about this specific environment from $HOME/.bashrc, /etc/profile or $HOME/.bash_profile

2) extra tools for compilation:
==========================
dmake and epm :
find help from https://wiki.openoffice.org/wiki/Docume ... ep_by_step
to install them as indicated by philthegitter; in summary:
# wget https://github.com/jimjag/dmake/archive ... 2.3.tar.gz
# tar -xzf dmake-4.12.3.tar.gz
# cd dmake-dmake-4.12.3
# ./configure --prefix=/usr/local
# make install


# wget https://github.com/jimjag/epm/archive/v ... 0.0.tar.gz
# tar -xzf epm-5.0.0.tar.gz
# cd epm-5.0.0
# ./configure --prefix=/usr/local
# export INSTALL=/usr/bin/install ; make install

With epm installation I got some error:
echo Installing EPM documentation in
Installing EPM documentation in
/usr/bin/install -c -d -m 755
/usr/bin/install: missing file operand

But the excutable /usr/local/bin/emp and its man pages are installed.

So I continued as is.

ant
all the standard ant-*-1.10.9-2.fc34.noarch was already installed on my fedora 34, but ./configure ...
command return that ant is not found, and ant >= -1.9.2
I installed binary1.9.16 from https://ant.apache.org/bindownload.cgi
under /root/ant

To pass the step /.configure ...
I also had to install :
# dnf install gdk-pixbuf2-xlib-devel
# dnf install gtk+-devel
in order not to have an error about gtk-module
(explanation found here: http://mail-archives.apache.org/mod_mbo ... che.org%3E )


3) building
======================================
ATTENTION
before starting anything be AWARE of the disk space required !!!!!!!!!

just the download of the basic source , plus the extra package is around 4.3 Go

I did not give all the language given by Phil, but only:
--with-lang='de en-GB en-US es it ja ko nl pl pt pt-BR ru zh-CN zh-TW'
And at the end the working directory had inflated to 40 Go !!!!!!!!!
Compilation time 10 hours on :
# cat /proc/cpuinfo | grep "model name"
model name : AMD FX(tm)-8350 Eight-Core Processor
(speed max 4.3 GHz)
In fact UNDERSTAND well that building all this OpenOffice in different language , is probably unusefull for you !
So maybe construction en_US and in your native language will be sufficient!!
=======================================
The ./configure step as given by philthegitter, passed sucessfully, but the compilation launched afer all the following steps:

++++++++++++++++++++++++++++++++++++++++++++
Configure completed

Run ./bootstrap in /utils/RHF34_i686_x86_64_addons/6_OFFICE_TOOLS/method_to_improve/aoo-4.1.10_source /openoffice/main to provide build tools and get third-party packages
If all configuration is OK, Continue as suggested by configure:
./bootstrap
source *.Set.sh
to download required extra package, instead of using standard system libs,

And then as indicated in aoo-4.1.10_source/openoffice/main/README, launch build with:
cd instsetoo_native
build --all

++++++++++++++++++++++++++++++++++++

failed at libsot.so, like in the Phil first post in november 2020:
viewtopic.php?f=16&t=103617

So I installed ant binary1.10.11 from https://ant.apache.org/bindownload.cgi
under /root/ant, and then the compilation go to the end successfully !

You will find all the binaries, in the given different languages (given as .configure prameter), in
$WORKDIR/aoo-4.1.10_source/openoffice/main/instsetoo_native/unxlngx6.pro/Apache_OpenOffice/installed/install
[root@ismf33 install]# du -sm *
435 de
393 en-GB
453 en-US
391 es
397 it
398 ja
391 ko
32 log
402 nl
392 pl
391 pt
389 pt-BR
404 ru
389 zh-CN
390 zh-TW


$WORKDIR is the directory from witch you were working !
And do not forget: this directory must be on a file system with 40 Go free if you install just with the limited list above !!!!

4) usage
============
in root environment with good JAVA_HOME i made a try
At 20 August 2021, the installed release is then 4.5
And the langpack installed by previous standard install in my root environment, was usable !!!
Last edited by yves-lec on Fri Aug 20, 2021 2:33 pm, edited 1 time in total.
OpenOffice 4.5.0
Fedora x86_64
version 34 on 202108
yves-lec
Posts: 2
Joined: Fri Aug 20, 2021 11:02 am

Re: Successful build of Apache Open Office 4.1.10 on Fedora

Post by yves-lec »

ADDITIONNAL information for system wide installation (for all users of the Fedora 34 OS):
LANG0 here , represents one of the language you asked to include in the packages compilation.

if you make a copy (with cp -rp) of content of one of resulting directories $LANG0/openoffice4 found under
WORKDIR/aoo-4.1.10_source/openoffice/main/instsetoo_native/unxlngx6.pro/Apache_OpenOffice/installed/install/
in the standard directory:
/opt/
as used by binary rpm packages provided on OpenOffice.org,

you must modify the file : /opt/openoffice4/program/bootstraprc

The line:
UserInstallation=$ORIGIN/../.openoffice/4

must be replaced by the one found in standard installation from binary rpm package of OpenOffice.org:
UserInstallation=$SYSUSERCONFIG/.openoffice/4

otherwise,
first)
any users will try at first launch of /opt/openoffice4/programm/soffice for example, to write in
/opt/openoffice4/.openoffice/4 , which is normally writable by root only

second)
you will not find your old user profile preferences, in $HOME/.openoffice/4/user
=================

Once all is functional normally, with your own working compilation copied under /opt/openoffice4
you can install for exemple the standard *.desktop file with openoffice4.1.10-freedesktop-menus, provided in standard binary rpm packages.

At 2021 august 24,on my machine I got installed:

root@ismf33 ~]# rpm -qa | grep openoffice
openoffice4.1.10-freedesktop-menus-4.1.10-9807.noarch
[root@ismf33 ~]#

And then you will have the corresponding OpenOffice applications visible in your desktop menus
There is no dependences set in this package, with other rpm package of the binary distribution. So you can install it with dnf install or rpm -i.
OpenOffice 4.5.0
Fedora x86_64
version 34 on 202108
philthegitter
Posts: 4
Joined: Tue Nov 17, 2020 9:09 pm

Re: Successful build of Apache Open Office 4.1.10 on Fedora

Post by philthegitter »

Hi Yves,

Glad to see that someone benefitted from my configure advice! And, thank you for your return gift of advice with regard to /opt/openoffice4/program/bootstraprc --I myself had solved that problem via the kludge workaround of liberalizing the write permissions of /opt/openoffice4/.openoffice/4 but I like your solution better.

There were more dependency libraries necessary to dnf-install, not just gdk-pixbuf2-xlib-devel and gtk+-devel. The build also assumes the availability of several .so libraries from earlier versions of AOO which are missing in the AOO-4.1.10 source. I copied these from an earlier AOO version into /usr/lib64 (followed by ldconfig run as root) as needed. I also needed to reposition (or link) many, many .h header files in appropriate places in /usr/include to get the build to finish. Some of these header files are provided in the AOO source, some not.

Getting the configure options right required me to undergo an extravagantly time-consuming gauntlet of trial and error. Someday I will build the newest AOO (4.1.11, as of this writing) on a fresh, pristine latest Fedora (35 beta, as of this writing) and fully document it. But not anytime soon unless a financial windfall enables me to afford the luxury of such Job-like patience! I figured, I can get away with being lazy and disclosing only the configure that worked for me, because anyone who is desirous enough of building AOO, and skilled enough to understand my configure instructions will also understand how to go about adding-in missing dependency libraries and header files during the build at places where it stops, on-the-fly.

I did not keep track of the build time for 4.1.10, but it was about the same as yours, basically one workday. My machine is a vintage-2015 dual Intel Xeon (Haswell) E5-2696v3, not so high of GHz as your AMD FX-8350s but it makes up for the slower clock by providing 36 physical (72 virtual) cores. The build did keep all 72 virtual cores busy, but since it's water-cooled overheating was not (and never is) a concern. This machine has 32 GB of onboard RAM and at no time was the RAM anywhere near saturated. I believe the build could be done on a fresh install of Fedora on a machine with 8 GB of RAM without going to swap.

Probably a three-hour job or so on the newest Epyc machine lol.

The complete source+build with all the languages, after the build is completed, in other words the subdirectory
/home/spot/Downloads/aoo-4.1.10_source/openoffice
occupies 44.48 GiB.

/opt/openoffice4 (with just the en-US version copied in) occupies 397.3 MiB. All the language versions appear to be the same size, viewed in Graphical Disk Map.

Regards,
Phil
OpenOffice 4110, Fedora 34
Post Reply