Skip to content

Instantly share code, notes, and snippets.

@m-jowett
Last active January 3, 2023 07:53
Show Gist options
  • Save m-jowett/0f28bff952737f210574fc3b2efaa01a to your computer and use it in GitHub Desktop.
Save m-jowett/0f28bff952737f210574fc3b2efaa01a to your computer and use it in GitHub Desktop.
Setup LibreOffice Online (Log/Guide) [WIP]

Setup LibreOffice Online (Log/Guide) [WIP]

About

This guide/log is based off my experience attempting to build and install LibreOffice Online and it's dependencies on my system.

The end goal is to get LibreOffice Online integrated with Karoshi Server.

LibreOffice Online is still in development (17/06/16).

Each part is labeled with a number, if steps are labeled with the same number then they are an alternate method.

LibreOffice Online Wiki Page

Distro used in this guide: Xubuntu 16.04 amd64

I'll be updating this with progress as I go along, feel free to comment if you have any suggestions or feedback.

There are 2 parts of this guide as initially the plan was to build and install LibreOffice Online from source and then use it with LibreOnline-ownCloud to provide a way for server users to save and modify there work in Owncloud. However LibreOnline-ownCloud is now classed as "obsolete" with richdocuments taking it's place and therefore I went with this option as it seemed more stable and is being updated with the latest from LibreOffice Online.

Build and Install richdocuments in Owncloud.

In this guide I am using Karoshi Server V11 (160810-1116) with the Owncloud 9.0.1 module installed on the main domain controller.

This requires a built and working version of LibreOffice Online loolwsd and loleaflet. See below for a guide/log.

Install git which is required to clone the repositiory.

sudo apt-get install git

Clone the latest version of the richdocuments repository.

git clone https://github.com/owncloud/richdocuments.git

Enter the richdocuments directory.

cd richdocuments

Build a tarball using the makefile inside.

make dist

Extract the contents of the tarball in your server's Owncloud app folder. This is located at owncloud/apps.

For example on my system it is found under /var/www/html/owncloud/apps.

This may need to be run as root (or another superuser), depending on the folder permissions configured.

tar -xzf *.tar.gz -C /var/www/html/owncloud/apps
mv /var/www/html/owncloud/apps/owncloud-collabora-online-x.x.x /var/www/html/owncloud/apps/richdocuments

(With x.x.x representing the version of richdocuments you have cloned.)

Now there should be a folder named richdocuments within the apps folder.

Install the dependencies required for memcache.

sudo apt-get install php-apcu php-memcache

You may need to restart apache to enable the memcache module in php.

sudo service apache2 restart

Add 'memcache.local' => '\OC\Memcache\APCu', to owncloud/config/config.php.

For example on my system it is found under /var/www/html/owncloud/config/config.php.

This may need to be done as root (or another superuser), depending on the file permissions configured.

sed -i '$ d' /var/www/html/owncloud/config/config.php
echo "  'memcache.local' => '\OC\Memcache\APCu'," >> /var/www/html/owncloud/config/config.php
echo ");" >> /var/www/html/owncloud/config/config.php

The following steps require access to the occ (Owncloud Console). This is executed by your HTTP user.

For example on my system the console can be accessed by running:

sudo -u www-data php /var/www/html/owncloud/occ Followed by your arguments.

www-data is the HTTP user. php links to php, you may want to swap this out for /opt/rh/php54/root/usr/bin/php if php is not found. /var/www/html/owncloud/occ is the path to the owncloud folder using containing the php script occ.

sudo -u www-data php /var/www/html/owncloud/occ config:system:set --value='\OC\Memcache\APCu' memcache.local

If successful this will return: System config value memcache.local set to string \OC\Memcache\APCu

Then enable the richdocuments app.

sudo -u www-data php /var/www/html/owncloud/occ app:enable richdocuments

If successful this will return: richdocuments enabled.

There should now be a Collabra Online section under Admin in Owncloud, leave this for now.

You configure the WOPI Client URL (where the LibreOffice Online loolwsd is listening). For example I will configure it to https://192.168.210:9980 as this I'm using a test VM without a qualified domain name.

