[QScintilla] Problem installing QScintilla2:fatal error: QAbstractScrollArea: No such file or directory

Baz Walter bazwal at ftml.net
Mon Jan 26 20:18:18 GMT 2015


On 26/01/15 14:12, Thies Thate wrote:
> I'm hobbyist trying to program in PYQT5.
> Working on a Lenovo ThinkStation E32 (64bit) under Fedora 21 Mate.
>
[snip]
>
> And now my problem:
>
> [xantippe at local Python]$ python3 configure.py --pyqt=PyQt5
> Configuring QScintilla 2.8.4...
> QScintilla 2.8.4 is being used.
> The QScintilla .sip files will be installed in /usr/share/sip/PyQt5.
> The QScintilla module will be installed in
> /usr/lib64/python3.4/site-packages/PyQt5.
> PyQt 5.4 is being used.
> Qt 5.4.0 is being used.
> sip 4.16.5 is being used.
> The sip executable is /usr/bin/sip.
> The QScintilla module is being built with 'protected' redefined as
> 'public'.
> The QScintilla API file will be installed in
> /usr/share/qt5/qsci/api/python.
> Generating the C++ source for the Qsci module...
> Generating the .pro file for the Qsci module...
> Creating the Makefile for the Qsci module...
> [xantippe at local Python]$ make
> g++ -c -pipe -fno-exceptions -O2 -g -pipe -Wall -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong
> --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2
> -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public
> -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB
> -I/usr/lib64/qt5/mkspecs/linux-g++ -I. -isystem /usr/include/python3.4m
> -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtGui -isystem
> /usr/include/qt5/QtCore -I. -o sipQsciQsciLexerAVS.o
> sipQsciQsciLexerAVS.cpp
> In file included from /usr/include/qt5/Qsci/qscicommand.h:36:0,
>                   from /usr/include/qt5/Qsci/qsciscintilla.h:42,
>                   from /usr/include/qt5/Qsci/qsciabstractapis.h:39,
>                   from sip/qsciabstractapis.sip:29:
> /usr/include/qt5/Qsci/qsciscintillabase.h:35:31: fatal error:
> QAbstractScrollArea: No such file or directory
>   #include <QAbstractScrollArea>
>                                 ^
> compilation terminated.
> Makefile:461: recipe for target 'sipQsciQsciLexerAVS.o' failed
> make: *** [sipQsciQsciLexerAVS.o] Error 1
>
[snip]
>
> (Because I also have qt4 installed (for hplip-gui) I thought the problem
> is the existence of
> Qt4. But uninstalling this does not have the needed effect.
>  >>>
> Question can you help me to solve this problem?

If you want to install QScintilla for Qt5, you will have to tweak the 
source code a little to get things to work properly.

So, starting from some clean sources, open up the 
Qt4Qt5/features/qscintilla2.prf file in a text editor, and replace each 
line that looks exactly like this:

     LIBS += -lqscintilla2

with this:

     LIBS += -lqscintilla2_qt5

This is to ensure that you can safely install QScintilla for both Qt4 
and Qt5.

For the same reason, open the Qt4Qt5/qscintilla.pro file and replace 
this line:

     TARGET = qscintilla2

with this:

     TARGET = qscintilla2_qt5

Once that has been done, you need to make sure that the correct features 
file will be found (this is the most likely cause of your build errors). 
So before you start re-building anything, do the following:

     $ cd Qt4Qt5
     $ export QMAKEFEATURES="$PWD/features"

You should also remove any QScintilla libs that you installed previously 
(i.e. the libqscintilla2.so* files that probably ended up in 
/usr/lib64). These files will currently have the same names as those 
used by Qscintilla for Qt4, which is why the changes made above are needed.

With that done, re-build QScintilla2, and then have another go at 
building the Qscintilla Python bindings.

-- 
Regards
Baz Walter


More information about the QScintilla mailing list