[Slackbuilds-users] Missing and incorrect libreoffice dependencies.

Christoph Willing chris.willing at linux.com
Tue Aug 21 02:55:14 UTC 2018


On 13/08/18 12:08, orbea at fredslev.dk wrote:
>> The README goes on to mention a few environment variables that may be
>> set in order to change the default build, some of which (VLC, AVAHI)
>> have been at your suggestion. There is also a JAVA variable which may
>> be set, including JAVA=no for those who know they don't need its
>> functionality. I won't go on - I'm sure you've read the README and so
>> already know these things.
>>
>> BTW, you will also know from the libreoffice email list that work is
>> in progress to remove the current java dependency. When this is
>> complete, I will remove the requirement for any java (and related
>> apache-ant).
>>
>> The requirement for python3 relates to a personal use case that is not
>> satisfied by the "internal" python3. I'll continue to exercise my
>> prerogative as maintainer to keep python3 as a requirement. It
>> certainly doesn't reduce functionality and is so common that many
>> (most?) users will already have it installed.>
> I do not agree, I think such choices should be left up to the user
> especially with arguably undesirable dependencies like java.
> 
> As for python3 its easy to prefer the system python3 and fallback to
> the internal one if its missing.
> 
>   if pkg-config --exists python3; then
>     ....
>
Python3 usage is a slightly special case compared with the optional
packages you've listed below, where configuring with
--with-system-pkgnam prefers a locally preinstalled version of pkgnam to
an internal fallback version. These are build time flags.

The --enable-python configuration option refers to Python support at run
time, not build time (although there can be a build time implication).
Hence --enable-python=system means that the system installed python
should be used when running python related LibreOffice features - PyUno
in particular (which requires python3). In this case the system python3
is also required at build time in order to build those features.

Other --enable-python= possibilities are no, auto, internal and
fully-internal which can use the internal fallback python3. However all
of these constrain how PyUno can be used i.e. the resulting LibreOffice
is not "fully functional" (as is my stated goal).


> That said would you mind elaborating on your use case that requires the
> system python3? This is the first I recall hearing about it and would
> be interested in knowing more.
>
LibreOffice components are externally controllable with python scripting
via PyUno - a python binding of UNO (see:
http://www.openoffice.org/udk/) which provides the capability of remote
interaction with LibreOffice. I believe there's also a java binding
(which I haven't used).

A "hello world" example is at:
    http://lucasmanual.com/mywiki/OpenOffice
(however I suggest to invoke the initial empty document with "swriter"
not "soffice" as described there).

Using system python3 in both LibreOffice build and the runtime example,
all works OK. However internal LibreOffice python3 will fail when using
the system python3 at runtime for the hello world example and, more
importantly, all other real world apps using this feature.

An even simpler failure can be seen just by running the system python3
and trying to "import uno". It fails with a ModuleNotFoundError: No
module named 'uno' - understandable because it was made for a different
python3 installation (the LibreOffice internal installation).

You could perhaps work around that by not using the system python, but
instead use LibreOffice's built in python3 by starting your script(s)
with something like:
  #!/usr/lib64/libreoffice/programs/python

which actually works for the example above but which, if you think about
it, is clearly impracticable for anything beyond this type of single
file application.

So, although it's possible to use the internal python3 supplied by
LibreOffice, it's a considerably constrained usage requiring lots of
hoop jumping for real world applications. It's much smarter to just use
the system python3.

What's more, if a system version of either of liborcus or qt5 is used
(encouragement of which I believe is the purpose of the list below) then
python3 will be required anyway.

chris


>>> Here is a list of dependencies available at SBo which libreoffice
>>> can use and are not currently listed.
>>>
>>>   CoinMP, cppunit, glm, libabw, libcdr, libcmis, libe-book,
>>>   libeot, libepubgen, libetonyek, libexttextcat, libfreehand,
>>>   liblangtag, libmspub, libmwaw, liborcus, libpagemaker, libqxp,
>>>   libstaroffice, libtommath, libwps, libzmf, lpsolve, mdds,
>>>   mysql-connector-c++, mythes, postgresql, qt5, valgrind, ucpp
>>>   



More information about the SlackBuilds-users mailing list