The default port is 9980.

sudo -u www-data php /var/www/html/owncloud/occ config:app:set --value='https://localhost:9980' richdocuments wopi_url

Move the ca-chain certificate into the OwnCloud ca-bundle if required (as root).: sudo cat /opt/karoshi/karoshi_user/online/loolwsd/etc/ca-chain.cert.pem >> /var/www/html/owncloud/resources/config/ca-bundle.crt

Build and Install LibreOffice Online from source

1. Introduction

Install git and wget.

sudo apt-get install git wget

Clone the LibreOffice Online repository from Github.

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

Enter the directory

cd online

Revert the repository back to the commit marking the most current tagged release on Github.

This is optional, however I was having issues compiling the latest master branch at commit c47c4fe5a487dd249c4e0a67b25a7a419c732a84 .

This guide is currently based off 1.7.2-1, with the latest commit of that tag being: aedd02a210498578444a6b2f4abb84eada012c7f .

git checkout aedd02a210498578444a6b2f4abb84eada012c7f

We can check that this was successful by checking the current commit HEAD is at.

git log -1

Move up a directory

cd ../

(The master branch at: commit 2757adc3c69ce345a9ba8a82166d75665b7e1ef1 compiles fine.)

2. Building LibreOffice On-Line WebSocket server (loolwsd)

Building/Installing the POCO Library

3. Install using Ubuntu package (broken for me)

Add the collaboraoffice PPA for POCO to /etc/apt/sources.list

deb https://www.collaboraoffice.com/apt-poco/ /

Update the sources list.

sudo apt-get update

It seems that the GPG key to verify the PPA wasn't installed in my keychain.

Get:5 https://www.collaboraoffice.com/apt-poco  InRelease [1,726 B]
Ign:5 https://www.collaboraoffice.com/apt-poco  InRelease
Fetched 1,726 B in 0s (2,668 B/s)
Reading package lists... Done
W: GPG error: https://www.collaboraoffice.com/apt-poco  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0C54D189F4BA284D
W: The repository 'https://www.collaboraoffice.com/apt-poco  InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: There is no public key available for the following key IDs:
0C54D189F4BA284D

Install the GPG public key.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D

Attempt to update the sources again.

sudo apt-get update

Reading package lists... Done
W: https://www.collaboraoffice.com/apt-poco/InRelease: Signature by key 6CCEA47B2281732DF5D504D00C54D189F4BA284D uses weak digest algorithm (SHA1)

It seems that InRelease within the PPA defaults to use SHA1, which is now deprecated and rejected by Apt.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Therefore, I went on to build from source instead.

3. Building POCO from source

Install the dependencies required to compile the source.

sudo apt-get install openssl g++ libssl-dev

Download the source.

wget http://pocoproject.org/releases/poco-1.7.4/poco-1.7.4-all.tar.gz

Make a directory to store the decompressed files.

mkdir poco

Uncompress the source files into the directory.

tar -xv -C poco -f poco-1.7.4-all.tar.gz

Change directory into the source folder.

cd poco/poco-1.7.4-all

Switch to superuser before building the source and installing (script requires access to /opt/poco).

sudo su

Compile and install the POCO libraries to /opt/poco.

./configure --prefix=/opt/poco
make install

Switch back into an unpriviledged user (not root).

su <username>

The Poco libary should by found in /opt/poco, we will need to reference this folder later.

Move back up to the starting folder.

cd ../..

4. Downloading/Compiling LibreOffice Core

Clone the master branch of the GitHub repository.

git clone -b master --single-branch https://github.com/LibreOffice/core.git

Change directory into the source folder.

cd core

Reset the files back to the latest commit in case of accidental changes or formatting.

git reset --hard

Before compiling from source we need to install the LibreOffice required dependencies.

First, make sure that the deb-src for main is uncommented in the sources list (/etc/apt/sources.list).

For example on Xubuntu Xenial (16.04):

deb-src http://gb.archive.ubuntu.com/ubuntu/ xenial main restricted

Update the sources.

sudo apt-get update

