site  contact  subhomenews

LibreOffice 24.2.3.2 compiled for Scarthgap

June 06, 2024 — BarryK

Right now, I am running EasyOS Scarthgap-series. Almost all packages have compiled successfully in OpenEmbedded. See previous report:

https://bkhome.org/news/202405/openembeddedyocto-scarthgap-50-compile.html

Did another complete build since then, and bumped Chromium to 123.0.6312.122.

I stated "almost all packages". A notable exception is cannot compile LibreOffice in OE Scarthgap. So, I have compiled it in a running Easy Scarthgap. A bit of a saga. The compile takes several hours, and it was getting almost there, then failing.

Anyway, got there, with help from patches from Debian. See the link to 'libreoffice_24.2.3-2.debian.tar.xz' here:

https://packages.debian.org/sid/libreoffice

The patches I applied:

no-check-if-root.diff
debian-opt.diff
jurt-soffice-location.diff
split-evoab.diff
debian-debug.diff
build-against-shared-lpsolve.diff
install-fixes.diff
mention-java-common-package.diff
help-msg-add-package-info.diff
sensible-lomua.diff
reportdesign-mention-package.diff
jdbc-driver-classpaths.diff
make-package-modules-not-suck.diff
mediwiki-oor-replace.diff
disable-flaky-tests.diff
fix-internal-hsqldb-build.diff
javadoc-optional.diff
no-packagekit-per-default.diff
system-officeotron-and-odfvalidator.diff
cppunit-optional.diff
hide-math-desktop-file.patch
appstream-ignore-startcenter.diff
disable-java-in-odk-build-examples-on-zero-vm.diff
do-not-hide-test-output.diff
disableClassPathURLCheck.diff
use-mariadb-java-instead-of-mysql-java.diff
fix-flaky-bridgetest.diff
add-access2base-doc.diff
disable-shortcuts_tab_navigation-uitest.diff
no-opencl-per-default.diff
arm-fp-mode.diff
moreIconsDialog-accesses-internet.diff
do-not-abort-on-NON_APPLICATION_FONT_USE.diff
we-dont-have-the-needed-fonts.diff
adapt-for-new-carlito.diff
fix-system-abseil-build.diff
fix-riscv64-bridge.diff
pdfium-ports.diff
split-sdbc-firebird-mariadb.diff
use-PyConfig.diff
reviewed-breakIterator-customizations.diff
breakiterator-updates.diff
icu-74.1.diff

However, still got a failure, and I found the solution from this guy:

https://www.mail-archive.com/libreoffice-bugs@lists.freedesktop.org/msg1001833.html

So, I created a patch, 'writeperfect-zlib-fix.patch':

diff -Naur libreoffice-24.2.3.2ORIG/writerperfect/Library_wpftcalc.mk libreoffice-24.2.3.2/writerperfect/Library_wpftcalc.mk
--- libreoffice-24.2.3.2ORIG/writerperfect/Library_wpftcalc.mk 2024-04-30 02:46:10.000000000 +0800
+++ libreoffice-24.2.3.2/writerperfect/Library_wpftcalc.mk 2024-06-05 19:33:22.843247655 +0800
@@ -56,6 +56,7 @@
mwaw \
staroffice \
wps \
+ zlib \
lcms2 \
icu_headers \
icui18n \
diff -Naur libreoffice-24.2.3.2ORIG/writerperfect/Library_wpftdraw.mk libreoffice-24.2.3.2/writerperfect/Library_wpftdraw.mk
--- libreoffice-24.2.3.2ORIG/writerperfect/Library_wpftdraw.mk 2024-04-30 02:46:10.000000000 +0800
+++ libreoffice-24.2.3.2/writerperfect/Library_wpftdraw.mk 2024-06-05 19:34:38.363249806 +0800
@@ -60,6 +60,7 @@
visio \
wpg \
wpd \
+ zlib \
lcms2 \
libxml2 \
icu_headers \
diff -Naur libreoffice-24.2.3.2ORIG/writerperfect/Library_wpftimpress.mk libreoffice-24.2.3.2/writerperfect/Library_wpftimpress.mk
--- libreoffice-24.2.3.2ORIG/writerperfect/Library_wpftimpress.mk 2024-04-30 02:46:10.000000000 +0800
+++ libreoffice-24.2.3.2/writerperfect/Library_wpftimpress.mk 2024-06-05 19:35:21.156584393 +0800
@@ -50,6 +50,7 @@
odfgen \
staroffice \
revenge \
+ zlib \
))

