Message ID | 1471701636-30275-1-git-send-email-thomas.petazzoni@free-electrons.com |
---|---|
State | Accepted |
Headers | show |
On 2016-08-20 16:00 +0200, Thomas Petazzoni spake thusly: > 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) > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > One-beer-granted-to: Yann E. MORIN <yann.morin.1998@free.fr> So be it, then! ;-) Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Regards, Yann E. MORIN. > --- > package/pinentry/pinentry.mk | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/package/pinentry/pinentry.mk b/package/pinentry/pinentry.mk > index 09a7705..bcb910a 100644 > --- a/package/pinentry/pinentry.mk > +++ b/package/pinentry/pinentry.mk > @@ -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 > -- > 2.7.4 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
> On Aug 20, 2016, at 7:00 AM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > > 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) > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > One-beer-granted-to: Yann E. MORIN <yann.morin.1998@free.fr> > --- > package/pinentry/pinentry.mk | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/package/pinentry/pinentry.mk b/package/pinentry/pinentry.mk > index 09a7705..bcb910a 100644 > --- a/package/pinentry/pinentry.mk > +++ b/package/pinentry/pinentry.mk > @@ -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 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 > + > # build with X if available > ifeq ($(BR2_PACKAGE_XORG7),y) > PINENTRY_CONF_OPTS += --with-x > -- > 2.7.4 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
Hello, On Sat, 20 Aug 2016 13:19:02 -0700, Khem Raj wrote: > > +# 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 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
Hello, On Sat, 20 Aug 2016 16:00:36 +0200, Thomas Petazzoni wrote: > 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) > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > One-beer-granted-to: Yann E. MORIN <yann.morin.1998@free.fr> > --- > package/pinentry/pinentry.mk | 7 +++++++ > 1 file changed, 7 insertions(+) Applied to master, thanks. Thomas
> On Aug 20, 2016, at 1:27 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > > Hello, > > On Sat, 20 Aug 2016 13:19:02 -0700, Khem Raj wrote: > >>> +# 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 > > 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? 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.
diff --git a/package/pinentry/pinentry.mk b/package/pinentry/pinentry.mk index 09a7705..bcb910a 100644 --- a/package/pinentry/pinentry.mk +++ b/package/pinentry/pinentry.mk @@ -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
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) Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> One-beer-granted-to: Yann E. MORIN <yann.morin.1998@free.fr> --- package/pinentry/pinentry.mk | 7 +++++++ 1 file changed, 7 insertions(+)