Install the dependencies from the Ubuntu main PPA.

sudo apt-get build-dep libreoffice

The package libkrb5-dev seems to be not included, so we will install it separately.

sudo apt-get install libkrb5-dev

Now run autogen.sh in preparation of building the source.

./autogen.sh

Build LibreOffice core.

make

  • If the makefile returns the error below.
root@<hostname>:~/core# make

No. You make ME a sandwich.

Makefile:58: recipe for target 'check-if-root' failed
make: *** [check-if-root] Error 1
  • Move up to the directory containing the core folder.

cd ../

  • Recursively change the core folder and it's contents to be owned by your user.

sudo chown -R username:users core

  • Move back into core.

cd core

  • Build the source again, but with errors ignored.
root@<hostname>:~/core# make -i

No. You make ME a sandwich.

Makefile:58: recipe for target 'check-if-root' failed
make: [check-if-root] Error 1 (ignored)
  • The error should be ignored and the makefile will continue as normal.

5. Building and Installing LibreOffice On-Line WebSocket server (loolwsd)

Move back into the online/loolwsd directory.

cd ../online/loolwsd

Install/Update the dependencies needed to build.

sudo apt-get install -y libpng12-dev libcap-dev libtool m4 automake

Set the path name to the core folder as the variable $MASTER.

Make sure that it is not followed by a slash and is enclosed by quote marks, especially if your path name contains spaces.

For example on my test system: MASTER="/opt/karoshi/karoshi_user/core"

Then set the variables used for running loolwsd with loleaflet while we are in the loolwsd folder.

$(pwd) is the current directory path.

SYSTEMPLATE=$(pwd)/systemplate
ROOTFORJAILS=$(pwd)/jails

Install the required c++ libraries.

sudo apt-get install -y libcppunit-dev libcppunit-doc pkg-config

Run autogen.sh in preparation of building the source, this should generate configure.

./autogen.sh

Run the configure script in preparation for building loolwsd.

./configure --enable-silent-rules --with-lokit-path=${MASTER}/include --with-lo-path=${MASTER}/instdir --enable-debug --with-poco-includes=/opt/poco/include --with-poco-libs=/opt/poco/lib

Build loolwsd.

make or /usr/bin/make

Create the directory used for caching tiles as set in configure.ac.

If you did not pass a prefix changing this when running the configure script for loolwsd, the folder should be /usr/local/var/cache/loolwsd.

mkdir -p /usr/local/var/cache/loolwsd

Then change the owner of this folder to the current user (if it is not already).

sudo chown username /usr/local/var/cache/loolwsd

For some reason loolwsd looks in /etc/loolwsd for the self generated ssl certificates it requires. Therefore I created the folder and copied the certificates into it (as root).

sudo mkdir -p /etc/loolwsd
sudo cp /opt/karoshi/karoshi_user/online/loolwsd/etc/cert.pem /etc/loolwsd/cert.pem
sudo cp /opt/karoshi/karoshi_user/online/loolwsd/etc/key.pem /etc/loolwsd/cert/key.pem
sudo cp /opt/karoshi/karoshi_user/online/loolwsd/etc/ca-chain.cert.pem /etc/loolwsd/cert/ca-chain.cert.pem

Now loolwsd should run without SSL errors.

Then run loolwsd as an unprivilledged user (not root).

make run

You have to kill loolwsd by hitting CTRL+C before you install loleaflet.

5. Building Leaflet platform for LibreOffice On-Line (loleaflet)

I have not tested this extensively so you may find some errors which I have not included a fix here.

Please check the README file found in online/loleaflet as some common errors are addressed there. This is also linked in the Notes section.

Enter the loleaflet directory (from loolwsd).

cd ../loleaflet

Install npm (from node.js) if not installed already.

sudo apt-get install npm nodejs

Install dependencies needed to build loleaflet through npm.

npm install -g jake

Check whether npm is at least version 3.0.

npm -v

If not update npm.

npm install -g npm

Create a symbolic link for node.js as the makefile looks for node.js in /usr/bin/node.

sudo ln -s /usr/bin/nodejs /usr/bin/node

