Void-packages: Libreoffice fails to build on aarch64 (pinebook pro)

Created on 29 Feb 2020  路  19Comments  路  Source: void-linux/void-packages

System

  • xuname:

    • Void 5.5.0_1 aarch64 Unknown notuptodate rFFF

  • package:

    • libreoffice version=6.4.0.3

Expected behavior

running ./xbps-src pkg libreoffice on an aarch64 computer compiles libreoffice.

Actual behavior

=> vlc-3.0.8_8: removing autodeps, please wait...
=> vlc-3.0.8_8: cleaning build directory...
=> vlc: removing files from destdir...
=> libvlc: removing files from destdir...
=> vlc-devel: removing files from destdir...
=> libreoffice-6.4.0.3_1: installing host dependencies: automake-1.16.1_3 flex-2.6.4_3 gperf-3.1_2 hyphen-2.8.8_2 icu-64.2_2 libtool-2.4.6_4 openldap-2.4.49_1 which-2.21_3 gettext-0.20.1_2 xz-5.2.4_2 perl-Archive-Zip-1.67_1 pkg-config-0.29.2_2 qt5-qmake-5.13.2_2 sane-1.0.29_1 ucpp-1.3.2_1 unzip-6.0_13 wget-1.20.3_2 zip-3.0_6 python3-setuptools-41.2.0_3 git-2.25.1_1 ...
=> libreoffice-6.4.0.3_1: installing target dependencies: CoinMP-devel-1.8.4_1 apr-devel-1.7.0_3 avahi-libs-devel-0.7_9 clucene-devel-2.3.3.4_7 frameworkintegration-devel-5.67.0_1 glyphy-devel-0.0.20190307_1 gpgmepp-devel-1.13.1_2 gst-plugins-base1-devel-1.16.2_1 gtk+-devel-2.24.32_3 hunspell-devel-1.7.0_2 hyphen-devel-2.8.8_2 libXt-devel-1.2.0_1 libabw-devel-0.1.3_1 libatomic_ops-devel-7.6.10_1 libcdr-devel-0.1.5_2 libcmis-devel-0.5.2_4 libe-book-devel-0.1.3_6 libepubgen-devel-0.1.1_2 libetonyek-devel-0.1.9_3 libexttextcat-devel-3.4.5_2 libfbclient3-devel-3.0.4.33054_3 libfreehand-devel-0.1.2_2 libgcrypt-devel-1.8.5_1 libgltf-devel-0.1.0_2 libldap-devel-2.4.49_1 libmariadbclient-devel-10.1.30_7 libmspub-devel-0.1.4_5 libmwaw-devel-0.3.15_1 libnumbertext-devel-1.0.5_1 libodfgen-devel-0.1.7_2 liborcus-devel-0.15.3_1 libpagemaker-devel-0.0.4_2 libqxp-devel-0.0.2_3 librsvg-devel-2.47.1_1 libvisio-devel-0.1.7_1 libwpg-devel-0.3.3_1 libwps-devel-0.4.10_1 lpsolve-devel-5.5.2.5_2 mdds-1.5.0_2 mythes-devel-1.2.4_4 neon-devel-0.30.2_10 nss-devel-3.50_1 python3-devel-3.8.1_1 qt5-devel-5.13.2_2 redland-devel-1.0.17_4 sane-devel-1.0.29_1 telepathy-glib-devel-0.24.1_4 unixodbc-devel-2.3.7_2 vigra-devel-1.11.1_5 libcppunit-devel-1.14.0_2 qrcodegen-devel-1.5.0_2 xmlsec1-devel-1.2.29_1 gtk+3-devel-3.24.13_1 libbluetooth-devel-5.52_1 postgresql-libs-devel-9.6.17_1 vlc-devel-3.0.8_8 ...
=> libreoffice-6.4.0.3_1: removing autodeps, please wait...
=> ERROR: libreoffice-6.4.0.3_1: failed to install 'CoinMP-devel-1.8.4_1' dependency! (error 8)
libavcodec-4.2.2_1: broken, unresolvable shlib `libx265.so.179'
Transaction aborted due to unresolved shlibs.
=> ERROR: Please see above for the real error, exiting...

Steps to reproduce the behavior

Try to compile libreoffice on an aarch64 computer. The libreoffice package doesnt support cross compilation.

bug

Most helpful comment

Can you check dmesg? You were probably OOM killed. You should try building with less jobs.

All 19 comments

You should update your system. The packages ffmpeg and thus libavcodec ar at version/revision 4.2.2_2 and the archive is there. I manually inspected aarch64-repodata and it actually has ffmpeg-4.2.2_2 in its index.plist.

@pullmoll thanks. Now I get an error like:

/usr/bin/ccache cc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv8-a -g -I/usr/aarch64-linux-gnu/usr/include -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2
-pipe -march=armv8-a -g -I/usr/aarch64-linux-gnu/usr/include -fstack-clash-protection -D_FORTIFY_SOURCE=2 -march=armv8-a
-O2 -pipe -fPIC -DCYTHON_CLINE_IN_TRACEBACK=1 -I/usr/aarch64-linux-gnu/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/usr/include/python3.8 -c src/lxml/etree.c -o build/temp.linux-aarch64-3.8/src/lxml/etree.o -w
In file included from src/lxml/etree.c:619:
src/lxml/includes/etree_defs.h:14:10: fatal error: libxml/xmlversion.h: No such file or directory
   14 | #include "libxml/xmlversion.h"
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compile failed: command '/usr/bin/ccache' failed with exit status 1
creating tmp
cc -I/usr/aarch64-linux-gnu/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInit4v92yw1b.c -o tmp/xmlXPathInit4v92yw1b.o
cc tmp/xmlXPathInit4v92yw1b.o -L/usr/aarch64-linux-gnu/usr/lib -lxml2 -o a.out
error: command '/usr/bin/ccache' failed with exit status 1
make[1]: *** [/builddir/libreoffice-6.4.1.2/external/lxml/ExternalProject_lxml.mk:25: /builddir/libreoffice-6.4.1.2/workdir/ExternalProject/lxml/build] Error 1
make: *** [Makefile:282: build] Error 2
=> ERROR: libreoffice-6.4.1.2_1: do_build: 'make ${makejobs} ${make_build_args}' exited with 2
=> ERROR:   in do_build() at srcpkgs/libreoffice/template:520

I even tried adding libxml2-devel package to makedepends in the libreoffice template.

-I/usr/aarch64-linux-gnu/usr/include looks incorrect to me.

This is a native build, it should be -I/usr/include instead.

@sgn Indeed. @anjandev Can you grep -r /usr/aarch64 /usr/lib/pkgconfig to see if any packages have cross build flags erroneously leaking into pkconfig files?

grep -r /usr/aarch64 /usr/lib/pkgconfig returns nothing.

Did you run this command inside chroot?

On 19 March 2020 04:26:18 GMT+07:00, Anjan Momi notifications@github.com wrote:

grep -r /usr/aarch64 /usr/lib/pkgconfig returns nothing.

--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/void-linux/void-packages/issues/19642#issuecomment-600866998

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

@sgn running inside a chroot also returns nothing.

It's postgresql.

$ /usr/bin/pg_config --cppflags
-D_GNU_SOURCE -I/usr/aarch64-linux-gnu/usr/include/libxml2

@sgn thank you for investigating. I will rebuild on my pinebook pro and let you know if this issue has been fixed.

Does the updated postgresql fix this issue?

I don't have any strong enough arm64 device to build libre office.

I merely found about postgresql when cross-compile other package.

@sgn
I got the following error:

libreoffice__do_build.log
mkdir -p /builddir/libreoffice-6.4.1.2/instdir
/builddir/libreoffice-6.4.1.2/solenv/bin/install-gdb-printers -a /builddir/libreoffice-6.4.1.2/instdir -c
make -j 1  -rs -f /builddir/libreoffice-6.4.1.2/Makefile.gbuild  build
Building lxml version 4.1.1.
Building without Cython.
Using build configuration of libxslt 1.1.34
Building against libxml2/libxslt in the following directory: /usr/aarch64-linux-gnu/usr/lib
running build
running build_py
copying src/lxml/includes/lxml-version.h -> build/lib.linux-aarch64-3.8/lxml/includes
running build_ext
building 'lxml.etree' extension
/usr/bin/ccache cc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv8-a -g -I/usr/aarch64-linux-gnu/usr/include -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv8-a -g -I/usr/aarch64-linux-gnu/usr/include -fstack-clash-protection -D_FORTIFY_SOURCE=2 -march=armv8-a -O2 -pipe -fPIC -DCYTHON_CLINE_IN_TRACEBACK=1 -I/usr/aarch64-linux-gnu/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/usr/include/python3.8 -c src/lxml/etree.c -o build/temp.linux-aarch64-3.8/src/lxml/etree.o -w
In file included from src/lxml/etree.c:619:
src/lxml/includes/etree_defs.h:14:10: fatal error: libxml/xmlversion.h: No such file or directory
   14 | #include "libxml/xmlversion.h"
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compile failed: command '/usr/bin/ccache' failed with exit status 1
cc -I/usr/aarch64-linux-gnu/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitpysnh1sy.c -o tmp/xmlXPathInitpysnh1sy.o
cc tmp/xmlXPathInitpysnh1sy.o -L/usr/aarch64-linux-gnu/usr/lib -lxml2 -o a.out
error: command '/usr/bin/ccache' failed with exit status 1
make[1]: *** [/builddir/libreoffice-6.4.1.2/external/lxml/ExternalProject_lxml.mk:25: /builddir/libreoffice-6.4.1.2/workdir/ExternalProject/lxml/build] Error 1
make: *** [Makefile:282: build] Error 2
=> ERROR: libreoffice-6.4.1.2_1: do_build: 'make ${makejobs} ${make_build_args}' exited with 2
=> ERROR:   in do_build() at srcpkgs/libreoffice/template:520

I added libxml2-devel to try to fix this but it still returned the error above.

FWIW I ordered a Pinebook Pro laptop in march and expect to receive it in the not too far future. I hope I can then take care of issues with building Void packages on aarch64.

I'm working on cross-compiling LibreOffice, firebird is heavily patched,
working on LibreOffice itself now.
https://github.com/sgn/void-packages/tree/firebird3-cross-compile

Building on RPi3 and QEMU is too slow for me.

pkg_cv_LIBEXSLT_LIBS='-L/usr/aarch64-linux-musl/usr/lib -lexslt -lxslt -lxml2'
pkg_cv_LIBXSLT_LIBS='-L/usr/aarch64-linux-musl/usr/lib -lxslt -lxml2'
pkg_cv_XMLSEC_LIBS='-L/usr/aarch64-linux-musl/usr/lib -lxmlsec1-nss -lxmlsec1 -lltdl -lxslt -lxml2 -lplds4 -lplc4 -lnspr4 -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4'

But this is about LDFLAGS not CFLAGS :/

@anjandev Please try to build again. I'm building in QEMU now,
depsite it's very slow, it's very positive.

I do not run void on my pinebook pro anymore because I needed libreoffice.
Someone else will have to confirm that this bug has gone away.

Thanks for your work

This doesn't appear to be resolved yet with version=7.0.1.2

[build CXX] vcl/unx/gtk3/gtk3gtkdata.cxx
[build CXX] vcl/unx/gtk3/gtk3gtkinst.cxx
[build CXX] vcl/unx/gtk3/gtk3gtksys.cxx
[build CXX] vcl/unx/gtk3/cairo_gtk3_cairo.cxx
[build CXX] vcl/unx/gtk3/gtk3gtkprintwrapper.cxx
[build CXX] vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
[build CXX] vcl/unx/gtk3/gtk3salprn-gtk.cxx
[build CXX] vcl/unx/gtk3/gtk3gtkframe.cxx
[build CXX] vcl/unx/gtk3/gtk3gtkobject.cxx
[build CXX] vcl/unx/gtk3/gtk3gtksalmenu.cxx
[build CXX] vcl/unx/gtk3/gtk3glomenu.cxx
[build CXX] vcl/unx/gtk3/gtk3gloactiongroup.cxx
[build CXX] vcl/unx/gtk3/gtk3hudawareness.cxx
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[1]: *** [/builddir/libreoffice-7.0.1.2/solenv/gbuild/LinkTarget.mk:301: /builddir/libreoffice-7.0.1.2/workdir/CxxObject/vcl/unx/gtk3/gtk3gtkinst.o] Error 1
make[1]: *** Deleting file '/builddir/libreoffice-7.0.1.2/workdir/CxxObject/vcl/unx/gtk3/gtk3gtkinst.o'
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:282: build] Error 2
=> ERROR: libreoffice-7.0.1.2_1: do_build: 'make ${makejobs} ${make_build_args}' exited with 2
=> ERROR:   in do_build() at srcpkgs/libreoffice/template:523

Maybe someone can help me make sense of this error. I'd like to think the compilation was mostly completed. Took about 2 hours to get to this stage compiling on RK3399/Pinebook Pro.

Can you check dmesg? You were probably OOM killed. You should try building with less jobs.

Indeed, 6 makejobs turned out to be too many and the process was reaped by the OOM killer.

After ~12 hours(!) compilation using 3 makejobs, LibreOffice was successfully built & packaged.

https://branon.me/share/ZGNjZTI.png

Haven't tested extensively yet, but Writer and Draw both launch and are able to save documents. I think we're good to go! Many thanks.

Was this page helpful?
0 / 5 - 0 ratings