libreoffice (alienbob) customizing tool menu crashes
by aikempshall from LinuxQuestions.org on (#4XX5A)
The problem I'm getting is that when I run the prepackaged Alien Bob version of libreoffice (6.3.4) and follow the menu option -
Tools -> Customize -> Toolbars (tab)
then in the "Category" drop down menu I choose the option "Macros"
LibreOffice then presents the "Document Recovery" message box and crashes out.
I've also found
that if I compile libreoffice myself using Alien Bob's SlackBuild
It compiles successfully
After installing the packages I get the same crash when I run calc using Kickoff Application Launcher -> Office -> Calc
I also get the same crash when I run calc from the command line
Code:/usr/lib64/libreoffice/program/soffice --calc I DO NOT get the crash when I run Alien Bob's pre-packaged calc from the command line:
Code:/tmp/build/tmp-libreoffice/libreoffice-6.3.0.4/instdir/program/soffice --calc But I do get the crash when I run Alien Bob's pre-packaged calc from the command line
Code:/tmp/build/package-libreoffice/usr/lib64/libreoffice/program/soffice --calc
I therefor surmised that the problem is being caused by some condition in the packaging not in the compiling.
On the above basis I bisected the slackbuild and found, still early days yet, that If I hash out the following code in the libreoffice.SlackBuild, compile then install the packages I don't get the problem.
Code:# If we have any dictionaries in the $INSTDIR (this variable is set already
# by the build process), now is the time to copy them into the package:
echo "Starting split-off of dictionaries from main $PRGNAM package..."
DICTS="$(find $INSTDIR/share/extensions -name "dict-*" -type d -maxdepth 1 -mindepth 1 |rev |cut -d/ -f1 |rev |cut -d- -f2-)"
echo "Found the following dictionaries in $INSTDIR: $(echo $DICTS)"
for DICTLANG in $(cat $SRCDIR/languages.dict |grep -v "^ *#" |cut -d= -f1) ; do
DICTLANGDESC="$(grep ^${DICTLANG}= $SRCDIR/languages.dict |cut -f2 -d=)"
if [ -d $INSTDIR/share/extensions/dict-${DICTLANG} ]; then
mkdir -p $TMP/package-${PRGNAM}-dict-${DICTLANG}/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/share/extensions
cp -a $INSTDIR/share/extensions/dict-${DICTLANG} \
$TMP/package-${PRGNAM}-dict-${DICTLANG}/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/share/extensions/
chown -R root:root $TMP/package-${PRGNAM}-dict-${DICTLANG}/usr/lib${LIBDIRSUFFIX}/$PRGNAM/share/extensions
mkdir -p $TMP/package-${PRGNAM}-dict-${DICTLANG}/install
cat $SRCDIR/slack-desc.dict \
| sed -e "s/@LANG@/$DICTLANG/g" -e "s/@LANGDESC@/$DICTLANGDESC/g" > \
$TMP/package-${PRGNAM}-dict-${DICTLANG}/install/slack-desc
cd $TMP/package-${PRGNAM}-dict-${DICTLANG}
/sbin/makepkg -p -l y -c n $OUTPUT/${PRGNAM}-dict-${DICTLANG}-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}
cd -
cd $OUTPUT
md5sum ${PRGNAM}-dict-${DICTLANG}-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-dict-$DICTLANG-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5
cd -
cat $TMP/package-${PRGNAM}-dict-${DICTLANG}/install/slack-desc | grep "^${PRGNAM}-dict-$DICTLANG" > $OUTPUT/${PRGNAM}-dict-$DICTLANG-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.txt
else
echo "ERROR: could not find dictionary '$DICTLANG' for packageing..."
fi
done
# Remove the remaining ones, we do not package them:
rm -rf $INSTDIR/share/extensions/dict-*
# Create aliases for locales that have matching languages in LibreOffice.
# This enables people with these locales to use the autocorrect function:
# (code taken from Fedora's libreoffice.spec)
cd $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/share/autocorr
en_GB_aliases="en-AG en-AU en-BS en-BW en-BZ en-CA en-DK en-GH en-HK en-IE en-IN en-JM en-NG en-NZ en-SG en-TT"
for lang in $en_GB_aliases; do
ln -sf acor_en-GB.dat acor_$lang.dat
done
en_US_aliases="en-PH"
for lang in $en_US_aliases; do
ln -sf acor_en-US.dat acor_$lang.dat
done
# en-ZA exists and has a good autocorrect file with two or three extras
# that make sense for neighbouring english speaking territories
en_ZA_aliases="en-NA en-ZW"
for lang in $en_ZA_aliases; do
ln -sf acor_en-ZA.dat acor_$lang.dat
done
if [ ! -z "$ADD_LANGUAGES" ]; then
af_ZA_aliases="af-NA"
for lang in $af_ZA_aliases; do
ln -sf acor_af-ZA.dat acor_$lang.dat
done
de_DE_aliases="de-AT de-BE de-CH de-LI de-LU"
for lang in $de_DE_aliases; do
ln -sf acor_de-DE.dat acor_$lang.dat
done
es_ES_aliases="es-AR es-BO es-CL es-CO es-CR es-CU es-DO es-EC es-GT es-HN es-MX es-NI es-PA es-PE es-PR es-PY es-SV es-US es-UY es-VE"
for lang in $es_ES_aliases; do
ln -sf acor_es-ES.dat acor_$lang.dat
done
fr_FR_aliases="fr-BE fr-CA fr-CH fr-LU fr-MC"
for lang in $fr_FR_aliases; do
ln -sf acor_fr-FR.dat acor_$lang.dat
done
it_IT_aliases="it-CH"
for lang in $it_IT_aliases; do
ln -sf acor_it-IT.dat acor_$lang.dat
done
nl_BE_aliases="nl-AW"
for lang in $nl_BE_aliases; do
ln -sf acor_nl-BE.dat acor_$lang.dat
done
sv_SE_aliases="sv-FI"
for lang in $sv_SE_aliases; do
ln -sf acor_sv-SE.dat acor_$lang.dat
done
[ -f acor_lt_LT.dat ] && mv acor_lt_LT.dat acor_lt-LT.dat
else
rm -f acor_[a-df-z]*.dat acor_e[su]*.dat
fi
cd -
# Split out language packs if we have built additional languages:
if [ ! -z "${ADD_LANGUAGES}" ]; then
cd $PKG
for lang in $(echo ${ADD_LANGUAGES} |sed -e "s/${DEF_LANG} *//") ; do
langdesc="$(grep ^${lang}= $SRCDIR/languages |cut -f2 -d=)"
lolang=$(echo $lang | tr _ -)
echo "Splitting out '$lang' ($langdesc) - looking for '$lolang'..."
rm -rf ${PKG}-l10n-$lang
mkdir -p ${PKG}-l10n-$lang
tar cf - --remove-files \
$(find . -depth -name "README*$lolang*" \
-o -name "LICENSE*${lolang}*" \
-o -name "description_${lolang}.txt" \
-o -type d -name "${lolang}" \
-o -path "*/autocorr/*" -name "*${lolang}.dat" \
-o -path "*/resource/*" -name "*${lolang}.res" \
-o -path "*/registry/*" -name "*_${lolang}.xcd" \
-o -path "*/registry/*" -name "*-${lolang}.xcd" \
-o -name "Lang_*${lolang}.xba" \
-o -name "Langpack-${lolang}.xcu" \
-o -name "*${lolang}.oxt") \
| ( cd ${PKG}-l10n-$lang ; tar xf - )
# Create slack-desc and doinst.sh :
mkdir -p ${PKG}-l10n-$lang/install
cat $SRCDIR/slack-desc.l10n \
| sed -e "s/@LANG@/$lang/g" -e "s/@LANGDESC@/$langdesc/g" > \
${PKG}-l10n-$lang/install/slack-desc
# Install per-language dictionary:
cat $SRCDIR/doinst.sh.l10n \
| sed -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \
-e "s/@LANG@/${lolang}/g" -e "s/@PRGNAM@/$PRGNAM/" \
> ${PKG}-l10n-$lang/install/doinst.sh
cd ${PKG}-l10n-$lang
/sbin/makepkg -p -l y -c n $OUTPUT/${PRGNAM}-l10n-${lang}-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}
cd -
cd $OUTPUT
md5sum ${PRGNAM}-l10n-${lang}-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-l10n-$lang-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5
cd -
cat $PKG-l10n-$lang/install/slack-desc | grep "^${PRGNAM}-l10n-$lang" > $OUTPUT/${PRGNAM}-l10n-$lang-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.txt
done
fi # End of splitting out language packs
It seems really bizarre that dropping the above code should stop the crash that I going to to dwell on it for a bit. Decided to post here just in case anyone had an eureka moment and be able to explain what's going on.
I will post again when I find anything else. All comments, as to what may be happening, will be gratefully received. Also any pointers on what I can do next will be welcome.
Will be a slow process as a clean install with no ccache takes about 3 hours.