Build loleaflet, make sure you defined the variables SYSTEMPLATE, MASTER and ROOTFORJAILS from the loolwsd part of this log/guide.

make

To run loolwsd with loleaflet use:

./loolwsd --o:sys_template_path=${SYSTEMPLATE} --o:lo_template_path=${MASTER}/instdir --o:child_root_path=${ROOTFORJAILS}

You should now be able to access files within the browser under the URL (this does not include local files):

https://localhost:9980/loleaflet/dist/loleaflet.html?file_path=file:///PATH/TO_DOC&host=wss://localhost:9980

To access the admin panel go to:

https://localhost:9980/loleaflet/dist/admin/admin.html

When accessing the site you may be asked to trust a certificate if you are using a self-signed certificate on your server without a valid certificate authority.

-TODO/STILL TESTING-

Integrate LibreOnline-ownCloud with LibreOffice Online ("obsolete")

LibreOnline-ownCloud is now obsolete and is succeeded by richdocuments, check out the log/guide above and the repository linked under Notes.

This requires you to have built and installed LibreOffice Online from source (see the log/guide above) as well as having Owncloud setup and running on your server.

In this guide I am using Karoshi Server V11 (160810-1116) with the Owncloud 9.0.1 module installed on the main domain controller.

Notes

Sources/ Useful Links

LibreOffice/Core on Github

LibreOffice/Online on Github

LibreOnline-ownCloud on Github

richdocuments on Github

LibreOffice/Online loolwsd README on Github

LibreOffice/Online loleaflet README on Github

Building LibreOffice (Core) Guide

POCO C++ Libraries

Karoshi Server on Github

Karoshi Server V11 Download on Sourceforge

@Pisoko
Copy link

Pisoko commented Jul 11, 2016

please continue this nice work! :)

@ly2ly
Copy link

ly2ly commented Jul 22, 2016

Very very nice Job...

@bambam1
Copy link

bambam1 commented Aug 21, 2016

I've been trying to compile LibreOffice Online on my Debian test Server for last 3 days. Numerous errors occur and prevent compilation. Attached console dump, maybe someone could help.

redacted@debianLOOL:/usr/src/online/loolwsd$ make -i
make  all-recursive
make[1]: Entering directory '/usr/src/online/loolwsd'
Making all in .
make[2]: Entering directory '/usr/src/online/loolwsd'
  CXX      Admin.o
In file included from LOOLWSD.hpp:26:0,
                 from Admin.cpp:36:
TraceFile.hpp: In member function ‘void TraceFileReader::readFile()’:
TraceFile.hpp:216:79: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘std::vector<TraceFileRecord>::size_type {aka unsigned int}’ [-Werror=format=]
                     _records.empty() ? "<empty>" : _records[0].Payload.c_str());
                                                                               ^
Admin.cpp: In member function ‘virtual void MemoryStats::run()’:
Admin.cpp:324:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (totalMem != _lastTotalMemory)
                  ^
cc1plus: all warnings being treated as errors
Makefile:826: recipe for target 'Admin.o' failed
make[2]: [Admin.o] Error 1 (ignored)
  CXX      DocumentBroker.o
In file included from LOOLWSD.hpp:26:0,
                 from DocumentBroker.cpp:22:
TraceFile.hpp: In member function ‘void TraceFileReader::readFile()’:
TraceFile.hpp:216:79: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘std::vector<TraceFileRecord>::size_type {aka unsigned int}’ [-Werror=format=]
                     _records.empty() ? "<empty>" : _records[0].Payload.c_str());
                                                                               ^
cc1plus: all warnings being treated as errors
Makefile:826: recipe for target 'DocumentBroker.o' failed
make[2]: [DocumentBroker.o] Error 1 (ignored)
  CXX      LOOLWSD.o
In file included from LOOLWSD.hpp:26:0,
                 from LOOLWSD.cpp:10:
TraceFile.hpp: In member function ‘void TraceFileReader::readFile()’:
TraceFile.hpp:216:79: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘std::vector<TraceFileRecord>::size_type {aka unsigned int}’ [-Werror=format=]
                     _records.empty() ? "<empty>" : _records[0].Payload.c_str());
                                                                               ^
