HowTo: Install Collabora Online on Ubuntu 16.04. (without Docker!)


#82

Hello

to: AAAARRGGH … i give up. (see above)

I got the same error in a Virtualbox Ubuntu 16.04 client and in a Virtualbox Debian 8.7 client. Additionally I tried the libreoffice/core/distro/collabora/cp-5.1 and the master. No difference, same error!

The hardware settings for the Virtualbox clients: 8GB RAM and 40GB Harddisk (vdi).

Then I set up a real PC (16GB RAM, 120GB SSD, Debian 8.7). No difference, same error!
Then I found a hint in relation to poco. So I downloaded the latest poco tarball (version 1.7.7) and compiled/installed it (/usr/local/lib). Debian 8.7 is in default configured to find libraries under /usr/local/lib. Then I compiled the collabora version (see above) again and it worked.

Kind regards


#83

Hello, I’ve compiled too the Poco 1.7.7
Could you give me the commands you wrote on your machine ?

Thanks a lot.


#84

I haven’t documented my commands; but at the moment I try to compile libreoffice core (collabora 5.1) on my Debian 8.7 Virtualbox client. If it works, I can publish my commands.

What I did til now: install poco 1.7.7 (using checkinstall) and install the latest harfbuzz tarball (using checkinstall). further I removed all poco packages installed from the Debian sources (debian.ethz.ch).

then I created a user under which I compile libreoffice core

useradd -U -M -d /usr/local/CollaboraOffice -s /bin/false lool

chown -R lool.lool /usr/local/src/collabora (after git download to /user/local/src/collabora/core)

then I run ./autogen.sh in /usr/local/src/collabora/core. I found a link for libreoffice 4.x
http://www.linuxfromscratch.org/blfs/view/7.6/xsoft/libreoffice.html

sudo -u lool ./autogen.sh
–prefix=/usr/local/CollaboraOffice
–with-lang=‘en-US de’
–with-help
–with-alloc=system
–without-java
–disable-dconf
–disable-odk
–disable-postgresql-sdbc
–disable-firebird-sdbc
–enable-release-build=yes
–enable-python=system
–with-system-boost
–with-system-clucene
–with-system-cairo
–with-system-curl
–with-system-expat
–with-system-graphite
–with-system-harfbuzz
–with-system-icu
–with-system-jpeg
–with-system-lcms2
–with-system-libpng
–with-system-libxml
–with-system-neon
–with-system-npapi-headers
–with-system-nss
–with-system-odbc
–with-system-openldap
–with-system-openssl
–with-system-poppler
–with-system-redland
–with-system-zlib
–with-parallelism
–with-boost-libdir=/usr/lib/x86_64-linux-gnu

sudo -u lool make

Now compiling is still running

Virtualbox Client: Debian 8.7, 8GB RAM, 40GB vdi, 4 Processors, VT-x/AMD-V, PAE/NX, KVM.

And of course I did before:
apt-get install git libkrb5-dev make openssl g++ libtool
apt-get build-dep libreoffice -y
apt-get install libpagemaker-dev

further I found out, that you couldn’t use configure options in autogen.sh
–with-system-libcims
–with-system-libwps
–with-system-lpsolve

because Debian 8.7 has to old libraries for that.

CRASHED!! In Virtualbox client!!

Try to extend RAM to max.


#85

Hello

So, I think I have found a solution to compile LibreOffice core. I did it in a Virtualbox (Version 5.1.12 r112440) Debian 8.7 client environment and also in a normal Debian 8.7 environment on a Thinkpad X220.
On the Thinkpad I has 8GB RAM and a 250GB SSD. In Virtualbox the Debian client has 10GB RAM and a 60GB vdi disk. The Virtualbox system runs on a Thinkpad T460p with 16GB RAM and a 500GB SSD. The Thinkpad X220 runs an i5-2520M and the Thinkpad runs a i7-6700HQ.

In order you can reproduce my Debian 8.7 installation I would like to add the output of the command ‘dpkg-query -l’ as a text file, but unfortunately I do not know how to do that in this forum. Copy/paste wouldn’t be a good idea, because the text file has more than 1500 lines (Debian packages). The text file bases on the system I managed to compile LibreOffice core first. On the base of this Debian 8.7 install I adapted the above mentioned Debian 8.7 environments. The main things I had to change was to (apt-get) remove anacron, cpp-4.8, fakeroot, gcc-4.8, libgcc-4.8-dev, libfakeroot, linux-compiler-gcc-4.8-x86, linux-headers-3.16.0-4-all. Then I did also a apt-get autoremove. Then I (apt-get) install attr, libpagemaker-dev, checkinstall.

On all Debian 8.7 systems I set up a minimal XFCE4 desktop:
apt-get install xorg lightdm lightdm-gtk-greeter xfce4-panel xfce4-session xfce4-settings xfce4-terminal gtk2-engines-xfce gvfs-backends xfwm4 xfconf xfdesktop4 desktop-base thunar thunar-volman thunar-archive-plugin p7zip-full gksu sudo policykit-1-gnome firefox-esr synaptic geany geany-plugins

