Bug 194870 - x11-toolkits/qt5-quick: c++: error: linker command failed with exit code 1 [../../bin/qmltestrunner]
Summary: x11-toolkits/qt5-quick: c++: error: linker command failed with exit code 1 [....
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-06 22:15 UTC by O. Hartmann
Modified: 2014-11-12 20:12 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2014-11-06 22:15:26 UTC
Update of x11-toolkits/qt5-quick fails on CURRENT (FreeBSD 11.0-CURRENT #0 r274092: Tue Nov  4 20:02:27 CET 2014 amd64). Ports tree is at Revision: 372239

[...]
c++ -c -O2 -pipe -O3 -march=native -fstack-protector -fno-strict-aliasing -std=c++11 -fno-exceptions -Wall -W -pthread -D_THREAD_SAFE -fPIE -DQT_ACCESSIBILITY -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/local/lib/qt5/mkspecs/freebsd-clang -I. -isystem /usr/local/include/qt5/QtQml/5.3.2 -isystem /usr/local/include/qt5/QtQml/5.3.2/QtQml -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtQml -isystem /usr/local/include/qt5/QtCore/5.3.2 -isystem /usr/local/include/qt5/QtCore/5.3.2/QtCore -isystem /usr/local/include/qt5/QtNetwork -isystem /usr/local/include/qt5/QtCore -I.moc -o .obj/moc_qmlprofilerapplication.o .moc/moc_qmlprofilerapplication.cpp
--- sub-qmltestrunner-all ---
--- ../../bin/qmltestrunner ---
c++ -fstack-protector -pthread -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -Wl,-rpath-link,/usr/ports/x11-toolkits/qt5-quick/work/qtdeclarative-opensource-src-5.3.2/lib -o ../../bin/qmltestrunner .obj/main.o   -L/usr/ports/x11-toolkits/qt5-quick/work/qtdeclarative-opensource-src-5.3.2/lib -lQt5QuickTest -lQt5Qml -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGL
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParser::error(QQmlCustomParserNode const&, QString const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::asScript() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserProperty::assignedValues() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QOpenGLTextureGlyphCache::QOpenGLTextureGlyphCache(QFontEngineGlyphCache::Type, QTransform const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserProperty::QQmlCustomParserProperty()'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserNode::QQmlCustomParserNode()'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::Variant(QQmlScript::Variant const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlMetaType::setQQuickAnchorLineCompareFunction(bool (*)(void const*, void const*))'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::addEvent(QQmlProfilerService::EventType)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserProperty::name() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::deleteProperty(QV4::Managed*, QV4::Referenced<QV4::String>)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::Variant()'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::enabled'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::query(QV4::Managed const*, QV4::Referenced<QV4::String>)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Managed::construct(QV4::Managed*, QV4::CallData*)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::pixmapEventImpl(QQmlProfilerService::PixmapEventType, QUrl const&, int)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserNode::~QQmlCustomParserNode()'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::advanceIterator(QV4::Managed*, QV4::ObjectIterator*, QV4::Referenced<QV4::String>, unsigned int*, QV4::PropertyAttributes*)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParser::bindingIdentifier(QQmlScript::Variant const&, QString const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::instance'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::put(QV4::Managed*, QV4::Referenced<QV4::String>, QV4::ValueRef)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserProperty::~QQmlCustomParserProperty()'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QFontEngine::glyphCache(void const*, QFontEngineGlyphCache::Type, QTransform const&) const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserProperty::QQmlCustomParserProperty(QQmlCustomParserProperty const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::sceneGraphFrame(QQmlProfilerService::SceneGraphFrameType, long long, long long, long long, long long, long long)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::get(QV4::Managed*, QV4::Referenced<QV4::String>, bool*)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::pixmapEventImpl(QQmlProfilerService::PixmapEventType, QUrl const&, int, int)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserNode::QQmlCustomParserNode(QQmlCustomParserNode const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Managed::call(QV4::Managed*, QV4::CallData*)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::defineAccessorProperty(QV4::Referenced<QV4::String>, unsigned long long (*)(QV4::CallContext*), unsigned long long (*)(QV4::CallContext*))'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::asString() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::asBoolean() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::pixmapEventImpl(QQmlProfilerService::PixmapEventType, QUrl const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlBinding::createBinding(int, QObject*, QQmlContext*, QString const&, unsigned short)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::asNumber() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::type() const'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [../../bin/qmltestrunner] Error code 1
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-06 22:15:26 UTC
Maintainers CC'd
Comment 2 Antoine Brodin freebsd_committer freebsd_triage 2014-11-07 06:44:04 UTC
It builds fine in a clean environment (poudriere):  http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p372241_s274205/logs/qt5-quick-5.3.2.log
Maybe UPDATING needs some instructions.
Comment 3 woot-woot 2014-11-09 04:27:08 UTC
FreeBSD 9 Stable
issue with updating this port

usr/local/lib/qt5/mkspecs/freebsd-g++ QMAKE_CC=cc QMAKE_CXX=c++ QMAKE_LINK_C=cc QMAKE_LINK_C_SHLIB=cc QMAKE_LINK=c++ QMAKE_LINK_SHLIB=c++ QMAKE_CFLAGS=-O2\ -pipe\ -march=core2\ -fstack-protector\ -fno-strict-aliasing QMAKE_CXXFLAGS=-O2\ -pipe\ -march=core2\ -fstack-protector\ -fno-strict-aliasing QMAKE_LFLAGS=\ -fstack-protector QMAKE_CFLAGS_DEBUG= QMAKE_CFLAGS_RELEASE= QMAKE_CXXFLAGS_DEBUG= QMAKE_CXXFLAGS_RELEASE= PREFIX=/usr/local CONFIG+=release CONFIG-=debug\ separate_debug_info -o Makefile ) && /usr/bin/make -f Makefile all
/usr/local/lib/qt5/bin/uic properties.ui -o .uic/ui_properties.h
/usr/local/lib/qt5/bin/uic pane.ui -o .uic/ui_pane.h
/usr/local/lib/qt5/bin/uic import.ui -o .uic/ui_import.h
/usr/local/lib/qt5/bin/moc -DQT_ACCESSIBILITY -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/lib/qt5/mkspecs/freebsd-g++ -I/usr/ports/x11-toolkits/qt5-quick/work/qtdeclarative-opensource-src-5.3.2/tools/qmleasing -I/usr/ports/x11-toolkits/qt5-quick/work/qtdeclarative-opensource-src-5.3.2/include -I/usr/ports/x11-toolkits/qt5-quick/work/qtdeclarative-opensource-src-5.3.2/include/QtQuick -I/usr/local/include/qt5 -I/usr/local/include/qt5/QtQml -I/usr/local/include/qt5/QtWidgets -I/usr/local/include/qt5/QtNetwork -I/usr/local/include/qt5/QtGui -I/usr/local/include/qt5/QtCore -I/usr/local/include -I/usr/include/c++/4.2 -I/usr/include/c++/4.2/backward -I/usr/include/gcc/4.2 -I/usr/include splineeditor.h -o .moc/moc_splineeditor.cpp
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParser::error(QQmlCustomParserNode const&, QString const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::asScript() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserProperty::assignedValues() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QOpenGLTextureGlyphCache::QOpenGLTextureGlyphCache(QFontEngineGlyphCache::Type, QTransform const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserProperty::QQmlCustomParserProperty()'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserNode::QQmlCustomParserNode()'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::Variant(QQmlScript::Variant const&)'
/usr/local/lib/qt5/bin/rcc -name resources resources.qrc -o .rcc/qrc_resources.cpp
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlMetaType::setQQuickAnchorLineCompareFunction(bool (*)(void const*, void const*))'
c++ -c -O2 -pipe -march=core2 -fstack-protector -fno-strict-aliasing -fno-exceptions -Wall -W -pthread -D_THREAD_SAFE -fPIE -DQT_ACCESSIBILITY -DQT_QML_DEBUG_NO_WARNING -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_QML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/local/lib/qt5/mkspecs/freebsd-g++ -I. -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtWidgets -isystem /usr/local/include/qt5/QtQml -isystem /usr/local/include/qt5/QtGui -isystem /usr/local/include/qt5/QtCore/5.3.2 -isystem /usr/local/include/qt5/QtCore/5.3.2/QtCore -isystem /usr/local/include/qt5/QtNetwork -isystem /usr/local/include/qt5/QtCore -I.moc -o .obj/qrc_qml.o .rcc/qrc_qml.cpp
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::addEvent(QQmlProfilerService::EventType)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserProperty::name() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::deleteProperty(QV4::Managed*, QV4::Referenced<QV4::String>)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::Variant()'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::enabled'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::query(QV4::Managed const*, QV4::Referenced<QV4::String>)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Managed::construct(QV4::Managed*, QV4::CallData*)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::pixmapEventImpl(QQmlProfilerService::PixmapEventType, QUrl const&, int)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserNode::~QQmlCustomParserNode()'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::advanceIterator(QV4::Managed*, QV4::ObjectIterator*, QV4::Referenced<QV4::String>, unsigned int*, QV4::PropertyAttributes*)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParser::bindingIdentifier(QQmlScript::Variant const&, QString const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::instance'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::put(QV4::Managed*, QV4::Referenced<QV4::String>, QV4::ValueRef)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserProperty::~QQmlCustomParserProperty()'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QFontEngine::glyphCache(void const*, QFontEngineGlyphCache::Type, QTransform const&) const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserProperty::QQmlCustomParserProperty(QQmlCustomParserProperty const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::sceneGraphFrame(QQmlProfilerService::SceneGraphFrameType, long long, long long, long long, long long, long long)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::get(QV4::Managed*, QV4::Referenced<QV4::String>, bool*)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::pixmapEventImpl(QQmlProfilerService::PixmapEventType, QUrl const&, int, int)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlCustomParserNode::QQmlCustomParserNode(QQmlCustomParserNode const&)'
/usr/local/lib/qt5/bin/moc -DQT_ACCESSIBILITY -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/lib/qt5/mkspecs/freebsd-g++ -I/usr/ports/x11-toolkits/qt5-quick/work/qtdeclarative-opensource-src-5.3.2/tools/qmleasing -I/usr/ports/x11-toolkits/qt5-quick/work/qtdeclarative-opensource-src-5.3.2/include -I/usr/ports/x11-toolkits/qt5-quick/work/qtdeclarative-opensource-src-5.3.2/include/QtQuick -I/usr/local/include/qt5 -I/usr/local/include/qt5/QtQml -I/usr/local/include/qt5/QtWidgets -I/usr/local/include/qt5/QtNetwork -I/usr/local/include/qt5/QtGui -I/usr/local/include/qt5/QtCore -I/usr/local/include -I/usr/include/c++/4.2 -I/usr/include/c++/4.2/backward -I/usr/include/gcc/4.2 -I/usr/include segmentproperties.h -o .moc/moc_segmentproperties.cpp
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Managed::call(QV4::Managed*, QV4::CallData*)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QV4::Object::defineAccessorProperty(QV4::Referenced<QV4::String>, unsigned long long (*)(QV4::CallContext*), unsigned long long (*)(QV4::CallContext*))'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::asString() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::asBoolean() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlProfilerService::pixmapEventImpl(QQmlProfilerService::PixmapEventType, QUrl const&)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlBinding::createBinding(int, QObject*, QQmlContext*, QString const&, unsigned short)'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::asNumber() const'
/usr/local/lib/libQt5Quick.so.5: undefined reference to `QQmlScript::Variant::type() const'
*** [../../bin/qmltestrunner] Error code 1
1 error
*** [sub-qmltestrunner-all] Error code 2

...skipped...

1 error
*** [sub-tools-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/x11-toolkits/qt5-quick.
Comment 4 O. Hartmann 2014-11-09 08:05:04 UTC
In my case, I could solve the problem by deleting this specific port and start a portmaster -da again. The port is prerequisite to several other ports installed and then it get installed as a dependency again. That time it installed and got updated cleanly!

My suggestion is to delete qt5-quick.
Comment 5 woot-woot 2014-11-10 02:19:59 UTC
(In reply to ohartman from comment #4)
> In my case, I could solve the problem by deleting this specific port and
> start a portmaster -da again. The port is prerequisite to several other
> ports installed and then it get installed as a dependency again. That time
> it installed and got updated cleanly!
> 
> My suggestion is to delete qt5-quick.

Yes, its helps in my case too. Probably better to write about this in UPDATING.
Comment 6 Raphael Kubo da Costa freebsd_committer freebsd_triage 2014-11-12 11:02:33 UTC
The reason I don't want to add an UPDATING entry is that I consider this a bug. I've worked hard to prevent this from happening (this is a variation of bug 194088), but this one slipped through the cracks. I think I've found a way to make it work as expected.
Comment 7 commit-hook freebsd_committer freebsd_triage 2014-11-12 11:35:17 UTC
A commit references this bug:

Author: rakuco
Date: Wed Nov 12 11:34:39 UTC 2014
New revision: 372491
URL: https://svnweb.freebsd.org/changeset/ports/372491

Log:
  Use a smarter strategy to avoid building src/qml and src/qmldevtools.

  Simply patching src/src.pro to remove those directories from the build does
  not work in all cases. If an older version of qt5-quick is installed, their
  .pri files in mkspecs/modules will be picked up, and in the end when linking
  programs such as tools/qmltestrunner something like this happens:

    c++ [...] -Wl,-rpath-link,/usr/local/lib -o ../../bin/qmltestrunner
              -L${WRKSRC}/lib -lQt5QuickTest [...]

  The -rpath-link linker option will make ${LOCALBASE}/lib take precedence in
  directory lookups, so when the newly-built libQt5QuickTest.so asks for
  libQt5Quick.so in its DT_NEEDED section the older version installed in
  ${LOCALBASE}/lib will be used instead of the one that has just been built.
  If the new version has symbols the older one does not (Qt releases are
  backwards, not forwards, compatible), the build will fail.

  So instead of patching src/src.pro, we let the configuration process proceed
  without any patching so that the local .pri files are created in
  ${WRKSRC}/mkspecs and the Makefiles are created in a way that -rpath-link is
  not passed to the linker anymore. We only need to symlink the existing
  libraries built by lang/qt5-qml (this is similar to what we do with qtbase
  ports to avoid rebuilding tools such as qmake and moc), and then change the
  Makefiles in src/qml and src/qmldevtools so that nothing gets built.

  This might even be a solution for other ports that got .pro patches in
  r372179, since depending on which parts depend on which the same thing could
  happen in the future.

  I'm not bumping PORTREVISION because the resulting binaries will not change
  and this only fixes the build where it was broken before.

  PR:		194870

Changes:
  head/x11-toolkits/qt5-quick/Makefile
  head/x11-toolkits/qt5-quick/files/