Download it now!
Bug 121983 - libpixman-1.so.0 not found when LO is built with internal cairo
Summary: libpixman-1.so.0 not found when LO is built with internal cairo
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: target:6.4.0 target:6.3.2 target:6.2.8
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-08 15:20 UTC by Andras Timar
Modified: 2019-09-06 15:23 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Timar 2018-12-08 15:20:14 UTC
I tried to build libreoffice/online:master docker image on Ubuntu 18.04 with the script https://opengrok.libreoffice.org/xref/online/docker/l10n-docker-nightly.sh

The container did not start successfully:
frk-00027-00027 2018-12-06 22:56:50.167106 [ forkit ] FTL  Failed to load /opt/libreoffice/program/libmergedlo.so: libpixman-1.so.0: cannot open shared object file: No such file or directory| kit/Kit.cpp:2601
frk-00027-00027 2018-12-06 22:56:50.167374 [ forkit ] FTL  Failed to preinit lokit.| kit/ForKit.cpp:534

So libpixman-1.so.0 is missing.

collabora@ubuntu1804:~/online/docker$ ldd instdir/opt/libreoffice/program/libmergedlo.so | grep pixman
    libpixman-1.so.0 => /home/collabora/online/docker/builddir/libreoffice/workdir/UnpackedTarball/pixman/pixman/.libs/libpixman-1.so.0 (0x00007f392aa8d000)

It does not link to the libpixman-1.so.0 in instdir! 
I had to hotfix this with the following patch:
diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index 9e91f98..59ce780 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -114,6 +114,9 @@ EOF
 mkdir -p "$INSTDIR"/opt/
 cp -a libreoffice/instdir "$INSTDIR"/opt/libreoffice
 
+# FIXME fix RPATH of libcairo
+chrpath -r '$ORIGIN' "$INSTDIR"/opt/libreoffice/program/libcairo.so.2
+
 ##### loolwsd & loleaflet #####
 
 # build

I think RPATH of libcairo.so.2 should be set properly by the build system. Interestingly, I had this bug only on Ubuntu 18.04, for example on OpenSUSE LEAP 15, the bug does not occur, although RPATH of libcairo.so.2 is still wrong.
Comment 1 Andras Timar 2019-03-07 09:22:52 UTC
build failure with current master, --without-system-cairo

/home/timar/libreoffice-master/instdir/program/libcairo.so.2 has suspicious NEEDED: libxcb-shm.so.0
/home/timar/libreoffice-master/instdir/program/libcairo.so.2 has suspicious NEEDED: libxcb.so.1
/home/timar/libreoffice-master/instdir/program/libcairo.so.2 has suspicious NEEDED: libxcb-render.so.0
/home/timar/libreoffice-master/instdir/program/libcairo.so.2 has suspicious NEEDED: libXrender.so.1
/home/timar/libreoffice-master/instdir/program/libcairo.so.2 has suspicious NEEDED: libX11.so.6
/home/timar/libreoffice-master/instdir/program/libcairo.so.2 has suspicious NEEDED: libXext.so.6
/home/timar/libreoffice-master/instdir/program/libcairo.so.2 has unexpected RPATH  0x000000000000001d (RUNPATH)            Library runpath: [/home/timar/libreoffice-master/workdir/UnpackedTarball/pixman/pixman/.libs]
make[1]: *** [/home/timar/libreoffice-master/postprocess/CustomTarget_check_dynamic_objects.mk:22: /home/timar/libreoffice-master/workdir/CustomTarget/postprocess/check_dynamic_objects/check.done] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:282: build] Error 2
Comment 2 Michael Stahl (CIB) 2019-03-07 09:37:15 UTC
this is the problem:

/home/timar/libreoffice-master/instdir/program/libcairo.so.2 has unexpected RPATH  0x000000000000001d (RUNPATH)            Library runpath: [/home/timar/libreoffice-master/workdir/UnpackedTarball/pixman/pixman/.libs]

it should be [$ORIGIN] instead

various externals already coerce libtool with varying amounts of violence to fix the RPATH, seems it's missing for cairo.

the other warnings can be fixed by adding a whitelist for cairo.so to the check-elf-objects script.
Comment 3 Commit Notification 2019-09-05 08:28:38 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/bb9c07b82f4921941112de7e545af13a24b37f5d%5E%21

tdf#121983 cairo: fix RPATH to contain $ORIGIN, not libtool's nonsense

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2019-09-05 13:45:04 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/5008b491c1b44714bfd9a07ac6f711a24e726fb5%5E%21

tdf#121983 cairo: fix RPATH to contain $ORIGIN, not libtool's nonsense

It will be available in 6.3.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2019-09-05 16:46:43 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/4c16f79b30ff3e015c706e0563faf6cf2931e1a6%5E%21

tdf#121983 add whitelist for libcairo.so.2

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2019-09-05 21:58:11 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/online/+/becb72a6a978048afaaae51869502f6d11d45aae%5E%21

tdf#121983 is fixed, remove the hack here
Comment 7 Commit Notification 2019-09-06 15:17:09 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/89885b911fe342291e562f1c4293314b90ea8281%5E%21

tdf#121983 cairo: fix RPATH to contain $ORIGIN, not libtool's nonsense

It will be available in 6.2.8.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Michael Stahl (CIB) 2019-09-06 15:23:18 UTC
hope we can call this fixed now, havent tested it but it ought to work...