Qt 5 and libc++

Mojca Miklavec mojca at macports.org
Thu Dec 3 04:31:17 PST 2015


Hi,

Do I understand it right that any project that depends on Qt 5 should
now be built against libc++?

I tried to fix gnuplot +qt5 (on 10.7) after the latest Qt 5 upgrade
and it fails with:

:info:build qtterminal/qt_conversion.cpp:129:9: error: use of
undeclared identifier 'isnan'; did you mean 'std::isnan'?
:info:build                                 if (isnan(*image))
:info:build                                     ^~~~~
:info:build                                     std::isnan
:info:build /usr/include/c++/4.2.1/cmath:550:5: note: 'std::isnan' declared here
:info:build     isnan(_Tp __f) { return ::__gnu_cxx::__capture_isnan(__f); }
:info:build     ^
:info:build 1 error generated.

All I did here now was change isnan to std::isnan and the build
succeeded, but the build didn't fail with the same source before I
upgraded Qt 5.

Anyway, I didn't commit the change yet (and didn't even try to run the
binary) because there are still problem with broken links in a default
build:

otool -L /opt/local/bin/gnuplot
...
@rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version
5.5.0, current version 5.5.1)
@rpath/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.5.0,
current version 5.5.1)
@rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport
(compatibility version 5.5.0, current version 5.5.1)
@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version
5.5.0, current version 5.5.1)
@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.5.0,
current version 5.5.1)
@rpath/QtCore.framework/Versions/5/QtCore (compatibility version
5.5.0, current version 5.5.1)

I believe we should fix that in Qt5, not in the zillion ports depending on it.

Mojca


More information about the macports-dev mailing list