cc1plus: all warnings being treated as errors
Makefile:826: recipe for target 'LOOLWSD.o' failed
make[2]: [LOOLWSD.o] Error 1 (ignored)
  CXX      ClientSession.o
In file included from LOOLWSD.hpp:26:0,
                 from ClientSession.cpp:25:
TraceFile.hpp: In member function ‘void TraceFileReader::readFile()’:
TraceFile.hpp:216:79: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘std::vector<TraceFileRecord>::size_type {aka unsigned int}’ [-Werror=format=]
                     _records.empty() ? "<empty>" : _records[0].Payload.c_str());
                                                                               ^
cc1plus: all warnings being treated as errors
Makefile:826: recipe for target 'ClientSession.o' failed
make[2]: [ClientSession.o] Error 1 (ignored)
  CXX      FileServer.o
In file included from LOOLWSD.hpp:26:0,
                 from FileServer.cpp:40:
TraceFile.hpp: In member function ‘void TraceFileReader::readFile()’:
TraceFile.hpp:216:79: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘std::vector<TraceFileRecord>::size_type {aka unsigned int}’ [-Werror=format=]
                     _records.empty() ? "<empty>" : _records[0].Payload.c_str());
                                                                               ^
cc1plus: all warnings being treated as errors
Makefile:826: recipe for target 'FileServer.o' failed
make[2]: [FileServer.o] Error 1 (ignored)
  CXX      PrisonerSession.o
In file included from LOOLWSD.hpp:26:0,
                 from PrisonerSession.cpp:22:
TraceFile.hpp: In member function ‘void TraceFileReader::readFile()’:
TraceFile.hpp:216:79: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘std::vector<TraceFileRecord>::size_type {aka unsigned int}’ [-Werror=format=]
                     _records.empty() ? "<empty>" : _records[0].Payload.c_str());
                                                                               ^
cc1plus: all warnings being treated as errors
Makefile:826: recipe for target 'PrisonerSession.o' failed
make[2]: [PrisonerSession.o] Error 1 (ignored)
  CXX      Storage.o
In file included from LOOLWSD.hpp:26:0,
                 from Storage.cpp:31:
TraceFile.hpp: In member function ‘void TraceFileReader::readFile()’:
TraceFile.hpp:216:79: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘std::vector<TraceFileRecord>::size_type {aka unsigned int}’ [-Werror=format=]
                     _records.empty() ? "<empty>" : _records[0].Payload.c_str());
                                                                               ^
Storage.cpp: In member function ‘virtual StorageBase::FileInfo LocalStorage::getFileInfo(const Poco::URI&)’:
Storage.cpp:178:51: error: narrowing conversion of ‘size’ from ‘const long long unsigned int’ to ‘size_t {aka unsigned int}’ inside { } [-Werror=narrowing]
     return FileInfo({filename, lastModified, size});
                                                   ^
cc1plus: all warnings being treated as errors
Makefile:826: recipe for target 'Storage.o' failed
make[2]: [Storage.o] Error 1 (ignored)
  CXXLD    loolwsd
g++: error: Admin.o: No such file or directory
g++: error: DocumentBroker.o: No such file or directory
g++: error: LOOLWSD.o: No such file or directory
g++: error: ClientSession.o: No such file or directory
g++: error: FileServer.o: No such file or directory
g++: error: PrisonerSession.o: No such file or directory
g++: error: Storage.o: No such file or directory
Makefile:730: recipe for target 'loolwsd' failed
make[2]: [loolwsd] Error 1 (ignored)
  CXX      LOOLStress.o
In file included from LOOLStress.cpp:44:0:
TraceFile.hpp: In member function ‘void TraceFileReader::readFile()’:
TraceFile.hpp:216:79: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘std::vector<TraceFileRecord>::size_type {aka unsigned int}’ [-Werror=format=]
                     _records.empty() ? "<empty>" : _records[0].Payload.c_str());
                                                                               ^
