Bug 183706 - Poudriere build failure for devel/py-qt4-core
Summary: Poudriere build failure for devel/py-qt4-core
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: kde
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 23:20 UTC by Kevin Zheng
Modified: 2014-06-07 14:00 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Zheng 2013-11-05 23:20:01 UTC
The build for devel/py-qt4-core in poudriere fails with the following message:

c++ -c -O2 -pipe -fno-strict-aliasing -O2 -Wall -W -pthread -D_THREAD_SAFE -DNDEBUG -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_XML_LIB -I. -I/wrkdirs/usr/ports/devel/py-qt4-core/work/PyQt-x11-gpl-4.10.3/pylupdate -I/usr/local/share/qt4/mkspecs/default -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtXml -I/usr/local/include/qt4 -o fetchtr.o fetchtr.cpp
c++ -c -O2 -pipe -fno-strict-aliasing -O2 -Wall -W -pthread -D_THREAD_SAFE -DNDEBUG -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_XML_LIB -I. -I/wrkdirs/usr/ports/devel/py-qt4-core/work/PyQt-x11-gpl-4.10.3/pylupdate -I/usr/local/share/qt4/mkspecs/default -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtXml -I/usr/local/include/qt4 -o merge.o merge.cpp
fetchtr.cpp:49:17: error: QtXml: No such file or directory
fetchtr.cpp:765: error: expected class-name before '{' token
fetchtr.cpp:772: error: expected ',' or '...' before '&' token
fetchtr.cpp:772: error: ISO C++ forbids declaration of 'QXmlAttributes' with no type
fetchtr.cpp:776: error: expected ',' or '...' before '&' token
fetchtr.cpp:776: error: ISO C++ forbids declaration of 'QXmlParseException' with no type
fetchtr.cpp:778: error: 'QXmlLocator' has not been declared
fetchtr.cpp:782: error: ISO C++ forbids declaration of 'QXmlLocator' with no type
fetchtr.cpp:782: error: expected ';' before '*' token
fetchtr.cpp: In member function 'virtual void UiHandler::setDocumentLocator(int*)':
fetchtr.cpp:780: error: 'm_locator' was not declared in this scope
fetchtr.cpp: At global scope:
fetchtr.cpp:800: error: expected ',' or '...' before '&' token
fetchtr.cpp:800: error: ISO C++ forbids declaration of 'QXmlAttributes' with no type
fetchtr.cpp: In member function 'virtual bool UiHandler::startElement(const QString&, const QString&, const QString&, int)':
fetchtr.cpp:804: error: 'atts' was not declared in this scope
fetchtr.cpp:808: error: 'atts' was not declared in this scope
fetchtr.cpp:816: error: 'm_locator' was not declared in this scope
fetchtr.cpp: At global scope:
fetchtr.cpp:800: warning: unused parameter 'QXmlAttributes'
fetchtr.cpp:847: error: expected ',' or '...' before '&' token
fetchtr.cpp:847: error: ISO C++ forbids declaration of 'QXmlParseException' with no type
fetchtr.cpp: In member function 'virtual bool UiHandler::fatalError(int)':
fetchtr.cpp:851: error: 'exception' was not declared in this scope
fetchtr.cpp: At global scope:
fetchtr.cpp:847: warning: unused parameter 'QXmlParseException'
fetchtr.cpp: In function 'void fetchtr_ui(const char*, MetaTranslator*, const char*, bool)':
fetchtr.cpp:886: error: 'QXmlInputSource' was not declared in this scope
fetchtr.cpp:886: error: expected `;' before 'in'
fetchtr.cpp:887: error: 'QXmlSimpleReader' was not declared in this scope
fetchtr.cpp:887: error: expected `;' before 'reader'
fetchtr.cpp:888: error: 'reader' was not declared in this scope
fetchtr.cpp:892: error: 'QXmlDefaultHandler' was not declared in this scope
fetchtr.cpp:892: error: 'hand' was not declared in this scope
fetchtr.cpp:896: error: 'in' was not declared in this scope
fetchtr.cpp:900: error: type '<type error>' argument given to 'delete', expected pointer
*** [fetchtr.o] Error code 1
1 error
*** [all] Error code 2
1 error
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /usr/ports/devel/py-qt4-core.
===>  Cleaning for py27-qt4-core-4.10.3,1
build of /usr/ports/devel/py-qt4-core ended at Mon Nov  4 23:09:34 CST 2013
build time: 00:02:40
Comment 1 Edwin Groothuis freebsd_committer 2013-11-05 23:20:30 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kde

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Raphael Kubo da Costa freebsd_committer 2013-11-06 18:10:41 UTC
I've just tested it on an 8.4-i386 Poudriere jail and it worked fine:
http://meatwad.mouf.net/rubick/poudriere/logs/bulk/84i386-rakuco/2013-11-06_18h02m37s/logs/py27-qt4-core-4.10.3,1.log

