LibreOffice Online bzw. Office Dokumente bearbeiten

Du hättest auch “loolwsd” anpassen können:

If you have self-built Poco, add the following to ./configure:

    --with-poco-includes=<POCOINST>/include --with-poco-libs=<POCOINST>/lib

where <POCOINST> means the Poco installation location.

Quelle:
https://github.com/LibreOffice/online/tree/master/loolwsd

Aber auf alle Fälle freut es mich, wenn Du es zum Laufen gebracht hast.

Den --with-poco-includes=<POCOINST>/include hatte ich beim Kompelieren dabei, das Problem ist erst richtig beim ersten starten aufgetretten, da er beim ausführen die Biblithek nicht gefunden hat.

Und Du hast <POCOINST> auch mit den richtigen Pfadangaben ersetzt? …ist ja nur ein Platzhalter in der README

--with-poco-includes=<POCOINST>/include --with-poco-libs=<POCOINST>/lib

bei den beiden Angaben muss <POCOINST> nicht zwingend gleich sein. Das kommt darauf an, was Du beim Bauen von POCO angegeben hast.

Wie gesagt den --with-poco-includes=<POCOINST>/include hatte ich richtig gesetzt (/usr/local/include) beim kompilieren, dass hat ja auch ohne probleme funktioniert. Den --with-poco-libs hatte ich beim kompilieren nur vergessen zu setzen und hatte dann beim ersten starten von loolwsd das problem das er die Biblithek nicht laden konnte. Ich hatte dann keine Lust neu zu Kompilieren, debian beizubringen wo es die Bibliothek findet schien mir dann schneller.

Would be nice to have this in the AUR

Hi.

Thanx for the detailed description. I have just tried to implement this in my cloud.
Downloaded stable libreoffice 5.1.4.2 & libreoffice on-line from the git repository.
After compilation and trying to start loolwsd I see:

frk-32080-00 00:00:00.073630 [ loolforkit ] No lok_preinit symbol in /opt/libreoffice-5.1.4.2/lib/libreoffice/program/libsofficeapp.so: /opt/libreoffice-5.1.4.2/lib/libreoffice/program/libsofficeapp.so: undefined symbol: lok_preinit
wsd-32071-00 00:00:02.021066 [ loolwsd ] Child process [32080] exited with code: 70.

Which problem causes this and how to solve it? The same error appeared also when I tried to use libreoffice4 from the OS. Googling didn’t help :frowning:

Thanx.

Please use the master-branch from git.

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

I think it is a 5.3 version…

And I think too…the best way is to use included loolswd toolkit…see --with-lokit-path=/opt/lool/loolwsd/bundled/include by configure the loolwsd-build…see

/opt/lool/loolwsd/configure \
--sysconfdir=/opt/lool/loolwsd/etc \
--prefix=/opt/lool/loolwsd \
--enable-silent-rules \
--with-lokit-path=/opt/lool/loolwsd/bundled/include \
--with-lo-path=/opt/LibreOfficeFromSource/lib/libreoffice \
--enable-debug

in my example…

if you build the libre from core by yourself, you always have the chance to select your own installationdir…see

./autogen.sh --prefix=/opt/LibreOfficeFromSource
.
.
.

in my post. So you can keep more then one libreoffice-builds in your os (for testing)…

good luck!

I think that makes no sense at this time cause of the experimental state of loolwsd an the richdokuments app…
BUT sometimes it would be nice!

thanx for the replay.

as in your explanation I used --with-lokit-path=/opt/lool/loolwsd/bundled/include to configure loolwsd.

I have just downloaded virtual image for CODE to check what they have inside. So their loolwsd is of course older but libreoffice too. And there are no such kind of lok_preinit symbol in their libraries as well as libsofficeapp.so.
Ok. I will take the latest libreoffice from the git.
But still there are mentions about _preinit in libreoffice on-line but not in the libreoffice core sources. Maybe it can be solved by choosing configuration parameters in libreoffice core?

But - I think - it is an DEV-Bulid and not a stable.

Please inform us about your try…

Please use the “master branch” from git.

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

and do not set

--enable-mergelibs

option in autogen.sh.

--enable-mergelibs
Enables linking of big, merged, library.
Experimental feature, tested only for Linux at some
stage in history, but possibly does not work even
for Linux any more. This will link a core set of
libraries into libmerged.

Then you will get a proper libsofficeapp.so. (In my case, it worked so)

In the collabora-vm-image libre is build with --enable-mergelibs. So there is no libsofficeapp.so but the libmergedlo.so.
This may work but must not…in my case I can’t build libreoffice with this option.

