On 10/6/2014 10:12 PM, Bruce Dubbs wrote:
Alan Feuerbacher wrote:
On 10/5/2014 1:44 PM, Michael Shell wrote:
On Sun, 05 Oct 2014 07:59:46 -0400
Alan Feuerbacher <[email protected]> wrote:
"Fatal Python error: Invalid thread state for this thread . . ."
Lastly, based on my past experience with problems with Abiword, very
often
a crash a few seconds after the startup of a word processor (which often
really means, jsut after something is typed in) can be caused by
problems
with the spell checker and/or the main text font. Try to change the font
and disable the spell checker before typing anything in and see if that
stops the crash.
Thank you! I didn't try the switch --enable-dbgutil, but that helped to
spur me to look in a direction that eventually solved the problem --
more or less. More on that later.
Basically, I had to change the configure switch --enable-python=system
to --enable-python=fully-internal. I haven't fully sorted out the other
issues, but the various LibreOffice programs fire up without crashing
and seem to function properly.
Please keep us posted. I am just completing an update to LO-4.3.2.2. I
do have python2 and python3 installed and ma using
--enable-python=system. So far it seems OK.
-- Bruce
Ok, here you go:
##################################
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
########
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.
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.
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.
Then execute:
export QTDIR=$QT4PREFIX/include/qt4
Rerun configure, and get 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.
#####
Execute:
sed -i 's@qt_incdirs="$QTDIR/include@qt_incdirs="$QTDIR@' configure.ac
I experimentally defined QT4DIR=$QTDIR, and got the same good results
as above, except that it seemed appropriate to execute this sed:
sed -i 's@qt_incdirs="$QT4DIR/include@qt_incdirs="$QT4DIR@' configure.ac
Rerun configure with a good result:
######
******************************************************************
To build, issue:
/usr/bin/make
For details, run:
/usr/bin/make help
After the build has finished, you can immediately run it using:
instdir/program/soffice
If you want to run the smoketest, issue:
/usr/bin/make check
*************************************
* WARNING : native KDE4 file pickers will be disabled at runtime, Qt4
* fixes needed
* WARNING : https://bugreports.qt-project.org/browse/QTBUG-37380
* (needed)
* WARNING : https://bugreports.qt-project.org/browse/QTBUG-34614
* (needed)
* WARNING : https://bugreports.qt-project.org/browse/QTBUG-38585
* (recommended)
######
With the above results in mind, I modified /etc/profile.d/qt4.sh
as follows:
#######
# Begin /etc/profile.d/qt4.sh
QT4PREFIX=/opt/qt4
QT4BINDIR=$QT4PREFIX/lib/qt4/bin
QTDIR=$QT4PREFIX/include/qt4
QT4DIR=$QTDIR
pathappend /opt/qt4/lib/pkgconfig PKG_CONFIG_PATH
pathappend $QT4PREFIX PATH
pathappend $QT4BINDIR PATH
export QT4PREFIX QT4BINDIR QTDIR QT4DIR
# End /etc/profile.d/qt4.sh
#######
Again I'm not sure that QT4DIR is necessary, but I defined it because
the configure script seems to care about it.
##################
##################################
Hope this is of some help.
Alan
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page