Can you check if your qt4-xml package was built correctly? It's weird
that the compiler did not complain about the
-I/usr/local/include/qt4/QtXml part but still could not find the QtXml
header.
Comment 3 Kevin Zheng 2013-11-09 00:32:30 UTC
Hi Raphael,

On 11/06/2013 12:10, Raphael Kubo da Costa wrote:
> I've just tested it on an 8.4-i386 Poudriere jail and it worked fine:
> http://meatwad.mouf.net/rubick/poudriere/logs/bulk/84i386-rakuco/2013-11-06_18h02m37s/logs/py27-qt4-core-4.10.3,1.log
> 
> Can you check if your qt4-xml package was built correctly? It's weird
> that the compiler did not complain about the
> -I/usr/local/include/qt4/QtXml part but still could not find the QtXml
> header.

I've just cleaned out the built packages on my poudriere and re-built.
The port still fails to build with the same error. I'm equally
mystified, but I'm not sure I'll be much help in fixing the issue.

I will try a non-poudriere build sometime soon, in the meanwhile, is
there any information I can provide that could be helpful?

Meanwhile, you can find a copy of the build log here:
http://fpaste.org/52850/

Thanks,
Kevin Zheng
Comment 4 Kevin Zheng 2013-12-12 03:23:40 UTC
Hi again,

The problem seems to be that my poudriere skips the entire "lib-depends"
phase when building any py-qt4-* port. Manually adding "USE_QT4= xml"
seems to fix the build, which suggests that it's not picking up the
library dependencies.

Could you help me figure out where the LIB_DEPENDS are defined for the
ports?

Thanks,
Kevin Zheng
Comment 5 Kevin Zheng 2013-12-14 01:29:05 UTC
Hi there,

I think I've tracked down the problem. The API option pulls in several
required dependencies in the port. When that option is disabled, the
port is missing several dependencies (including qt4-xml) that cause the
build to fail. Re-enabling the API option fixes the build for me.

The fix is to add the correct LIB_DEPENDS to the port Makefile. Several
other py-qt4-* ports suffer from this issue as well.

