All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x
@ 2016-08-20 14:00 Thomas Petazzoni
  2016-08-20 14:10 ` Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2016-08-20 14:00 UTC (permalink / raw)
  To: buildroot

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
+
 # build with X if available
 ifeq ($(BR2_PACKAGE_XORG7),y)
 PINENTRY_CONF_OPTS += --with-x
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x
  2016-08-20 14:00 [Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x Thomas Petazzoni
@ 2016-08-20 14:10 ` Yann E. MORIN
  2016-08-20 20:19 ` Khem Raj
  2016-08-20 20:40 ` Thomas Petazzoni
  2 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2016-08-20 14:10 UTC (permalink / raw)
  To: buildroot

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 at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x
  2016-08-20 14:00 [Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x Thomas Petazzoni
  2016-08-20 14:10 ` Yann E. MORIN
@ 2016-08-20 20:19 ` Khem Raj
  2016-08-20 20:27   ` Thomas Petazzoni
  2016-08-20 20:40 ` Thomas Petazzoni
  2 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2016-08-20 20:19 UTC (permalink / raw)
  To: 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 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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x
  2016-08-20 20:19 ` Khem Raj
@ 2016-08-20 20:27   ` Thomas Petazzoni
  2016-08-20 20:52     ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2016-08-20 20:27 UTC (permalink / raw)
  To: 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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x
  2016-08-20 14:00 [Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x Thomas Petazzoni
  2016-08-20 14:10 ` Yann E. MORIN
  2016-08-20 20:19 ` Khem Raj
@ 2016-08-20 20:40 ` Thomas Petazzoni
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2016-08-20 20:40 UTC (permalink / raw)
  To: buildroot

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x
  2016-08-20 20:27   ` Thomas Petazzoni
@ 2016-08-20 20:52     ` Khem Raj
  0 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2016-08-20 20:52 UTC (permalink / raw)
  To: buildroot


> 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.
-------------- 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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-20 20:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-20 14:00 [Buildroot] [PATCH] pinentry: fix build issue with gcc 5.x Thomas Petazzoni
2016-08-20 14:10 ` Yann E. MORIN
2016-08-20 20:19 ` Khem Raj
2016-08-20 20:27   ` Thomas Petazzoni
2016-08-20 20:52     ` Khem Raj
2016-08-20 20:40 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.