cc1plus: all warnings being treated as errors
Makefile:826: recipe for target 'LOOLStress.o' failed
make[2]: [LOOLStress.o] Error 1 (ignored)
  CXXLD    loolstress
g++: error: LOOLStress.o: No such file or directory
Makefile:722: recipe for target 'loolstress' failed
make[2]: [loolstress] Error 1 (ignored)
if test "$BUILDING_FROM_RPMBUILD" != yes; then \
    sudo /sbin/setcap cap_fowner,cap_mknod,cap_sys_chroot=ep loolforkit; \
    sudo /sbin/setcap cap_sys_admin=ep loolmount; \
    echo "Set required capabilities"; \
else \
    echo "Skipping capability setting"; \
fi
Set required capabilities
make[2]: Leaving directory '/usr/src/online/loolwsd'
Making all in test
make[2]: Entering directory '/usr/src/online/loolwsd/test'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/usr/src/online/loolwsd/test'
make[1]: Leaving directory '/usr/src/online/loolwsd'
redacted@debianLOOL:/usr/src/online/loolwsd$

@klendazu
Copy link

klendazu commented Jan 5, 2017

I have installed on Ubuntu 14.0.4.5 LTS and owncloud 8.2
I run loolwsd, everything works fine, i edit a document, when i press the exit boton the loolwsd CRASH.
I paste the debug info
loolwsd
loolforkit version details: 2.0.1+ - 9c35ab1
office version details: { "ProductName": "LibreOfficeDev", "ProductVersion": "5. 4", "ProductExtension": ".0.0.alpha0", "BuildId": "1b5e144b4ed0e276d6485ece6d3d2 b0b10f9bbf8" }
wsd-21942-21945 0:00:46.412351 [ client_ws_0002 ] SIG Fatal signal received: S IGSEGV
Backtrace 21942:
./loolwsd() [0x4c5f87]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330) [0x7f8478e2f330]
./loolwsd(_ZN14DocumentBroker13removeSessionERKSs+0x14e) [0x44547e]
./loolwsd(_ZN20ClientRequestHandler17processGetRequestERKSsRSt10shared_ptrI13LOO LWebSocketES1_RKN4Poco3URIERKS2_I14DocumentBrokerEb+0x98d) [0x46b8ad]
./loolwsd(ZN20ClientRequestHandler16handleGetRequestERKSsRSt10shared_ptrI13LOOL WebSocketES1+0x946) [0x471126]
./loolwsd(_ZN20ClientRequestHandler19handleClientRequestERN4Poco3Net17HTTPServer RequestERNS1_18HTTPServerResponseE+0x10bc) [0x478f4c]
./loolwsd(_ZN20ClientRequestHandler13handleRequestERN4Poco3Net17HTTPServerReques tERNS1_18HTTPServerResponseE+0x33b) [0x47a5bb]
/opt/poco/lib/libPocoNetd.so.44(_ZN4Poco3Net20HTTPServerConnection3runEv+0x30c) [0x7f847a85c21e]
/opt/poco/lib/libPocoNetd.so.44(_ZN4Poco3Net19TCPServerConnection5startEv+0x24) [0x7f847a87a944]
/opt/poco/lib/libPocoNetd.so.44(_ZN4Poco3Net19TCPServerDispatcher3runEv+0x164) [ 0x7f847a890a2c]
/opt/poco/lib/libPocoFoundationd.so.44(_ZN4Poco12PooledThread3runEv+0x85) [0x7f8 479edb873]
/opt/poco/lib/libPocoFoundationd.so.44(+0x1f9d8d) [0x7f8479ed8d8d]
/opt/poco/lib/libPocoFoundationd.so.44(_ZN4Poco10ThreadImpl13runnableEntryEPv+0x e1) [0x7f8479ed8a3d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8184) [0x7f8478e27184]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f8478b5437d]
Violación de segmento (`core' generado)

@ltmakela
Copy link

ltmakela commented Mar 20, 2017

It is worth of making this all as user "lool". After testing you might want to use loolwsd without --enable-debug flag. In this situation loolwsd checks if user is "lool" or not. "lool" is accepted, others not. So in order to make your loolwsd working, chown approppriate folders and files for user lool.
(-R for subfolders) "Lool" -needed dirs and files are /tmp/loolwsd.log, /usr/local/var/cache (-R), /etc/loolwsd/ (-R for certs and keys. This folder is used as default when compiled undebug), /opt/online (-R, this is your lool-folder), /opt/libreoffice/core (whole libreoffice dir with subdirectories and files).

I have managed to setup fully working ubuntu 16.04 + owncloud(9.1.4) + richdocuments (1.1.7) + LibreofficeOnline with your guide. Thank you!

@pix378
Copy link

pix378 commented Oct 10, 2017

I created a lool user by giving permissions as described above but returns segmentation error. I tested on a Centos 7 and on a Debian 9 virtual machine with 4 GB of memory.
wsd-09204-09204 07:41:18.298877 [ loolwsd ] SIG Fatal signal received: SIGSEGV Backtrace 9204: ./loolwsd(_ZN7SigUtil13dumpBacktraceEv+0x43) [0x5636fcf8cd63] ./loolwsd(+0x12925e) [0x5636fcf8e25e] /lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0) [0x7f16494d50c0] /usr/lib/x86_64-linux-gnu/libssl.so.1.1(SSL_CTX_set_options+0) [0x7f164bfbeec0] ./loolwsd(_ZN10SslContextC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_+0xbd) [0x5636fcfa398d] ./loolwsd(_ZN7LOOLWSD13initializeSSLEv+0x5bf) [0x5636fcef219f] ./loolwsd(_ZN7LOOLWSD9innerMainEv+0x144) [0x5636fcefc524] ./loolwsd(_ZN7LOOLWSD4mainERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE+0x17) [0x5636fce9d807] /opt/poco/lib/libPocoUtil.so.49(_ZN4Poco4Util11Application3runEv+0x1f) [0x7f164af6818f] ./loolwsd(main+0x72) [0x5636fce9d212] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f16491452b1] ./loolwsd(_start+0x2a) [0x5636fce9e2aa] Errore di segmentazione

@Aranad
Copy link

Aranad commented Feb 17, 2018

Hi guys, is this still up to date for getting LOOL running on our own server? If not does anyone have a more up to date link?

@rochelmeyer
Copy link

Hi everybody,

i can follow this up to the point where libreoffice/core gets to compile. Compiler blows up at this point:

[CUT] svl_qa_cppunit
[DEP] LNK:CppunitTest/libtest_toolkit.so
[LNK] CppunitTest/libtest_toolkit.so
(anonymous namespace)::Test::testNumberFormat finished in: 100ms
(anonymous namespace)::Test::testSharedString finished in: 0ms
(anonymous namespace)::Test::testSharedStringPool finished in: 0ms
(anonymous namespace)::Test::testSharedStringPoolPurge finished in: 0ms
(anonymous namespace)::Test::testFdo60915 finished in: 4ms
(anonymous namespace)::Test::testI116701 finished in: 3ms
(anonymous namespace)::Test::testTdf103060 finished in: 2ms
(anonymous namespace)::Test::testDateInput finished in: 13ms
(anonymous namespace)::Test::testIsNumberFormat finished in: 2ms
(anonymous namespace)::Test::testIsNumberFormatSpecific finished in: 9ms
unknown:0:(anonymous namespace)::Test::testUserDefinedNumberFormats
uncaught exception of type std::exception (or derived).

  • locale::facet::_S_create_c_locale name not valid

(anonymous namespace)::Test::testUserDefinedNumberFormats finished in: 13ms
(anonymous namespace)::Test::testNfEnglishKeywordsIntegrity finished in: 2ms
(anonymous namespace)::Test::testStandardColorIntegrity finished in: 1ms
(anonymous namespace)::Test::testColorNamesConversion finished in: 3ms
##Failure Location unknown## : Error
Test name: (anonymous namespace)::Test::testUserDefinedNumberFormats
uncaught exception of type std::exception (or derived).

  • locale::facet::_S_create_c_locale name not valid

Failures !!!
Run: 14 Failure total: 1 Failures: 0 Errors: 1

Error: a unit test failed, please do one of:

make CppunitTest_svl_qa_cppunit CPPUNITTRACE="gdb --args"
# for interactive debugging on Linux
make CppunitTest_svl_qa_cppunit VALGRIND=memcheck
# for memory checking
make CppunitTest_svl_qa_cppunit DEBUGCPPUNIT=TRUE
# for exception catching

You can limit the execution to just one particular test by:

make CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params...

/buildfiles/core/solenv/gbuild/CppunitTest.mk:116: recipe for target '/buildfiles/core/workdir/CppunitTest/svl_qa_cppunit.test' failed
make[1]: *** [/buildfiles/core/workdir/CppunitTest/svl_qa_cppunit.test] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:286: recipe for target 'build' failed
make: *** [build] Error 2

I already tried to replace the cppunit of my system with the most recent 14.0 version, but the problem remains.
Any Ideas? Is this a bug i should report, or is this something that my machine messes up?

@marcosx86
Copy link

Hi everybody,

i can follow this up to the point where libreoffice/core gets to compile. Compiler blows up at this point:

[CUT] svl_qa_cppunit
[DEP] LNK:CppunitTest/libtest_toolkit.so
[LNK] CppunitTest/libtest_toolkit.so
(anonymous namespace)::Test::testNumberFormat finished in: 100ms
(anonymous namespace)::Test::testSharedString finished in: 0ms
(anonymous namespace)::Test::testSharedStringPool finished in: 0ms
(anonymous namespace)::Test::testSharedStringPoolPurge finished in: 0ms
(anonymous namespace)::Test::testFdo60915 finished in: 4ms
(anonymous namespace)::Test::testI116701 finished in: 3ms
(anonymous namespace)::Test::testTdf103060 finished in: 2ms
(anonymous namespace)::Test::testDateInput finished in: 13ms
(anonymous namespace)::Test::testIsNumberFormat finished in: 2ms
(anonymous namespace)::Test::testIsNumberFormatSpecific finished in: 9ms
unknown:0:(anonymous namespace)::Test::testUserDefinedNumberFormats
uncaught exception of type std::exception (or derived).

  • locale::facet::_S_create_c_locale name not valid

(anonymous namespace)::Test::testUserDefinedNumberFormats finished in: 13ms
(anonymous namespace)::Test::testNfEnglishKeywordsIntegrity finished in: 2ms
(anonymous namespace)::Test::testStandardColorIntegrity finished in: 1ms
(anonymous namespace)::Test::testColorNamesConversion finished in: 3ms
##Failure Location unknown## : Error
Test name: (anonymous namespace)::Test::testUserDefinedNumberFormats
uncaught exception of type std::exception (or derived).

  • locale::facet::_S_create_c_locale name not valid

Failures !!!
Run: 14 Failure total: 1 Failures: 0 Errors: 1

Error: a unit test failed, please do one of:

make CppunitTest_svl_qa_cppunit CPPUNITTRACE="gdb --args"

for interactive debugging on Linux

make CppunitTest_svl_qa_cppunit VALGRIND=memcheck

for memory checking

make CppunitTest_svl_qa_cppunit DEBUGCPPUNIT=TRUE

for exception catching

You can limit the execution to just one particular test by:

make CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params...

/buildfiles/core/solenv/gbuild/CppunitTest.mk:116: recipe for target '/buildfiles/core/workdir/CppunitTest/svl_qa_cppunit.test' failed
make[1]: *** [/buildfiles/core/workdir/CppunitTest/svl_qa_cppunit.test] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:286: recipe for target 'build' failed
make: *** [build] Error 2

I already tried to replace the cppunit of my system with the most recent 14.0 version, but the problem remains.
Any Ideas? Is this a bug i should report, or is this something that my machine messes up?

Hey there,

I got that too. Happens when you use --with-locales on core. The ./configure says that it might break (for sure).

Don't use it.

Regards...

@tuxcrafter
Copy link

Hello everybody is there an updated script to install loolwsd libreoffice-online as replacement of collabora?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment