PyQt failed to build from source with custom Qt build

notgonnahappen at firemail.cc notgonnahappen at firemail.cc
Thu Jul 16 21:39:39 BST 2020


I'd like to deploy my app with all the necessary dependencies so I'd 
like to make the size of the app as small as possible. To do that, I 
built Qt from source with the features that I do not need disabled, 
e.g.:

     configure --no-feature-network ...

After that I try to build PyQt5 from source using this custom Qt build 
and I get this error:

In file included from ../../qt5_short/include/QtCore/qmetatype.h:45:0,
                  from ../../qt5_short/include/QtCore/QMetaType:1,
                  from sipAPIQtCore.h:33,
                  from sipQtCorecmodule.cpp:24:
../../qt5_short/include/QtCore/qglobal.h:121:49: error: static assertion 
failed: Required feature animation for file 
../../qt5_short/include/QtCore/qabstractanimation.h not available.
#  define Q_STATIC_ASSERT_X(Condition, Message) 
static_assert(bool(Condition), Message)
../../qt5_short/include/QtCore/qglobal.h:87:36: note: in expansion of
macro ‘Q_STATIC_ASSERT_X’
  #define QT_REQUIRE_CONFIG(feature)
Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " 
#feature " for file " __FILE__ " not available.")
                                     ^~~~~~~~~~~~~~~~~
../../qt5_short/include/QtCore/qabstractanimation.h:45:1: note: in 
expansion of macro ‘QT_REQUIRE_CONFIG’
  QT_REQUIRE_CONFIG(animation);
  ^~~~~~~~~~~~~~~~~
Makefile:1420: recipe for target 'sipQtCorecmodule.o' failed
make[1]: *** [sipQtCorecmodule.o] Error 1
make[1]: выход из каталога 
«/home/user/sysroot-linux-64/build-PyQt5/QtCore»
Makefile:96: recipe for target 'sub-QtCore-make_first-ordered' failed
make: *** [sub-QtCore-make_first-ordered] Error 2
sip-install: 'make' failed returning 2

I did disable the 'animation' feature (--no-feature-animation). If I 
turn it back on, I do not get this error but get another similar errors 
for the other disabled features. So the question is whether the PyQt 
build tools can automatically find out what features have been disabled 
or not? If not, can I do it manually? I can't find any options or 
arguments that I can use to disable features in PyQt explicitly using 
sip-install. There is such an option if PyQt is built with 'python 
configure.py' but they do not seem to work. I went through the PyQt 
sources and it seems that just a few features can be disabled (Open GL, 
SSL, Print support and some other), is that right? Or I miss something?


More information about the PyQt mailing list