Tools -> Customize -> Toolbars (tab)
then in the "Category" drop down menu I choose the option "Macros"
LibreOffice then presents the "Document Recovery" message box and crashes out.
I've also found
that if I compile libreoffice myself using Alien Bob's SlackBuild
It compiles successfully
After installing the packages I get the same crash when I run calc using Kickoff Application Launcher -> Office -> Calc
I also get the same crash when I run calc from the command line
Code:/usr/lib64/libreoffice/program/soffice --calc I DO NOT get the crash when I run Alien Bob's pre-packaged calc from the command line:
Code:/tmp/build/tmp-libreoffice/libreoffice-6.3.0.4/instdir/program/soffice --calc But I do get the crash when I run Alien Bob's pre-packaged calc from the command line
Code:/tmp/build/package-libreoffice/usr/lib64/libreoffice/program/soffice --calc
I therefor surmised that the problem is being caused by some condition in the packaging not in the compiling.
On the above basis I bisected the slackbuild and found, still early days yet, that If I hash out the following code in the libreoffice.SlackBuild, compile then install the packages I don't get the problem.
Code:# If we have any dictionaries in the $INSTDIR (this variable is set already
# by the build process), now is the time to copy them into the package:
echo "Starting split-off of dictionaries from main $PRGNAM package..."
DICTS="$(find $INSTDIR/share/extensions -name "dict-*" -type d -maxdepth 1 -mindepth 1 |rev |cut -d/ -f1 |rev |cut -d- -f2-)"
echo "Found the following dictionaries in $INSTDIR: $(echo $DICTS)"
for DICTLANG in $(cat $SRCDIR/languages.dict |grep -v "^ *#" |cut -d= -f1) ; do
DICTLANGDESC="$(grep ^${DICTLANG}= $SRCDIR/languages.dict |cut -f2 -d=)"
if [ -d $INSTDIR/share/extensions/dict-${DICTLANG} ]; then
mkdir -p $TMP/package-${PRGNAM}-dict-${DICTLANG}/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/share/extensions
cp -a $INSTDIR/share/extensions/dict-${DICTLANG} \
$TMP/package-${PRGNAM}-dict-${DICTLANG}/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/share/extensions/
chown -R root:root $TMP/package-${PRGNAM}-dict-${DICTLANG}/usr/lib${LIBDIRSUFFIX}/$PRGNAM/share/extensions
mkdir -p $TMP/package-${PRGNAM}-dict-${DICTLANG}/install
cat $SRCDIR/slack-desc.dict \
| sed -e "s/@LANG@/$DICTLANG/g" -e "s/@LANGDESC@/$DICTLANGDESC/g" > \
$TMP/package-${PRGNAM}-dict-${DICTLANG}/install/slack-desc
cd $TMP/package-${PRGNAM}-dict-${DICTLANG}
/sbin/makepkg -p -l y -c n $OUTPUT/${PRGNAM}-dict-${DICTLANG}-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}
cd -
cd $OUTPUT
md5sum ${PRGNAM}-dict-${DICTLANG}-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-dict-$DICTLANG-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5
cd -
cat $TMP/package-${PRGNAM}-dict-${DICTLANG}/install/slack-desc | grep "^${PRGNAM}-dict-$DICTLANG" > $OUTPUT/${PRGNAM}-dict-$DICTLANG-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.txt
else
echo "ERROR: could not find dictionary '$DICTLANG' for packageing..."
fi
done
# Remove the remaining ones, we do not package them:
rm -rf $INSTDIR/share/extensions/dict-*
# Create aliases for locales that have matching languages in LibreOffice.
# This enables people with these locales to use the autocorrect function:
# (code taken from Fedora's libreoffice.spec)
cd $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/share/autocorr
en_GB_aliases="en-AG en-AU en-BS en-BW en-BZ en-CA en-DK en-GH en-HK en-IE en-IN en-JM en-NG en-NZ en-SG en-TT"
for lang in $en_GB_aliases; do
ln -sf acor_en-GB.dat acor_$lang.dat
done
en_US_aliases="en-PH"
for lang in $en_US_aliases; do
ln -sf acor_en-US.dat acor_$lang.dat
done
# en-ZA exists and has a good autocorrect file with two or three extras
# that make sense for neighbouring english speaking territories
en_ZA_aliases="en-NA en-ZW"
for lang in $en_ZA_aliases; do
ln -sf acor_en-ZA.dat acor_$lang.dat
done
if [ ! -z "$ADD_LANGUAGES" ]; then
af_ZA_aliases="af-NA"
for lang in $af_ZA_aliases; do
ln -sf acor_af-ZA.dat acor_$lang.dat
done
de_DE_aliases="de-AT de-BE de-CH de-LI de-LU"
for lang in $de_DE_aliases; do
ln -sf acor_de-DE.dat acor_$lang.dat
done
es_ES_aliases="es-AR es-BO es-CL es-CO es-CR es-CU es-DO es-EC es-GT es-HN es-MX es-NI es-PA es-PE es-PR es-PY es-SV es-US es-UY es-VE"
for lang in $es_ES_aliases; do
ln -sf acor_es-ES.dat acor_$lang.dat
done
fr_FR_aliases="fr-BE fr-CA fr-CH fr-LU fr-MC"
for lang in $fr_FR_aliases; do
ln -sf acor_fr-FR.dat acor_$lang.dat
done
it_IT_aliases="it-CH"
for lang in $it_IT_aliases; do
ln -sf acor_it-IT.dat acor_$lang.dat
done
nl_BE_aliases="nl-AW"
for lang in $nl_BE_aliases; do
ln -sf acor_nl-BE.dat acor_$lang.dat
done
sv_SE_aliases="sv-FI"
for lang in $sv_SE_aliases; do
ln -sf acor_sv-SE.dat acor_$lang.dat
done
[ -f acor_lt_LT.dat ] && mv acor_lt_LT.dat acor_lt-LT.dat
else
rm -f acor_[a-df-z]*.dat acor_e[su]*.dat
fi
cd -
# Split out language packs if we have built additional languages:
if [ ! -z "${ADD_LANGUAGES}" ]; then
cd $PKG
for lang in $(echo ${ADD_LANGUAGES} |sed -e "s/${DEF_LANG} *//") ; do
langdesc="$(grep ^${lang}= $SRCDIR/languages |cut -f2 -d=)"
lolang=$(echo $lang | tr _ -)
echo "Splitting out '$lang' ($langdesc) - looking for '$lolang'..."
rm -rf ${PKG}-l10n-$lang
mkdir -p ${PKG}-l10n-$lang
tar cf - --remove-files \
$(find . -depth -name "README*$lolang*" \
-o -name "LICENSE*${lolang}*" \
-o -name "description_${lolang}.txt" \
-o -type d -name "${lolang}" \
-o -path "*/autocorr/*" -name "*${lolang}.dat" \
-o -path "*/resource/*" -name "*${lolang}.res" \
-o -path "*/registry/*" -name "*_${lolang}.xcd" \
-o -path "*/registry/*" -name "*-${lolang}.xcd" \
-o -name "Lang_*${lolang}.xba" \
-o -name "Langpack-${lolang}.xcu" \
-o -name "*${lolang}.oxt") \
| ( cd ${PKG}-l10n-$lang ; tar xf - )
# Create slack-desc and doinst.sh :
mkdir -p ${PKG}-l10n-$lang/install
cat $SRCDIR/slack-desc.l10n \
| sed -e "s/@LANG@/$lang/g" -e "s/@LANGDESC@/$langdesc/g" > \
${PKG}-l10n-$lang/install/slack-desc
# Install per-language dictionary:
cat $SRCDIR/doinst.sh.l10n \
| sed -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \
-e "s/@LANG@/${lolang}/g" -e "s/@PRGNAM@/$PRGNAM/" \
> ${PKG}-l10n-$lang/install/doinst.sh
cd ${PKG}-l10n-$lang
/sbin/makepkg -p -l y -c n $OUTPUT/${PRGNAM}-l10n-${lang}-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}
cd -
cd $OUTPUT
md5sum ${PRGNAM}-l10n-${lang}-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-l10n-$lang-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5
cd -
cat $PKG-l10n-$lang/install/slack-desc | grep "^${PRGNAM}-l10n-$lang" > $OUTPUT/${PRGNAM}-l10n-$lang-${LOVER}${VERSION}${PKG_SUBVER}-${ARCH}-${BUILD}${TAG}.txt
done
fi # End of splitting out language packs
It seems really bizarre that dropping the above code should stop the crash that I going to to dwell on it for a bit. Decided to post here just in case anyone had an eureka moment and be able to explain what's going on.
I will post again when I find anything else. All comments, as to what may be happening, will be gratefully received. Also any pointers on what I can do next will be welcome.
Will be a slow process as a clean install with no ccache takes about 3 hours.