Page MenuHome GnuPG

qgpgme-2.0.0: Solaris (SmartOS) build problem
Closed, ResolvedPublic

Description

After updating qgpgme in pkgsrc to 2.0.0, bulk package builders tried building it. The one on SmartOS failed with:

[ 22%] Building CXX object 6/src/CMakeFiles/QGpgmeQt6.dir/verifydetachedjob.cpp.o
/home/pbulk/build/security/qgpgme/work/qgpgme-2.0.0/src/threadedjobmixin.cpp:122:53: error: 'QList<QByteArray> single(const QByteArray&)' redeclared as different kind of entity
  122 | static QList<QByteArray> single(const QByteArray &ba)
      |                                                     ^
In file included from /usr/include/math.h:335,
                 from /opt/tools/gcc14/include/c++/14.3.0/bits/std_abs.h:40,
                 from /opt/tools/gcc14/include/c++/14.3.0/cstdlib:81,
                 from /opt/tools/gcc14/include/c++/14.3.0/bits/stl_algo.h:71,
                 from /opt/tools/gcc14/include/c++/14.3.0/algorithm:61,
                 from /home/pbulk/build/security/qgpgme/work/.buildlink/qt6/include/QtCore/qflags.h:10,
                 from /home/pbulk/build/security/qgpgme/work/.buildlink/qt6/include/QtCore/qglobal.h:49,
                 from /opt/pkg/qt6/include/QtCore/qmutex.h:8,
                 from /opt/pkg/qt6/include/QtCore/QMutex:1,
                 from /home/pbulk/build/security/qgpgme/work/qgpgme-2.0.0/src/threadedjobmixin.h:38,
                 from /home/pbulk/build/security/qgpgme/work/qgpgme-2.0.0/src/threadedjobmixin.cpp:39:
/usr/include/floatingpoint.h:69:15: note: previous declaration 'typedef float single'
   69 | typedef float single;
      |               ^~~~~~
/home/pbulk/build/security/qgpgme/work/qgpgme-2.0.0/src/threadedjobmixin.cpp: In constructor 'QGpgME::_detail::PatternConverter::PatternConverter(const QByteArray&)':
/home/pbulk/build/security/qgpgme/work/qgpgme-2.0.0/src/threadedjobmixin.cpp:130:14: error: invalid cast from type 'const QByteArray' to type 'single' {aka 'float'}
  130 |     : m_list(single(ba)), m_patterns(nullptr) {}
      |              ^~~~~~~~~~
/home/pbulk/build/security/qgpgme/work/qgpgme-2.0.0/src/threadedjobmixin.cpp: In constructor 'QGpgME::_detail::PatternConverter::PatternConverter(const QString&)':
/home/pbulk/build/security/qgpgme/work/qgpgme-2.0.0/src/threadedjobmixin.cpp:132:14: error: invalid cast from type 'QByteArray' to type 'single' {aka 'float'}
  132 |     : m_list(single(s.toUtf8())), m_patterns(nullptr) {}
      |              ^~~~~~~~~~~~~~~~~~
/home/pbulk/build/security/qgpgme/work/qgpgme-2.0.0/src/threadedjobmixin.cpp: At global scope:
/home/pbulk/build/security/qgpgme/work/qgpgme-2.0.0/src/threadedjobmixin.cpp:122:26: warning: 'QList<QByteArray> single(const QByteArray&)' defined but not used [-Wunused-function]
  122 | static QList<QByteArray> single(const QByteArray &ba)
      |                          ^~~~~~
--- 6/src/CMakeFiles/QGpgmeQt6.dir/threadedjobmixin.cpp.o ---
*** [6/src/CMakeFiles/QGpgmeQt6.dir/threadedjobmixin.cpp.o] Error code 1

bmake[2]: stopped making "6/src/CMakeFiles/QGpgmeQt6.dir/build" in /home/pbulk/build/security/qgpgme/work/qgpgme-2.0.0/cmake-pkgsrc-build
[ 23%] Building CXX object 6/src/CMakeFiles/QGpgmeQt6.dir/verifyopaquejob.cpp.o
bmake[2]: 1 error

(I can't test on that platform myself, but I can add patches to pkgsrc if you think they have a high chance of fixing that.)

Revisions and Commits

Event Timeline

ikloecker added projects: gpgmeqt, Solaris.
ikloecker claimed this task.
ikloecker added a subscriber: ikloecker.

Makes me wonder why they think they can use such a common word for a typedef without risking name clashes everywhere. Luckily, the helper function single is superfluous nowadays so that we can easily avoid the name clash.

ikloecker mentioned this in Unknown Object (Maniphest Task).Mon, Feb 9, 8:58 AM