[SOLVED] libreoffice (alienbob) customizing tool menu crashes
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Last edited by aikempshall; 01-14-2020 at 10:23 AM.
Reason: change title
Now that's damned interesting. I recently upgraded to 14.2 from 14.1, so I also upgraded my LibreOffice .txz packages via AlienBob's repos. I have used LibreOffice Writer and Calc quite extensively the past couple weeks with no troubles at all. However, when I followed precisely what you did in the beginning of your post above, the app crashed. Poof! All gone.
I will be subscribing to this thread to check on any progress you make with regards to resolving this. Thanks so much for posting. Oh, and someone ought to alert @AlienBob about this --> https://alien.slackbook.org/blog/lib...kware-current/
Oh, and I should mention that I'm running Slack64 14.2 (stable) with LibreOffice Version: 6.2.8.2.
I will be subscribing to this thread to check on any progress you make with regards to resolving this. Thanks so much for posting. Oh, and someone ought to alert @AlienBob about this --> https://alien.slackbook.org/blog/lib...kware-current/
@AlienBob is aware of the problem. The problem can be difficult to replicate! In a previous thread some have reported it always crashes, others that it never crashes.
For me it's looking like it depends on how or how often I compile.
I can't believe that hashing out the code in the SlackBuild has isolated the problem as the code doesn't appear to be of much significance. Early days.
Slackware64-current, same issue Version: 6.3.4.2.0+ Not just with Calc, it is LibreOffice wide. Tools, Customize, Toolbars tab, Category Macros results in Document Recovery.
I use LibreOffice daily, I rarely customize, so never ran it to this problem before.
Slackware64-current, same issue Version: 6.3.4.2.0+ Not just with Calc, it is LibreOffice wide. Tools, Customize, Toolbars tab, Category Macros results in Document Recovery.
Same issue here. FYI, I also installed libreoffice-dict-fr and libreoffice-l10n-fr packages and I'm running KDE5 from alienBOB.
I found out the issue: file /usr/lib64/libreoffice/share/basic/Depot/script.xlb contains references to inexistent xba files.
The lines in bold red below point to inexistent files in my system (ex: Lang_de.xba doesn't exist but Lang_fr.xba does exist).
If I remove the lines in bold red, I no longer have a crash.
File Lang_fr.xba is included in package libreoffice-l10n-fr while Lang_en.xba, Lang_zh.xba end Lange_tw.xba are included in libreoffice package.
Thus, an alternative way to avoid the crash is to install language packages for the missing Lang_xx files but that would negate the point of having individual language packages.
An explanation of what are xlb and xba files can be found here
Quote:
The macros are grouped in modules and dialogs( =xba files). These are grouped in libraries. Which modules and dialogs belong to a library is record in script.xlb and dialog.xlb. These files together are stored in a folder.
I can't believe that hashing out the code in the SlackBuild has isolated the problem as the code doesn't appear to be of much significance. Early days.
Thanks for having helped us narrow the range of possible causes for the crash. Indeed, this part of the code in SlackBuild created the problem:
Code:
# Split out language packs if we have built additional languages:
...
# End of splitting out language packs
Last edited by gegechris99; 01-15-2020 at 04:00 PM.
Reason: typo
I found out the issue: file /usr/lib64/libreoffice/share/basic/Depot/script.xlb contains references to inexistent xba files.
The lines in bold red below point to inexistent files in my system (ex: Lang_de.xba doesn't exist but Lang_fr.xba does exist).
If I remove the lines in bold red, I no longer have a crash.
File Lang_fr.xba is included in package libreoffice-l10n-fr while Lang_en.xba, Lang_zh.xba end Lange_tw.xba are included in libreoffice package.
Thus, an alternative way to avoid the crash is to install language packages for the missing Lang_xx files but that would negate the point of having individual language packages.
An explanation of what are xlb and xba files can be found here
Quite agree that installing ALL the language packages negates the point of having individual language packages, but in the short term if someone has a need to customize the toolbar this will be the work around.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.