Building pinentry-qt4 with gcc-5.1 results in the error below. If I pass
-std=c++11 like indicated in the error message the build succeeds. Qt version is
4.8.6.
make[3]: Entering directory
'/var/tmp/paludis/build/app-crypt-pinentry-0.9.1/work/pinentry-0.9.1/qt4'
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../assuan -I../secmem
-I/usr/x86_64-pc-linux-gnu/include/ncursesw -I../pinen
try -march=native -pipe -O2 -Wall -DQT_SHARED
-I/usr/x86_64-pc-linux-gnu/include/qt4
-I/usr/x86_64-pc-linux-gnu/include/qt4/QtCore -
DQT_SHARED -I/usr/x86_64-pc-linux-gnu/include/qt4
-I/usr/x86_64-pc-linux-gnu/include/qt4/QtGui -I/usr/x86_64-pc-linux-gnu/include/qt4
-I/usr/x86_64-pc-linux-gnu/include/qt4/QtCore -march=native -pipe -O2 -pipe
-O2 -c -o pinentrydialog.o pinentrydialog.cpp
In file included from /usr/x86_64-pc-linux-gnu/include/c++/5.1.0/string:52:0,
from /usr/x86_64-pc-linux-gnu/include/qt4/QtCore/qstring.h:54, from /usr/x86_64-pc-linux-gnu/include/qt4/QtCore/qobject.h:48, from /usr/x86_64-pc-linux-gnu/include/qt4/QtGui/qwidget.h:47, from /usr/x86_64-pc-linux-gnu/include/qt4/QtGui/qdialog.h:45, from /usr/x86_64-pc-linux-gnu/include/qt4/QtGui/QDialog:1, from pinentrydialog.h:27, from pinentrydialog.cpp:24:
/usr/x86_64-pc-linux-gnu/include/c++/5.1.0/bits/basic_string.h: In instantiation
of 'union std::cxx11::basic_string<QChar, std::cha
r_traits<QChar>, secmem::alloc<QChar> >::<anonymous>':
/usr/x86_64-pc-linux-gnu/include/c++/5.1.0/bits/basic_string.h:119:7: required
from 'class std::cxx11::basic_string<QChar, std::char_traits<QChar>,
secmem::alloc<QChar> >'
secstring.h:37:1: required from here
/usr/x86_64-pc-linux-gnu/include/c++/5.1.0/bits/basic_string.h:121:53: error:
member 'QChar std::__cxx11::basic_string<QChar, std::char_traits<QChar>,
secmem::alloc<QChar> >::<anonymous union>::_M_local_buf [8]' with constructor
not allowed in union
_CharT _M_local_buf[_S_local_capacity + 1]; ^
/usr/x86_64-pc-linux-gnu/include/c++/5.1.0/bits/basic_string.h:121:53: note:
unrestricted unions only available with -std=c++11 or -std=gnu++11
Makefile:459: recipe for target 'pinentrydialog.o' failed
make[3]: Leaving directory
'/var/tmp/paludis/build/app-crypt-pinentry-0.9.1/work/pinentry-0.9.1/qt4'
make[3]: * [pinentrydialog.o] Error 1
Makefile:361: recipe for target 'all' failed
make[2]: Leaving directory
'/var/tmp/paludis/build/app-crypt-pinentry-0.9.1/work/pinentry-0.9.1/qt4'
make[2]: * [all] Error 2
Makefile:437: recipe for target 'all-recursive' failed
make[1]: Leaving directory
'/var/tmp/paludis/build/app-crypt-pinentry-0.9.1/work/pinentry-0.9.1'
make[1]: * [all-recursive] Error 1
Makefile:378: recipe for target 'all' failed
make: * [all] Error 2