[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - 2 commits - solenv/flatpak-manifest.in

Stephan Bergmann sbergman at redhat.com
Fri Feb 9 18:42:59 UTC 2018


 solenv/flatpak-manifest.in |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 4ee2dec9b4d9db2fa2678eeb965c5f52a8ceb616
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 9 12:01:53 2018 +0100

    solenv/flatpak-manifest.in: Merge in building with GCC 7
    
    This merges in
    
    * <https://github.com/flathub/org.libreoffice.LibreOffice/commit/
    d1ca6fbdac7f0adcfd813ac5556d6ad979924232> "switch to gcc7",
    
    * <https://github.com/flathub/org.libreoffice.LibreOffice/commit/
    687e79514c12bb8c6fd7dfd93f1e4fb84fc6af54> "Copy
    org.freedesktop.Sdk.Extension.gcc7 libs into app", and
    
    * <https://github.com/flathub/org.libreoffice.LibreOffice/commit/
    41b361bf4973b0981f834fe58b3f808b0ca81634> "Use `cp -d` to preserve symlinks",
    
    which should allow to build on 32-bit arm once
    <https://github.com/flathub/org.freedesktop.Sdk.Extension.openjdk9/issues/4>
    "ARM version" is fixed.
    
    Those had been reverted again on flathub with <https://github.com/flathub/
    org.libreoffice.LibreOffice/commit/1168072d19f358ffacc783aa83773789c6eafb99>
    "Revert 'Gcc7' again, for now" because it had apeared back then that using GCC 7
    caused the build to fail on aarch64.  This has meanwhile been tracked down to
    be an issue with PDFium instead, see ffc134445ef7e935d18d816626f64e65b4cdbca6
    "--disable-pdfium for Linux aarch64 Flatpak build".
    
    Change-Id: I594d38ecfdf7dbd78b91af04b9f3f3e86987b8e5
    (cherry picked from commit f3062fd2e39819bcb1e8bbb76355cc50d7257652)
    Reviewed-on: https://gerrit.libreoffice.org/49515
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 6619c04fde72..baff33ec3811 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -4,12 +4,28 @@
     "runtime-version": "3.24",
     "sdk": "org.gnome.Sdk",
     "sdk-extensions": [
+        "org.freedesktop.Sdk.Extension.gcc7",
         "org.freedesktop.Sdk.Extension.openjdk9"
     ],
+    "build-options": {
+        "env": {
+            "CC": "/usr/lib/sdk/gcc7/bin/gcc",
+            "CXX": "/usr/lib/sdk/gcc7/bin/g++",
+            "LD_LIBRARY_PATH": "/usr/lib/sdk/gcc7/lib"
+        }
+    },
     "command": "/app/libreoffice/program/soffice",
     "separate-locales": false,
     "modules": [
         {
+            "name": "gcc7",
+            "buildsystem": "simple",
+            "build-commands": [
+                "mkdir -p /app/lib",
+                "cp -d /usr/lib/sdk/gcc7/lib/lib{gcc_s.so.1,stdc++.so.6*} /app/lib"
+            ]
+        },
+        {
             "name": "openjdk",
             "buildsystem": "simple",
             "build-commands": [
commit 5990b071d1d1bb8a8bd0b0f902c8b6c1ca991361
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 9 11:26:43 2018 +0100

    --disable-pdfium for Linux aarch64 Flatpak build
    
    At least current PDFium master <https://pdfium.googlesource.com/pdfium/+/
    026717cb667cf0c7215cf55daf794d69752fc900/third_party/base/allocator/
    partition_allocator/page_allocator.h#33> still hard-codes the assumption that
    "All Blink-supported systems have 4096 sized system pages".  On Linux aarch64
    machines with 64K page size (as reported by `getconf PAGE_SIZE`, e.g., on
    Flathub worker <https://flathub.org/builds/#/workers/18> "gnome-aarch64-1"),
    that causes LO's CppunitTest_svtools_graphic to fail with SIGABRT, when
    pdfium::base::SetSystemPagesInaccessible (workdir/UnpackedTarball/pdfium/
    third_party/base/allocator/partition_allocator/page_allocator.cpp) causes an
    mprotect to fail in a pattern like
    
    > mmap(0x1051200000, 2097152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x1051200000
    > mprotect(0x1051200000, 4096, PROT_NONE) = 0
    > mprotect(0x1051202000, 8192, PROT_NONE) = -1 EINVAL (Invalid argument)
    
    The loss of functionality caused by --disable-pdfium is assumed to be acceptable
    ("used for insert->image and selecting a pdf I believe", according to caolan on
    IRC), and e.g. Fedora disables it for all arches since
    <https://src.fedoraproject.org/rpms/libreoffice/c/
    1f6713e951de6aa9af43a9bd92ed011edf0c6fe9> "update to 5.4.0 alpha1".
    
    Change-Id: I39385c332ddd6a2a3a221f0d0577181709944313
    (cherry picked from commit ffc134445ef7e935d18d816626f64e65b4cdbca6)
    Reviewed-on: https://gerrit.libreoffice.org/49514
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 3edd0b09f216..6619c04fde72 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -532,7 +532,7 @@
             ],
             "buildsystem": "simple",
             "build-commands": [
-                "./autogen.sh --prefix=/run/build/libreoffice/inst --with-distro=LibreOfficeFlatpak --disable-symbols",
+                "./autogen.sh --prefix=/run/build/libreoffice/inst --with-distro=LibreOfficeFlatpak --disable-symbols $(if test \"$(uname -m)\" = aarch64; then printf %s --disable-pdfium; fi)",
                 "make",
                 "make distro-pack-install",
                 "make cmd cmd='$(SRCDIR)/solenv/bin/assemble-flatpak.sh'"


More information about the Libreoffice-commits mailing list