LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-14-2020, 10:22 AM   #1
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 900

Rep: Reputation: 153Reputation: 153
libreoffice (alienbob) customizing tool menu crashes


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.

Last edited by aikempshall; 01-14-2020 at 10:23 AM. Reason: change title
 
Old 01-14-2020, 08:23 PM   #2
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
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.
 
Old 01-15-2020, 03:18 AM   #3
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 900

Original Poster
Rep: Reputation: 153Reputation: 153
Quote:
Originally Posted by vtel57 View Post
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.
 
2 members found this post helpful.
Old 01-15-2020, 03:38 AM   #4
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,971

Rep: Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549
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.
 
1 members found this post helpful.
Old 01-15-2020, 08:57 AM   #5
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
I can't reproduce that with libreoffice from my own build script, but maybe I'm just lucky?

https://notabug.org/orbea/SlackBuild...ce/libreoffice
 
1 members found this post helpful.
Old 01-15-2020, 10:00 AM   #6
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Quote:
Originally Posted by chrisretusn View Post
Slackware64-current, same issue Version: 6.3.4.2.0+...
--- OFF TOPIC ---


Hello ol' friend. It's good to see you're still alive and kickin'!
 
Old 01-15-2020, 01:05 PM   #7
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 15.0 64bit
Posts: 1,160
Blog Entries: 5

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Quote:
Originally Posted by chrisretusn View Post
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.
 
Old 01-15-2020, 03:40 PM   #8
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 15.0 64bit
Posts: 1,160
Blog Entries: 5

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
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.
Code:
$ cat /usr/lib64/libreoffice/share/basic/Depot/script.xlb 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Depot" library:readonly="true" library:passwordprotected="false">
 <library:element library:name="Depot"/>
 <library:element library:name="CommonLang"/>
 <library:element library:name="Currency"/>
 <library:element library:name="Internet"/>
 <library:element library:name="Lang_de"/>
 <library:element library:name="tools"/>
 <library:element library:name="Lang_en"/>
 <library:element library:name="Lang_fr"/>
 <library:element library:name="Lang_it"/>
 <library:element library:name="Lang_es"/>
 <library:element library:name="Lang_sv"/>
 <library:element library:name="Lang_zh"/>
 <library:element library:name="Lang_tw"/>
 <library:element library:name="Lang_ko"/>
 <library:element library:name="Lang_ja"/>
</library:library>
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.
 
1 members found this post helpful.
Old 01-15-2020, 03:52 PM   #9
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 15.0 64bit
Posts: 1,160
Blog Entries: 5

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Quote:
Originally Posted by aikempshall View Post
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
 
Old 01-16-2020, 03:35 AM   #10
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 900

Original Poster
Rep: Reputation: 153Reputation: 153
I've found that if I just install the appropriate packages for my language i.e.

libreoffice-6.3.4-x86_64-1alien.txz
libreoffice-dict-en-6.3.4-x86_64-1alien.txz
libreoffice-l10n-en_GB-6.3.4-x86_64-1alien.txz
libreoffice-sdkdoc-6.3.4-noarch-1alien.txz

or just

libreoffice-6.3.4-x86_64-1alien.txz

I get the crash.

If I install everything generated by the SlackBuild i.e. all the dict packages and all the language packages LibreOffice doesn't crash.

Alex
 
Old 01-16-2020, 03:42 AM   #11
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 900

Original Poster
Rep: Reputation: 153Reputation: 153
Quote:
Originally Posted by gegechris99 View Post
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.
Code:
$ cat /usr/lib64/libreoffice/share/basic/Depot/script.xlb 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Depot" library:readonly="true" library:passwordprotected="false">
 <library:element library:name="Depot"/>
 <library:element library:name="CommonLang"/>
 <library:element library:name="Currency"/>
 <library:element library:name="Internet"/>
 <library:element library:name="Lang_de"/>
 <library:element library:name="tools"/>
 <library:element library:name="Lang_en"/>
 <library:element library:name="Lang_fr"/>
 <library:element library:name="Lang_it"/>
 <library:element library:name="Lang_es"/>
 <library:element library:name="Lang_sv"/>
 <library:element library:name="Lang_zh"/>
 <library:element library:name="Lang_tw"/>
 <library:element library:name="Lang_ko"/>
 <library:element library:name="Lang_ja"/>
</library:library>
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.

Thanks for the explanation.

Not sure where we go from here.

Alex
 
Old 01-16-2020, 10:50 AM   #12
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
I think I'll just not split the /usr/lib64/libreoffice/share/basic/Depot/Lang* files out of the main libreoffice package.
 
1 members found this post helpful.
Old 01-16-2020, 11:03 AM   #13
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,971

Rep: Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549Reputation: 1549
Quote:
Originally Posted by vtel57 View Post
--- OFF TOPIC ---


Hello ol' friend. It's good to see you're still alive and kickin'!
Same to you.
 
1 members found this post helpful.
Old 01-16-2020, 04:29 PM   #14
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 15.0 64bit
Posts: 1,160
Blog Entries: 5

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
alienbob uploaded an updated libreoffice package (same LO version 6.3.4 build 2) that solves the crash issue when customizing toolbar with macros.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling libreoffice from source using AlienBob's SlackBuild aikempshall Slackware 12 09-23-2019 02:40 AM
[SOLVED] alienbob: VLC 3.0 gui off menu start, or file manager right click not working. BW-userx Slackware 5 02-26-2018 08:06 AM
LXer: Customizing docs, a new analytics tool, and more OpenStack news LXer Syndicated Linux News 0 12-13-2016 03:36 AM
AlienBob's LibreOffice 4.2.4.2 and no native KDE file manager marnold Slackware 5 05-24-2014 03:46 PM
Customizing the redhat 8.0 menu in KDE & or Gnome artios Linux - General 20 08-25-2003 08:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration