[PyQt] QT_SHARED not defined

Matt Newell newellm at blur.com
Tue May 13 19:07:09 BST 2008


On Tuesday 13 May 2008 00:56:08 Phil Thompson wrote:
> On Tuesday 13 May 2008 00:10:50 Matt Newell wrote:
> > On Friday 09 May 2008 15:28:09 Phil Thompson wrote:
> > > On Friday 09 May 2008 22:13:39 Matt Newell wrote:
> > > > Using  vanilla qt-x11-4.4.0 with PyQt-x11-gpl-4.4-snapshot-20080508
> > > > and sip-4.7.5-snapshot-20080507.
> > > >
> > > > Not a problem for me to work around, just thought you might want to
> > > > know this is still an issue, and afaict is not related to any
> > > > distribution issues.
> > >
> > > What are the circumstances in which it needs to be defined?
> >
> > PyQt's configure script errors with "Qt has been built as static
> > libraries so either the -g or -k argument should be used." even though qt
> > is built as regular shared libs.
>
> Obviously I've never seen the problem.
>
> > I believe I had the same problem with earlier version of pyqt and just
> > hacked the configure.py script to work around it, which I believe is the
> > same thing the distro's are doing.  Probably an inconsistency with the
> > qmakespecs or something, I haven't looked into it further.
>
> The error message will appear if the test program finds that neither
> QT_SHARED or QT_DLL are defined.
>
> The .pro file that configure.py generates includes "CONFIG += link_prl" as
> a workaround for broken Linux distros not setting QT_SHARED properly. This
> is ignored by a normal Qt build.
>
> Can you suggest a different workaround for your distro?

Phil, this looks like a Qt bug to me.  Qt's configure script has code to 
detect gnu make(if CFG_GNU_MAKE="auto"), but sets CFG_GNU_MAKE=no initially, 
so the check is never done.

Then, when generating the makefiles(qmake/generators/unix), it only includes 
PRL_EXPORT_DEFINES, which has QT_SHARED, if include_deps is true, and 
include_deps is only true if using gnumake.

So the workaround is to pass --enable-gnumake to Qt's configure script.  

I think the bug is that PRL_EXPORT_DEFINES should be included no matter what 
the value of include_deps is(as they are included in all cases with each of 
the other qmake generators), and qt should also be running the auto detection 
code for gnumake.  I will file a bug report.

Matt






More information about the PyQt mailing list