Yes, I saw that collabora-vm-image libre uses mergelibs. Anyways, libreoffice branch from git compiled libsofficeapp.so with this lok_preinit symbol and loowsd does not complain this already.
But now I have a new problem:

kit-64204-00 00:00:16.140231 [ loolkit ] Initialized jail files.
kit-64204-00 00:00:16.140337 [ loolkit ] mknod(/opt/libreoffice-online/loolwsd/jails/64204//dev/random) failed. (errno: Operation not permitted)
kit-64204-00 00:00:16.140364 [ loolkit ] mknod(/opt/libreoffice-online/loolwsd/jails/64204//dev/urandom) failed. (errno: Operation not permitted)
kit-64204-00 00:00:16.140376 [ loolkit ] chroot("/opt/libreoffice-online/loolwsd/jails/64204/")
kit-64204-00 00:00:16.140394 [ loolkit ] chroot("/opt/libreoffice-online/loolwsd/jails/64204/") failed. (errno: Operation not permitted)
frk-64188-00 00:00:17.004916 [ loolforkit ] Child 64204 has exited, removing its jail '/opt/libreoffice-online/loolwsd/jails/64204'

loolwsd is started as www-data user and all directories & files in this path (except /opt) /opt/libreoffice-online/loolwsd/jails are belong to www-data user.
Will try to figure out later on what kind of permissions it complains about but maybe someone has a hint.

Thanx.

Could it be a SELinux problem?

Did you install “libcap”?

LibreOffice On-Line WebSocket server
====================================

Dependencies
------------

LibreOffice On-Line WebSocket server has the following dependencies:

* libpng
* Poco library: http://pocoproject.org/index.html.
* libcap-progs

See: https://github.com/LibreOffice/online/tree/master/loolwsd

Hi,
thanx for the quick replay. SELinux is disabled. libcap is installed.
I saw in spec files for redhat/debian packages in loolwsd sources that they use setcap for loolwsd & loolforkit. Would be this a case to prevent these permission errors?

setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolforkit || true
setcap cap_sys_admin=ep /usr/bin/loolmount || true

Hallo, Danke für die Tolle Anleitung. Leider kann ich den loolwsd nicht starten.
Ich bekomme die Fehlermeldung:
frk-29542-00 00:00:00.879335 [ loolforkit ] No lok_preinit symbol in /usr/lib/libreoffice/program/libmergedlo.so: /usr/lib/libreoffice/program/libmergedlo.so: undefined symbol: lok_preinit

Kann jemand was damit anfangen? Die github Seite von lool hat leider keinen Issue Seite, so dass ich da nciht mit den Entwicklern kommunizieren kann.

Ich habe Ubuntu 16.04 LTS. Libreoffice habe ich aus den Paketquellen Installiert. Poco und loolwsd zu bauen hat ohne Fehlermeldungen geklappt (nach ein paar anläufen).

Muss ich Libreoffice aus den quellen selber bauen?

yepp…

siehe: hier… (ähnliches Problem)

Yes, that is the way, how it would be done for the packages, but that should also be done automatically by “selfbuilding” the loolwsd.

thanx. after setcap-ing loolwsd at least started.
next will be testing.

Do you know when the first realse is planned?

Ich bin nach der Anleitung vorgegangen, ebenfalls unter Arch.
Das Setcap hat für mich den vorletzten Fehler gelöst. Loolwsd startet nun. Allerdings habe ich nun ein Problem mit der Richdocuments App. Diese verbindet sich, aber beim Erstellen eines neuen Dokuments wird nur ein leeres Kästchen in der Dokumentenübersicht erzeugt. Ein Klick auf die erstellte Datei liefert nur ein: failed to open undefined, file not supported.
In den Logs erscheint ein: Undefined index: dir at /nextcloud/apps/richdocuments/controller/documentcontroller.php#258

Update: bin zwar weitergekommen, aber es funktioniert immer noch nicht.
Anscheinend startet bei mir loolwsd nur auf 127.0.0.1 was sich mit meinem Letsencrypt Zertifikat beißt (Localhost nicht im Zertifikat enthalten). Habe probehalber das mitgelieferte verwendet. Nun wird beim Erstellen eines neuen Dokuments tatsächlich das Dokument auf dem Server erstellt. Will man es auch bearbeiten kriegt man das sich ewig drehende Rad, aber keine Bearbeitungsmöglichkeit. Fehler in den Logs bleibt derselbe wie oben.