Thanks,
Kevin Zheng
Comment 6 Raphael Kubo da Costa freebsd_committer 2014-06-05 20:02:53 UTC
Thanks for investigating this, and sorry that it took so long to reply here :-(

I did a full PyQt4 build here with the API option turned off, and fortunately there were problems only in devel/py-qt4-core, devel/py-qt4-test and databases/py-qt4-sql. I've fixed py-qt4-test and py-qt4-sql in area51, and py-qt4-core should follow soon. The problem with -core is a bit simpler though: it shouldn't depend on QtXml, it's PyQt 4.10.3 that started building pylupdate and pyrcc regardless of whether QtXml is enabled. patch-configure.py needs to be regenerated to make the build conditional again.
Comment 7 Kevin Zheng 2014-06-05 21:31:04 UTC
Thanks! Take all the time you need, since I've worked around the issue :)
Comment 8 commit-hook freebsd_committer 2014-06-07 09:38:37 UTC
A commit references this bug:

Author: rakuco
Date: Sat Jun  7 09:38:11 UTC 2014
New revision: 356888
URL: http://svnweb.freebsd.org/changeset/ports/356888

Log:
  Add explicit dependency on qt4-gui.

  For some reason, PyQt's configure.py adds a dependency on QtGui when
  figuring out if QtSql is installed. When the API option is on, this
  dependency is always installed indirectly, but things fail if it is turned
  off. From configure's build log:

    Checking to see if the QtSql module should be built...
    c++ -DQT_NO_DEBUG -DQT_SQL_LIB -I. -I/usr/local/share/qt4/mkspecs/default
    -I/usr/local/include/qt4/QtSql -I/usr/local/include/qt4/QtGui
    -I/usr/local/include/qt4 -I/usr/local/include -O2 -pipe
    -fno-strict-aliasing -O2 -w -pthread -D_THREAD_SAFE cfgtest_QtSql.cpp -o
    cfgtest_QtSql -L/usr/local/lib/qt4 -L/usr/local/lib -Wl,-O1
    -Wl,-rpath,/usr/local/lib/qt4 -lQtSql -L/usr/local/lib/qt4
    -L/usr/local/lib/qt4 -L/usr/local/lib -lQtCore -L/usr/local/lib/qt4
    -L/usr/local/lib/qt4 -L/usr/local/lib -lQtGui -lXext -lX11 -lm
    /usr/bin/ld: cannot find -lQtGui
    c++: error: linker command failed with exit code 1 (use -v to see invocation)

  PR:		183706
  MFH:		2014Q2

Changes:
  head/databases/py-qt4-sql/Makefile
Comment 9 commit-hook freebsd_committer 2014-06-07 09:39:39 UTC
A commit references this bug:

Author: rakuco
Date: Sat Jun  7 09:39:35 UTC 2014
New revision: 356889
URL: http://svnweb.freebsd.org/changeset/ports/356889

Log:
  Add explicit dependency on qt4-gui.

  This is similar to r356888, in that PyQt's configure.py builds py-qt4-test
  with QtGui's libraries (even though, contrary to qt4-sql, it is not used at
  configuration time). Using QtGui defines QT_GUI_LIB, which makes the QtTest
  headers pull in QtGui ones. QtGui comes for free indirectly when the API
  option is set, but the build fails otherwise:

    c++ -c -O2 -pipe -fno-strict-aliasing -fPIC -O2 -Wall -W -pthread -D_THREAD_SAFE -DNDEBUG -DQT_NO_DEBUG -DQT_TEST_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/local/include/python2.7 -I/usr/local/share/qt4/mkspecs/default -I/usr/local/include/qt4/QtTest -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4 -I/usr/local/include -o sipQtTestQTest.o sipQtTestQTest.cpp
    In file included from /wrkdirs/usr/ports/devel/py-qt4-test/work/PyQt-x11-gpl-4.10.3/sip/QtTest/qtestkeyboard.sip:31:
    /usr/local/include/qt4/QtTest/qtestkeyboard.h:56:10: fatal error: 'QtGui/qapplication.h' file not found

  PR:		183706
  MFH:		2014Q2

Changes:
  head/devel/py-qt4-test/Makefile
Comment 10 commit-hook freebsd_committer 2014-06-07 09:47:40 UTC
A commit references this bug:

Author: rakuco
Date: Sat Jun  7 09:46:54 UTC 2014
New revision: 356890
URL: http://svnweb.freebsd.org/changeset/ports/356890

Log:
  - Rebase patch-configure.py on top of the current PyQt version, to make it
    easy to change it, which leads us to...

  - Build pylupdate and pyrcc only for py-qt4-xml again.
    This fixes a regression introduced last year when PyQt was updated to
    4.10.3: configure.py started building pylupdate and pyrcc unconditionally
    instead of only if "QtXml" was specified.
    If the API option is off, the build would fail because the QtXml headers
    needed to build those tools would not be added as a dependency.

  PR:		183706
  MFH:		2014Q2

Changes:
  head/devel/py-qt4-core/files/patch-configure.py
Comment 11 Raphael Kubo da Costa freebsd_committer 2014-06-07 09:52:28 UTC
And finally fixed!
Comment 12 commit-hook freebsd_committer 2014-06-07 13:57:54 UTC
A commit references this bug:

Author: rakuco
Date: Sat Jun  7 13:57:18 UTC 2014
New revision: 356902
URL: http://svnweb.freebsd.org/changeset/ports/356902

Log:
  MFH: r356888

  Add explicit dependency on qt4-gui.

  For some reason, PyQt's configure.py adds a dependency on QtGui when
  figuring out if QtSql is installed. When the API option is on, this
  dependency is always installed indirectly, but things fail if it is turned
  off. From configure's build log:

    Checking to see if the QtSql module should be built...
    c++ -DQT_NO_DEBUG -DQT_SQL_LIB -I. -I/usr/local/share/qt4/mkspecs/default
    -I/usr/local/include/qt4/QtSql -I/usr/local/include/qt4/QtGui
    -I/usr/local/include/qt4 -I/usr/local/include -O2 -pipe
    -fno-strict-aliasing -O2 -w -pthread -D_THREAD_SAFE cfgtest_QtSql.cpp -o
    cfgtest_QtSql -L/usr/local/lib/qt4 -L/usr/local/lib -Wl,-O1
    -Wl,-rpath,/usr/local/lib/qt4 -lQtSql -L/usr/local/lib/qt4
    -L/usr/local/lib/qt4 -L/usr/local/lib -lQtCore -L/usr/local/lib/qt4
    -L/usr/local/lib/qt4 -L/usr/local/lib -lQtGui -lXext -lX11 -lm
    /usr/bin/ld: cannot find -lQtGui
    c++: error: linker command failed with exit code 1 (use -v to see invocation)

  PR:		183706

  Approved by:	portmgr (miwi)

Changes:
_U  branches/2014Q2/
  branches/2014Q2/databases/py-qt4-sql/Makefile
Comment 13 commit-hook freebsd_committer 2014-06-07 13:58:55 UTC
A commit references this bug:

Author: rakuco
Date: Sat Jun  7 13:58:25 UTC 2014
New revision: 356903
URL: http://svnweb.freebsd.org/changeset/ports/356903

Log:
  MFH: r356889

  Add explicit dependency on qt4-gui.

  This is similar to r356888, in that PyQt's configure.py builds py-qt4-test
  with QtGui's libraries (even though, contrary to qt4-sql, it is not used at
  configuration time). Using QtGui defines QT_GUI_LIB, which makes the QtTest
  headers pull in QtGui ones. QtGui comes for free indirectly when the API
  option is set, but the build fails otherwise:

    c++ -c -O2 -pipe -fno-strict-aliasing -fPIC -O2 -Wall -W -pthread -D_THREAD_SAFE -DNDEBUG -DQT_NO_DEBUG -DQT_TEST_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/local/include/python2.7 -I/usr/local/share/qt4/mkspecs/default -I/usr/local/include/qt4/QtTest -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4 -I/usr/local/include -o sipQtTestQTest.o sipQtTestQTest.cpp
    In file included from /wrkdirs/usr/ports/devel/py-qt4-test/work/PyQt-x11-gpl-4.10.3/sip/QtTest/qtestkeyboard.sip:31:
    /usr/local/include/qt4/QtTest/qtestkeyboard.h:56:10: fatal error: 'QtGui/qapplication.h' file not found

  PR:		183706

  Approved by:	portmgr (miwi)

Changes:
_U  branches/2014Q2/
  branches/2014Q2/devel/py-qt4-test/Makefile
Comment 14 commit-hook freebsd_committer 2014-06-07 14:00:57 UTC
A commit references this bug:

Author: rakuco
Date: Sat Jun  7 14:00:31 UTC 2014
New revision: 356904
URL: http://svnweb.freebsd.org/changeset/ports/356904

Log:
  MFH: r356890

  - Rebase patch-configure.py on top of the current PyQt version, to make it
    easy to change it, which leads us to...

  - Build pylupdate and pyrcc only for py-qt4-xml again.
    This fixes a regression introduced last year when PyQt was updated to
    4.10.3: configure.py started building pylupdate and pyrcc unconditionally
    instead of only if "QtXml" was specified.
    If the API option is off, the build would fail because the QtXml headers
    needed to build those tools would not be added as a dependency.

  PR:		183706

  Approved by:	portmgr (miwi)

Changes:
_U  branches/2014Q2/
  branches/2014Q2/devel/py-qt4-core/files/patch-configure.py