pinentry: fix build issue with gcc 5.x
PATCH 1/1 pinentry: fix build issue with gcc 5.x
pinentry currently fails to build with gcc 5.x, because it uses some functionality from std::string that requires C++11 without passing the appropriate -std= value. We fix this by passing a proper -std= option when gcc >= 5.x. Note that this can be removed once pinentry is bumped to the newest version (currently 0.9.7) because they no longer use std::string in the Qt part.
Fixes:
http://autobuild.buildroot.net/results/6ea64f692acaebc4d58f3371c632b5121500f17e/
(and many, many similar build failures)
One-beer-granted-to: Yann E. MORIN <[email protected]>
--- package/pinentry/pinentry.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/pinentry/pinentry.mk +7 -0
@@ -14,6 +14,13 @@ PINENTRY_DEPENDENCIES = \ host-pkgconf PINENTRY_CONF_OPTS += --without-libcap # requires PAM +# pinentry uses some std::string functionality that needs C++11 +# support when gcc >= 5.x. This should be removed when bumping +# pinentry, since newer versions no longer use std::string. +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y) +PINENTRY_CONF_ENV = CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++11" +endif + # build with X if available ifeq ($(BR2_PACKAGE_XORG7),y) PINENTRY_CONF_OPTS += --with-x
Signature · 1 line
2.7.4
PATCH 1/1 pinentry: fix build issue with gcc 5.x
On 2016-08-20 16:00 +0200, Thomas Petazzoni spake thusly:
Quoted 7 lines
pinentry currently fails to build with gcc 5.x, because it uses some functionality from
std::stringthat requires C++11 without passing the appropriate -std= value. We fix this by passing a proper -std= option when gcc >= 5.x. Note that this can be removed once pinentry is bumped to the newest version (currently 0.9.7) because they no longer usestd::stringin the Qt part.
Quoted 7 lines
Fixes:
http://autobuild.buildroot.net/results/6ea64f692acaebc4d58f3371c632b5121500f17e/
(and many, many similar build failures)Signed-off-by Thomas Petazzoni <[email protected]>One-beer-granted-to: Yann E. MORIN <[email protected]>
So be it, then! ;-)
Regards,
Yann E. MORIN.
Quoted 29 lines
--- package/pinentry/pinentry.mk | 7 +++++++ 1 file changed, 7 insertions(+)package/pinentry/pinentry.mk +7
-0@@ -14,6 +14,13 @@ PINENTRY_DEPENDENCIES = \ host-pkgconf PINENTRY_CONF_OPTS += --without-libcap # requires PAM +# pinentry uses some std::string functionality that needs C++11 +# support when gcc >= 5.x. This should be removed when bumping +# pinentry, since newer versions no longer use std::string. +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y) +PINENTRY_CONF_ENV = CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++11" +endif + # build with X if available ifeq ($(BR2_PACKAGE_XORG7),y) PINENTRY_CONF_OPTS += --with-xSignature · 6 lines
2.7.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 pinentry: fix build issue with gcc 5.x
In reply to Thomas PetazzoniQuoted 29 lines · Thomas Petazzoni
pinentry currently fails to build with gcc 5.x, because it uses some functionality from
std::stringthat requires C++11 without passing the appropriate -std= value. We fix this by passing a proper -std= option when gcc >= 5.x. Note that this can be removed once pinentry is bumped to the newest version (currently 0.9.7) because they no longer usestd::stringin the Qt part.Fixes:
http://autobuild.buildroot.net/results/6ea64f692acaebc4d58f3371c632b5121500f17e/
(and many, many similar build failures)Signed-off-by Thomas Petazzoni <[email protected]>One-beer-granted-to: Yann E. MORIN <[email protected]>
---package/pinentry/pinentry.mk| 7 +++++++1 file changed, 7 insertions(+)package/pinentry/pinentry.mk +0
-0@@ -14,6 +14,13 @@ PINENTRY_DEPENDENCIES = \ host-pkgconf
PINENTRY_CONF_OPTS+= --without-libcap # requires PAM
package/pinentry/pinentry.mk PINENTRY_DEPENDENCIES = \ · line 22
Quoted 6 lines
package/pinentry/pinentry.mk +6
-0+# pinentry uses some std::string functionality that needs C++11 +# support when gcc >= 5.x. This should be removed when bumping +# pinentry, since newer versions no longer use std::string. +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y) +PINENTRY_CONF_ENV = CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++11" +endif
Should this package be restricted to gcc5 and newer only, I assume it will break with gcc 4.x too and c++11 may not be there, gcc5 atleast has the support its just not default
Quoted 11 lines
+
# build with X if available ifeq ($(BR2_PACKAGE_XORG7),y) PINENTRY_CONF_OPTS += --with-x -- 2.7.4_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160820/112cca99/attachment.asc>
PATCH 1/1 pinentry: fix build issue with gcc 5.x
Hello,
Quoted 10 lines · Khem Raj
package/pinentry/pinentry.mk PINENTRY_DEPENDENCIES = \ · line 22
Quoted 6 lines
package/pinentry/pinentry.mk +6
-0+# pinentry uses some std::string functionality that needs C++11 +# support when gcc >= 5.x. This should be removed when bumping +# pinentry, since newer versions no longer use std::string. +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y) +PINENTRY_CONF_ENV = CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++11" +endifShould this package be restricted to gcc5 and newer only, I assume it will break with gcc 4.x too and c++11 may not be there, gcc5 atleast has the support its just not default
We have lots of gcc 4.x toolchains, and we haven't had any build failure. I believe it builds fine with gcc 4.x.
The code requiring C++11 that causes the build failure with gcc 5.x is in libstdc++ itself. As I discussed with Yann on IRC, I don't really understand why some code in libstdc++ uses C++11, without gcc 5.x defaulting to C++11.
Maybe you have a clue?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 pinentry: fix build issue with gcc 5.x
Quoted 21 lines · Thomas Petazzoni
Hello,
Quoted 10 lines · Khem Raj
package/pinentry/pinentry.mk PINENTRY_DEPENDENCIES = \ · line 22
Quoted 6 lines
package/pinentry/pinentry.mk +6
-0+# pinentry uses some std::string functionality that needs C++11 +# support when gcc >= 5.x. This should be removed when bumping +# pinentry, since newer versions no longer use std::string. +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y) +PINENTRY_CONF_ENV = CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++11" +endifShould this package be restricted to gcc5 and newer only, I assume it will break with gcc 4.x too and c++11 may not be there, gcc5 atleast has the support its just not default
We have lots of gcc 4.x toolchains, and we haven't had any build failure. I believe it builds fine with gcc 4.x.
Quoted 6 lines
The code requiring C++11 that causes the build failure with gcc 5.x is in libstdc++ itself. As I discussed with Yann on IRC, I don't really understand why some code in libstdc++ uses C++11, without gcc 5.x defaulting to C++11.
Maybe you have a clue?
it could be due to dual ABI in libstdc++ may be passing _GLIBCXX_USE_CXX11_ABI=0 is enough for such apps.
see https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
for further reading.
You could also configure your libstdc++ to default to old ABI but I would not recommend that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160820/c7a25ad2/attachment.asc>
Thomas Petazzoni
AppliedPATCH 1/1 pinentry: fix build issue with gcc 5.x
In reply to Thomas PetazzoniHello,
Quoted 9 lines · Thomas Petazzoni
pinentry currently fails to build with gcc 5.x, because it uses some functionality from
std::stringthat requires C++11 without passing the appropriate -std= value. We fix this by passing a proper -std= option when gcc >= 5.x. Note that this can be removed once pinentry is bumped to the newest version (currently 0.9.7) because they no longer usestd::stringin the Qt part.Fixes:
Quoted 8 lines
http://autobuild.buildroot.net/results/6ea64f692acaebc4d58f3371c632b5121500f17e/
(and many, many similar build failures)Signed-off-by Thomas Petazzoni <[email protected]>One-beer-granted-to: Yann E. MORIN <[email protected]>
--- package/pinentry/pinentry.mk | 7 +++++++ 1 file changed, 7 insertions(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com