x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../assuan -I../secmem -I/usr/include/ncursesw -I../pinentry -Wall -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtCore -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/include/qt4/QtCore -O2 -march=native -pipe -c -o secstring.o secstring.cpp In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5/string:52:0, from secstring.h:27, from secstring.cpp:23: /usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5/bits/basic_string.h: In instantiation of 'union std::__cxx11::basic_string<QChar, std::char_traits<QChar>, secmem::alloc<QChar> >::<anonymous>': /usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5/bits/basic_string.h:119:7: required from 'class std::__cxx11::basic_string<QChar, std::char_traits<QChar>, secmem::alloc<QChar> >' secstring.h:37:270: required from here /usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5/bits/basic_string.h:121:43: 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/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5/bits/basic_string.h:121:43: note: unrestricted unions only available with -std=c++11 or -std=gnu++11 secstring.cpp: In function 'secstring toUtf8(const secqstring&)': secstring.cpp:71:16: warning: unused variable 'cursor' [-Wunused-variable] uchar *cursor = (uchar*)ba.data(); ^ Makefile:456: recipe for target 'secstring.o' failed
Created attachment 401896 [details] build.log
gcc is right to reject this. This is an upstream bug. Type 'QChar' has a user-provided, non-trivial default constructor. -std=c++11 is needed in this case.
Created attachment 402276 [details, diff] pinentry-0.9.0-r3.ebuild patch to add -std=gnu++11 Patching the pinentry-0.9.0-r3.ebuild to add -std=gnu++11 allows it to compile with gcc version 5.1.0
(In reply to Mark Wright from comment #3) > Created attachment 402276 [details, diff] [details, diff] > pinentry-0.9.0-r3.ebuild patch to add -std=gnu++11 > > Patching the pinentry-0.9.0-r3.ebuild to add -std=gnu++11 allows it to > compile > with gcc version 5.1.0 can't the gcc detection can be bypassed and only get the major part? it will be empty if not gcc.
Created attachment 402286 [details, diff] pinentry-0.9.0-r3.ebuild patch to add -std=gnu++11 with only get major part (In reply to Alon Bar-Lev from comment #4) > (In reply to Mark Wright from comment #3) > > Created attachment 402276 [details, diff] [details, diff] [details, diff] > > pinentry-0.9.0-r3.ebuild patch to add -std=gnu++11 > > > > Patching the pinentry-0.9.0-r3.ebuild to add -std=gnu++11 allows it to > > compile > > with gcc version 5.1.0 > > can't the gcc detection can be bypassed and only get the major part? it will > be empty if not gcc. Yes that also builds fine with gcc version 5.1.0.
fixed in pinentry-0.9.0-r3 thanks!
Can you please try pinentry-0.9.1 without: [[ "$(gcc-major-version)" -ge 5 ]] && append-cxxflags -std=gnu++11 Thanks!