Bug 158695 - --convert-to bogusly needs libcui (--disable-gui build)
Summary: --convert-to bogusly needs libcui (--disable-gui build)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0 target:7.6.5 target:24.2.1
Keywords: needsDevAdvice, notBibisectable, regression
: 157424 (view as bug list)
Depends on:
Blocks: Commandline
  Show dependency treegraph
 
Reported: 2023-12-14 07:14 UTC by Rene Engelhard
Modified: 2024-02-01 18:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Engelhard 2023-12-14 07:14:30 UTC
Description:
[similar as https://bugs.documentfoundation.org/show_bug.cgi?id=155411 ]

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052052 and bugs.debian.org/1058653.
See the strace log in the bug.

Apparently --convert-to for a writer documents now needs libcui present (which is excluded in Debians libreoffice-core-nogui since it's "common UI"[1] and thus is definitely not needed - at least by the name).

If you add --disable-gui please keep it working. --convert-to doesn't need GUI.

[1] https://salsa.debian.org/libreoffice-team/libreoffice/libreoffice/-/blob/master/rules#L3350

Steps to Reproduce:
1. build LO with --disable-gui
2. rm libcuilo.so 
3. libreoffice --writer --convert-to pdf of a file

Actual Results:
Error: source file could not be loaded

Expected Results:
Converts fine


Reproducible: Always


User Profile Reset: No

Additional Info:
.
Comment 1 Rene Engelhard 2023-12-21 07:25:22 UTC
This btw is a regression. 7.5.x didn't need cui for --convert-to
Comment 2 Stéphane Guillou (stragu) 2023-12-28 13:44:05 UTC
Thanks Rene. I trust you on this, marking as new although I haven't tested.

Wondering if this has to do with Tor's 85b9961c93446e7088d3be97b5977f1deaa16daf. What do you think, Tor?
Comment 3 Rene Engelhard 2023-12-28 15:47:39 UTC
> Wondering if this has to do with Tor's 85b9961c93446e7088d3be97b5977f1deaa16daf. What do you think, Tor?

Obviously it is not, since it's for the build and the selection of a VCL plugin in configure.ac. 

This bug is already about the built LibreOffice needing libcuilo.so.

Maybe the zxing thingies given libcui is the only component linked against it? [1]

Probably someone thought "they, let's use that one, it's always there" instead of handling existing QR code stuff there in writer(?) directly? At least that one got added in 7.6.

[1]
root@frodo:/usr/lib/libreoffice/program# for i in *.so; do echo $i; objdump -p $i | grep NEEDED | grep -i zxing; done
libLanguageToollo.so
libacclo.so
libaffine_uno_uno.so
libavmediagst.so
libbiblo.so
libbinaryurplo.so
libbootstraplo.so
libcached1.so
libcairocanvaslo.so
libchartcontrollerlo.so
libchartcorelo.so
libclewlo.so
libcmdmaillo.so
libcollator_data.so
libcuilo.so
  NEEDED               libZXing.so.3
libdeploymentgui.so
libdesktop_detectorlo.so
libdict_ja.so
libdict_zh.so
libdlgprovlo.so
libembobj.so
libemboleobj.so
libfilelo.so
libgcc3_uno.so
libi18nlangtag.so
libicglo.so
libindex_data.so
libintrospectionlo.so
libinvocadaptlo.so
libinvocationlo.so
libiolo.so
libjavaloaderlo.so
libjavavmlo.so
libjvmaccesslo.so
libjvmfwklo.so
libldapbe2lo.so
liblocaledata_en.so
liblocaledata_es.so
liblocaledata_euro.so
liblocaledata_others.so
liblog_uno_uno.so
libloglo.so
libmergedlo.so
libmigrationoo2lo.so
libmigrationoo3lo.so
libmozbootstraplo.so
libmsformslo.so
libnamingservicelo.so
libooxlo.so
libpcrlo.so
libpdffilterlo.so
libpdfimportlo.so
libpdfiumlo.so
libprotocolhandlerlo.so
libproxyfaclo.so
libreflectionlo.so
libreglo.so
libsal_textenclo.so
libscnlo.so
libscriptframe.so
libsdbtlo.so
libskialo.so
libstocserviceslo.so
libstoragefdlo.so
libstorelo.so
libtextconv_dict.so
libtextconversiondlgslo.so
libucpchelp1.so
libucpcmis1lo.so
libucpdav1.so
libucpftp1.so
libucppkg1.so
libunoidllo.so
libunopkgapp.so
libunsafe_uno_uno.so
libuuresolverlo.so
libvclplug_genlo.so
libwriterperfectlo.so
libxmlreaderlo.so
libxmlsecurity.so
libxsec_xmlsec.so
Comment 4 Rene Engelhard 2023-12-28 15:55:43 UTC
hmm, no, sorry, zxing is older.
(BTW: Those extra dependencies only in *ui is exactly the reason why I exclude them in the -nogui packages)

Still, someone apparently thought using "common UI" stuff in non-UI-code was a good idea. it is not in a --disable-gui build
Comment 5 Aron Budea 2024-01-02 01:42:10 UTC
As I can see this can't be reproduced with the bibisect builds, setting notBibisectable.
Comment 6 Rene Engelhard 2024-01-14 13:42:00 UTC
*** Bug 157424 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2024-01-30 16:48:19 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8d26ca7f9ac37b5ada0a2c463b37181bcc8301a8

tdf#158695 convert-to bogusly needs libcui (--disable-gui build)

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2024-01-31 12:31:57 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/180da9297ba1e45cbb85debd40136f0281d45b97

tdf#158695 convert-to bogusly needs libcui (--disable-gui build)

It will be available in 7.6.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Rene Engelhard 2024-01-31 20:33:30 UTC
no, sorry, the convert of gpredict (see http://bugs.debian.org/1058653) still fails with the patch applied
Comment 10 Rene Engelhard 2024-01-31 20:40:58 UTC
there's still

[pid 1261847] openat(AT_FDCWD, "/usr/lib/libreoffice/program/libcuilo.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

in the strace and after installing libreoffice-core the conversion succeeds.
Comment 11 Rene Engelhard 2024-02-01 18:20:09 UTC
sorry, works. setting to FIXED again
Comment 12 Commit Notification 2024-02-01 18:20:14 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/61371bf3b19441d2c30a51153fcc675eafdd49b8

tdf#158695 convert-to bogusly needs libcui (--disable-gui build)

It will be available in 24.2.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.