The desktop I install after set up Debian using
http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso
and only install options openssh server and standard utils.

Compile LibreOffice Core:
Then first I compiled and installed poco 1.7.7. I downloaded the tarball poco-1.7.7-all.tar.gz from their homepage and then:
cd /usr/local/src/
mv /home/user/Downloads/poco-1.7.7-all.tar.gz .
tar xzvf poco-1.7.7-all.tar.gz
chown -R root.staff poco-1.7.7-all
cd poco-1.7.7-all
./configure --prefix=/usr/local
make
checkinstall

I normally use checkinstall to install self compiled packages. This allows me to remove the self compiled packages. If you doesn’t know checkinstall, there are two important settings: package name and version. In order to prevent conflicts I add to the package name -rw (libpoco-rw), secont the version must begin with a number. And I always install self compiled packages under /usr/local. Debian in default finds libraries under /usr/local/lib.

Next, I create a user lool:
useradd -U -m -d /usr/local/CollaboraOffice -s /bin/false lool

Then I create the environment for compiling LibreOffice core:
apt-get install git libkrb5-dev make openssl g++ libtool
apt-get build-dep libreoffice

Hint: I compared the installed packages (dpkg-query -l) with the first system I managed to compile core after the above commands. So I had to removed and add some packages (see above).

Downloaded the source of LibreOffice core (version collabora 5.1):
cd /usr/local/src/
mkdir collabora
cd collabora/
git clone -b “distro/collabora/cp-5.1” “https://github.com/LibreOffice/core.git” "core"
cd …
chown -R lool.lool collabora/
cd collabora/core/

Then I configured LibreOffice core the following way:
sudo -u lool ./autogen.sh --prefix=/usr/local
–with-lang=‘de’
–with-parallelism
–enable-release-build=yes
–with-help --with-myspell-dicts
–with-alloc=system
–without-java
–without-system-dicts
–disable-dconf
–disable-odk
–disable-firebird-sdbc
–disable-postgresql-sdbc
–enable-python=system
–with-system-apr
–with-system-boost=yes
–with-system-cairo
–with-system-clucene
–with-system-curl
–with-system-expat
–with-system-graphite
–with-system-harfbuzz
–with-system-icu
–with-system-jpeg
–with-system-libabw
–with-system-libcdr
–with-system-libebook
–with-system-libetonyek
–with-system-liblangtag
–with-system-libmspub
–with-system-libmwaw
–with-system-libodfgen
–with-system-libpagemaker
–with-system-librevenge
–with-system-libvisio
–with-system-libwpd
–with-system-libwpg
–with-system-libexttextcat
–with-system-lcms2
–with-system-libatomic_ops
–with-system-libpng
–with-system-libxml
–with-system-neon
–with-system-nss
–with-system-odbc
–with-system-openldap
–with-system-openssl
–with-system-poppler
–with-system-redland
–with-system-serf
–with-system-zlib
–with-boost-libdir=/usr/lib/x86_64-linux-gnu

And now I use (and this may prevent the crashes, I suppose)
make

When compiling failed, I always used sudo -u lool make. But I haven’t tested it yet. I used sudo -u lool make because I read that one cannot compile LibreOffice core as root. But perhaps they only ask for lool, when one configure LibreOffice core. I’m going to test sudo -u lool make again.

Till now i haven’t installed the compiled LibreOffice core! So I doesn’t know if it works.

Kind regards.

Modifyed some things:
added --enable-release-build=yes \ in the autogen.sh configuration
changed prefix path to --prefix=/usr/local

Under Debian 8.7 with the old autogen.sh configuration the checkinstall failed. The new worked in a Virtualbox Ubuntu 16.04 client. I’m going to test it in Debian 8.7.
It installs Collabora core under /usr/share/doc and /usr/local/lib.

It works on Virtualbox Debian 8.7 client too.

Compile LibreOffice Online (as user root):
apt-get install libcap-dev libcap-ng-dev python-polib python3-polib libcunit1 libcunit1-dev
apt-get install npm nodejs-legacy

npm install -g npm
npm install -g jake

Download LibreOffice Online:
cd /usr/local/src/collabora/
git clone "https://github.com/LibreOffice/online.git"
chown -R root.staff online/
cd online

Prepare configuration:
libtoolize
aclocal
automake --add-missing
autoreconf
autoheader
automake --add-missing

I had to run automake twice, because the first time i got an error!

Configure LibreOffice Online:
./configure --prefix=/usr/local/lib/loolwsd
–bindir=/usr/local/lib/loolwsd/bin
–sysconfdir=/usr/local/lib/loolwsd/etc
–enable-silent-rules
–with-lokit-path=/usr/local/src/collabora/online/bundled/include
–with-lo-path=/usr/local/lib/collaboraoffice
–with-poco-includes=/usr/local/include
–with-poco-libs=/usr/local/lib

There are two options one can set the limits of connections and the limit of documents:
–max-connections
–max-documents
(see ./configure --help)

Compile:
make

Install:
checkinstall

In Debian 8.7 one have to adapt /etc/checkinstallrc. Change TRANSLATE=1 to TRANSLATE=0 (ad least on a German environment). Otherwise checkinstall fails to create install pathes.

I testet it in Ubuntu 16.04 Virtualbox client and in a Debian 8.7 Virtualbox client.


#86

Great job @go4ncloud! My big problem now is compile loolwsd. Have you find any way to do this?


#87

No! Haven’t started yet with LibreOffice Online.

Have you checked, if make vs. sudo -u lool make makes the difference? Would be nice to be sure.

Kind regards.


#88

I tried @mad_mat configuration (wihtout -u lool) and compilation was successful. But I don’t know if there is a real difference because until loolwsd module is not ready I cannot test LibreOffice Online.


#89

I’m trying to compile wsd.

cd /opt
git clone https://github.com/LibreOffice/online.git

download dependencies:

  • libpng
  • libcap-progs

cd online

libtoolize
aclocal
automake --add-missing
autoreconf
autoheader

./configure --enable-silent-rules --with-lokit-path=/opt/libreoffice/core/include --with-lo-path=/opt/libreoffice/core/instdir --with-poco-includes=/usr/local/include/Poco --with-poco-libs=/usr/local/lib --enable-debug

make

at this point i get this error
wsd/Admin.cpp:336:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (totalMem != _lastTotalMemory)

and make process stops

Do you have any idea to fix this erorr?


#90

I haven’t any experience with this error. But perhaps your machine (virtual or not) haven’t enough harddisk space of RAM.


#91

I have i5 machine with 4Gb ram, 1Tb hd. Have you tried to compile wsd?


#92

I try it at the moment. I already realized that I have to use poco-1.7.7-all because I got en error missing Poco/Net/SecureServerSocket.h

I found a hint in the net that poco-x-all coud solve this problem.


#93

See above! I managed it to compile an install LibreOffice Online! Hope this will help you.


#94

Wonderful! Could you give us script to compile loolwsd and loleaflet?


#95

A script such something with bash or a script such as a written Howto?

For a bash script i haven’t the time and moreover I haven’t the skills. Sorry. Perhaps you will find another nextcloud user that can use my hints to develop a script. bash, perl or what so ever.

I’m more eager to find out, how I can use self signed certificates with LibreOffice Online, so that I and other can test LibreOffice Online in a Virtualbox environment.

Kind regards.

And by the way. It isn’t all my credit. There are a lot of others. There information helped me to find my way!


#96

@go4ncloud, I don’t need a bash script. It’s enough configure command for loolwsd if you can


#97

OK. I see this is a misunderstanding. I wrote down the way one can configure, compile and install loolwsd in my first input above. I thought it would be a good Idea to write down it a the same place I mentioned the way to compile an install LibreOffice Core. But:

apt-get install libcap-dev libcap-ng-dev python-polib python3-polib libcunit1 libcunit1-dev
apt-get install npm nodejs-legacy

npm install -g npm
npm install -g jake

Download LibreOffice Online:
cd /usr/local/src/collabora/
git clone "https://github.com/LibreOffice/online.git"
chown -R root.staff online/
cd online

Prepare configuration:
libtoolize
aclocal
automake --add-missing
autoreconf
autoheader
automake --add-missing

I had to run automake twice, because the first time i got an error!
I think your problem is caused by a wrong lokit path in the configure command.

Configure LibreOffice Online:
./configure --prefix=/usr/local/lib/loolwsd
–bindir=/usr/local/lib/loolwsd/bin
–sysconfdir=/usr/local/lib/loolwsd/etc
–enable-silent-rules
–with-lokit-path=/usr/local/src/collabora/online/bundled/include
–with-lo-path=/usr/local/lib/collaboraoffice
–with-poco-includes=/usr/local/include
–with-poco-libs=/usr/local/lib

There are two options one can set the limits of connections and the limit of documents:
–max-connections
–max-documents
(see ./configure --help)

Compile:
make

Install:
checkinstall

In Debian 8.7 one have to adapt /etc/checkinstallrc. Change TRANSLATE=1 to TRANSLATE=0 (ad least on a German environment). Otherwise checkinstall fails to create install pathes.
I testet it in Ubuntu 16.04 Virtualbox client and in a Debian 8.7 Virtualbox client.

Hope, this helps you, to install loolwsd on your system. Could you tell me, if it works on your machine. I’m interested in knowing if RAM is a factor.


#98

Thank you very much for your help! I’m installing Debian 8.7 and than I’ll restart process from the beginning. This evening I hope to give you a positive feedback (until now I used Ubuntu 16.10).


#99

OK. Hint: I have changed the etc path. It’s more elegant in my opinion.
–sysconfdir=/usr/local/lib/loolwsd/etc \

In the meantime, I try to find out how to handle loleafleat.


#100

Hello,

it is ready. Just run this script in new installed Ubuntu 16.04.

Enjoy!!!


#101

loolwsd built correctly also with 4Gb ram.