Alan Feuerbacher wrote:
##################################
Compiling LibreOffice in systemd
There were two basic problems that caused me problems compiling
LibreOffice-4.3.1.2 last week, and having solved them, to a lesser
extent compiling LibreOffice-4.3.2.2 today. I'll address each one
in turn.
Note that the configure script in 4.3.2.2 has been updated and
corrected compared to that in 4.3.1.2.
After a seemingly successful first compile last week, and run of the
tests, I fired up lowriter, but within a few seconds it crashed.
I got a failure message:
"Fatal Python error: Invalid thread state for this thread . . ."
Several people suggested routes to look for a solution, and I found
some that looked promising.
One was to use the configure switch --enable-python=fully-internal
rather than --enable-python=system as the BLFS book says. Then
LibreOffice compiled fine, and ran without crashing.
But the question then was, is something wrong with my overall
BLFS installation that causes the problem? Yes, it turned out, but I
can only speculate that it had something to do with D-Bus Python-1.2.0
-- specifically, my not having completed compiling the Python 2 module.
Here is the reason I did not complete compiling the Python 2 module:
Problem with compiling D-Bus Python-1.2.0
##################
The first time around I installed Optional dependencies Epydoc and
Docutils. I tried to compile both Python 2 and Python 3 modules.
The Python 3 module compiled ok, but the Python 2 module generated
an error that had to do with Epydoc (something about a "text object"
being wrong). I ignored the error for the time being and moved on
with installing a lot of other software, so the Python 2 module never
got compiled. Of course, I forgot about that.
I suspect that the lack of a Python 2 module had something to do with
LibreOffice's having a "thread" problem.
This 2nd time around I took the time to figure out what was wrong with
compiling the Python 2 module. I reinstalled Epydoc (apparently
successfully; the Epydoc tests ran fine, and the Python 3 module, which
uses Epydoc, again compiled fine). Then I tried to find out what was
wrong so as to generate the error
"'Text' object has no attribute 'data'"
which showed up during the last part of make, which compiles this:
"... /usr/bin/epydoc -o /sources/dbus-python-1.2.0/python2/api \
--html ...". I finally concluded that something is wrong with the
Python 2 doc file, but it doesn't matter since Python 2 is deprecated.
So I ended up finding configure switches that disable the documentation.
These are --enable-html-docs=no and --enable-api-docs=no . Some
experimentation showed that only the latter was necessary to get around
the error. So if you install Epydocs, the build commands should be:
########
mkdir python2 &&
pushd python2 &&
PYTHON=/usr/bin/python \
../configure --prefix=/usr --docdir=/usr/share/doc/dbus-python-1.2.0 \
--enable-api-docs=no &&
make &&
popd
########
Having this in the mail logs will help anyone having the same problem.
Thanks. I don't think it goes into the book though since we don't do
epydoc.
After doing the above I decided to reinstall everything I could find
that had to do with Python 2. The programs are:
##########
Berkeley DB-6.1.19
BlueZ-5.23
D-Bus-1.8.8
D-Bus Python-1.2.0
dbus-glib-0.102
desktop-file-utils-0.22
Expect-5.45
GLib-2.40.0
libffi-3.1
libxml2-2.9.1
OpenSSL-1.0.1i
Python-2.7.8
Python-3.4.1
PyGObject-2.28.6
shared-mime-info-1.3
Sharutils-4.14
SQLite-3.8.6
Tcl-8.6.2
Tk-8.6.2
##########
I also reinstalled many of their dependencies, as well as newer
versions of related programs listed in the latest Changelog.
After doing all of the above, LibreOffice installed and ran ok, with
the exception of the configure problem described below.
##################
Problems configuring LibreOffice
##################
There are 3 specific items that need to be added to the BLFS book
instructions to get LibreOffice to configure without error. You must
ensure that env variables for KDE and QT4 are set properly, and you
must execute a sed script to fix a problem.
Ensure that KDEDIR=$KDE_PREFIX where both variables are defined per
the BLFS book.
During "KDE Pre-installation Configuration" in the BLFS book, KDEDIR is
set up to be defined in /etc/profile.d/kde.sh so there should be no
problem here.
Right.
The configure script also looks for KDE4DIR but I don't know if it's
necessary. If defined somewhere, it appears to be the same as KDEDIR.
Eventually we will need a KDE5DIR so KDE4DIR is not wrong. We should
then change all present instances of KDEDIR to KDE4DIR, but the only
palace that is located is in the /etc/profile.d/kde.sh script.
Ensure that you have:
export QTDIR=$QT4PREFIX/include/qt4
executed somewhere, where QT4PREFIX=/opt/qt4 is as defined in the
BLFS book (systemd edition), Version 2014-10-10, Chapter 25.
X Libraries, Setting the installation prefix, under
"Installing in /opt/qt4".
Execute:
sed -i 's@qt_incdirs="$QTDIR/include@qt_incdirs="$QTDIR@' configure.ac
Without this sed, the configure script sets
qt_incdirs=/opt/qt4/include/qt4/include which is wrong because the
final "include" directory does not exist, assuming you've followed the
BLFS installation instructions for Qt4. The configure script wants to
check for the existence of some Qt4 header files, which actually are in
/opt/qt4/include/qt4/Qt . The script takes qt_incdirs and appends "Qt"
and then looks for the header files there.
As a side note, the above applies to the latest LibreOffice version,
LibreOffice-4.3.2.2. The earlier one that I tried to install last
week, LibreOffice-4.3.1.2, has a configure script that looks for
KDE4DIR and QT4DIR, and will not configure properly without them. These
variables appear to be defined generally the same as KDEDIR and QTDIR.
They are not necessary with 4.3.2.2.
With KDEDIR defined as above, but without QTDIR defined, configure
gives this error:
######
checking for Qt4 headers... no
configure: error: Qt4 headers not found. Please specify the root of
your Qt4 installation by exporting QT4DIR before running "configure".
Error running configure at ./autogen.sh line 257.
######
The error is confusing because it mentions QT4DIR, whereas QTDIR
appears to be more fundamental. I suspect that the LibreOffice people
have a bit more work to do on the configure script.
We use QT4DIR. Why didn't you have that set?
You did a lot of good debugging, but I think the issue really was that
you overlooked some things that are already in the book.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page