$(eval $(call gb_Library_add_exception_objects,wpftimpress,\

Success!!!

Expanded the source tarball, created 'tarballs' folder and placed 'libreoffice-translations-24.2.3.2.tar.xz' into it. Sources available here:

https://downloadarchive.documentfoundation.org/libreoffice/old/24.2.3.2/src/

I have a script, 'build.sh':

#!/bin/sh

if [ -d libreoffice-24.2.3.2 ];then
rm -rf libreoffice-24.2.3.2
fi
tar -xf libreoffice-24.2.3.2.tar.xz
sync

cd libreoffice-24.2.3.2
echo -n '' > ../errors.log
for aP in `grep -v '^#' ../patches/series | tr '\n' ' '`
do
[ ! -f ../patches/${aP} ] && continue
patch -p1 < ../patches/${aP}
if [ $? -ne 0 ];then
echo "$aP" >> ../errors.log
fi
done

ln -s ../../tarballs external/tarballs
ln -sv src/libreoffice-translations-24.2.3.2/translations/

#from oe...
S='.'
sed -i -e 's%^check-if-root:%check-if-rootXXX:%' ${S}/Makefile.in
echo -e '\n\ncheck-if-root:\n\n' >> ${S}/Makefile.in
export LO_PREFIX=/usr

./configure --without-fonts --without-krb5 --build=x86_64-pc-linux-gnu --prefix=/usr --exec_prefix=/usr \
--bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc \
--sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include
--oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --without-doxygen \
--enable-release-build --with-parallelism=3 --without-java --disable-coinmp --with-tls=nss --without-galleries \
--disable-gstreamer-1-0 --disable-avahi --disable-odk --disable-postgresql-sdbc --with-system-libs \
--without-system-clucene --without-system-xmlsec --without-system-libepubgen --without-system-libqxp \
--without-system-libzmf --without-system-libstaroffice --without-system-odbc --without-system-orcus \
--without-system-libnumbertext --without-system-mariadb --without-system-firebird --without-system-qrcodegen \
--without-system-altlinuxhyph --with-lang=ALL --with-theme=colibre --disable-scripting-javascript \
--disable-scripting-beanshell --disable-lotuswordpro --disable-ccache --enable-cups --disable-vlc \
--disable-qt5 --disable-sdremote --disable-dbus --enable-python=no --disable-debug --disable-evolution2 \
--enable-pdfimport --enable-lpsolve --disable-report-builder --enable-firebird-sdbc --without-system-box2d \
--with-boost-date-time=boost_date_time --with-boost-filesystem=boost_filesystem --with-boost-locale=boost_locale \
--with-boost-iostreams=boost_iostreams --with-boost-system=boost_system --with-external-dict-dir=/usr/share/hunspell \
--enable-gtk3 --with-vendor=EASYOS --without-junit --disable-dconf --without-system-mdds --without-system-dragonbox \
--without-system-frozen --without-system-libfixmath --without-system-zxing --without-system-zxcvbn \
--without-system-abseil

#oe dunfell and kirstone need this hack...
B='.'
mkdir -p ${S}/icon-themes/export
mkdir -p ${B}/workdir/CustomTarget/postprocess/images
touch ${B}/workdir/CustomTarget/postprocess/images/colibre_links.txt.tmp
touch ${B}/workdir/CustomTarget/postprocess/images/export_links.txt.tmp

sync
echo -n 'Press ENTER to compile: '
read goone
make build

...don't think that hack needed anymore.

I have created a PET and it will be in the release of EasyOS Scarthgap-series.     

Tags: easy