[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1028290: libreoffice-impress-nogui cannot convert to PNG



On 2023-01-09 15:11, Rene Engelhard wrote:
> Am 9. Januar 2023 11:02:33 MEZ schrieb "Gábor Németh" <homar@riseup.net>:
>>For a sanity check, I compiled the upstream from tag 7.4.4.2 with only
>>the `--disable-gui` flag, and it worked.
> 
> Interesting. Also could be our way to populate -nogui which is a bit Jacky 
> 
> [..]
> Did you build it with all the system libs upstream and still the
> upstream build works?

I built it in two ways:

1. Upstream targz with --disable-gui works and converts PPTX

Build deps installed as recommended in
https://wiki.documentfoundation.org/Development/BuildingOnLinux#Debian_and_Ubuntu:

% docker run --rm -it -v$PWD:/x:ro debian:bookworm
# apt update
# apt install -y git build-essential zip ccache junit4 libkrb5-dev nasm
graphviz python3 python3-dev qtbase5-dev libkf5coreaddons-dev
libkf5i18n-dev libkf5config-dev libkf5windowsystem-dev libkf5kio-dev
autoconf libcups2-dev libfontconfig1-dev gperf default-jdk doxygen
libxslt1-dev xsltproc libxml2-utils libxrandr-dev libx11-dev bison flex
libgtk-3-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev ant
ant-optional libnss3-dev libavahi-client-dev libxt-dev
# git clone https://gerrit.libreoffice.org/core lo
# cd lo
# git checkout libreoffice-7.4.4.2

Then to imitate flags from Debian packaging:

# ./autogen.sh --disable-gui --disable-online-update
--disable-fetch-external
# make -j8
...
make[1]: *** No rule to make target
'/lo/external/tarballs/boost_1_79_0.tar.xz', needed by
'/lo/workdir/UnpackedTarget/boost_1_79_0.tar.xz'.  Stop.

Hm, so Boost is not mentioned in the deps? OK, repeat with:

# ./autogen.sh --disable-gui --disable-online-update
# make -j8
... (lots of downloads and builds fine)
# instdir/program/soffice.bin --convert-to png /x/A.pptx 
# ls A.png
ls: cannot access 'A.png': No such file or directory

(This is another quirk that the *first* run does not produce the .png --
maybe some inital user config setup?. Anyway, repeating fixes it:)

# instdir/program/soffice.bin --convert-to png /x/A.pptx 
convert /x/A.pptx -> /lo/A.png using filter : impress_png_Export
# ls A.png
A.png

2. Debian source build

This one also works but only with the binary in the instdir-nogui, *not*
if I install the resulting .debs:

% docker run --rm -it -v$PWD:/x:ro debian:bookworm
# echo 'deb-src http://deb.debian.org/debian bookworm main'
>>/etc/apt/sources.list
# apt update
# adduser x
# apt install sudo
# echo 'x	ALL=(ALL:ALL) ALL' >>/etc/sudoers
# su - x
$ apt source libreoffice-impress-nogui
$ cd libreoffice-7.4.4~rc2
$ sudo apt build-dep -y libreoffice-impress-nogui
$ debuild -b -uc -us

Packages are built in the parent dir, but first I tried with the binary
in the build tree:

$ instdir-nogui/program/soffice.bin --convert-to png /x/A.pptx
$ # no output whatsoever, so I check:
$ echo $?
81

(Hm? OK, repeat:)

$ instdir-nogui/program/soffice.bin --convert-to png /x/A.pptx
convert /x/A.pptx -> /home/x/libreoffice-7.4.4~rc2/A.png using filter :
impress_png_Export
$ ls *png
A.png

Fine. But if I install the package from the .deb file in the parent
directory together with all those dependency .debs that were built (same
happens if I just install the impress-nogui .deb, and all the rest from
the repo):

# dpkg -i libreoffice-impress-nogui_7.4.4~rc2-2_amd64.deb
fonts-opensymbol_102.12+LibO7.4.4~rc2-2_all.deb
libreoffice-common_7.4.4~rc2-2_all.deb
libreoffice-core-nogui_7.4.4~rc2-2_amd64.deb
libreoffice-draw-nogui_7.4.4~rc2-2_amd64.deb
libreoffice-style-colibre_7.4.4~rc2-2_all.deb
libuno-cppu3_7.4.4~rc2-2_amd64.deb
libuno-cppuhelpergcc3-3_7.4.4~rc2-2_amd64.deb
libuno-purpenvhelpergcc3-3_7.4.4~rc2-2_amd64.deb
libuno-sal3_7.4.4~rc2-2_amd64.deb
libuno-salhelpergcc3-3_7.4.4~rc2-2_amd64.deb
python3-uno_7.4.4~rc2-2_amd64.deb uno-libs-private_7.4.4~rc2-2_amd64.deb
ure_7.4.4~rc2-2_amd64.deb 
Selecting previously unselected package libreoffice-impress-nogui.
...
dpkg: dependency problems prevent configuration of
libreoffice-impress-nogui:
...
# apt-get install -f 
# libreoffice --convert-to png /x/A.pptx 
Warning: failed to launch javaldx - java may not function correctly
Unspecified Application Error

The same if I try with the installed soffice.bin:

# dpkg -S soffice.bin
libreoffice-common:
/etc/apparmor.d/usr.lib.libreoffice.program.soffice.bin
libreoffice-core-nogui: /usr/lib/libreoffice/program/soffice.bin
# /usr/lib/libreoffice/program/soffice.bin --convert-to png /x/A.pptx
Unspecified Application Error

BR
/g


Reply to: