All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] argp-standalone broken when optimization is enabled
@ 2016-01-13 17:15 Vicenç
  2016-01-14  9:19 ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Vicenç @ 2016-01-13 17:15 UTC (permalink / raw)
  To: buildroot

Hello,
could this patch be added to buildroot to fix the issue:

https://dev.openwrt.org/browser/trunk/package/libs/argp-standalone/patches/002-no_optimize.patch

Thanks.

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

* [Buildroot] argp-standalone broken when optimization is enabled
  2016-01-13 17:15 [Buildroot] argp-standalone broken when optimization is enabled Vicenç
@ 2016-01-14  9:19 ` Thomas Petazzoni
  2016-01-14 10:49   ` Vicenç
       [not found]   ` <CAAMcf8AcZzNpGrvfOaGO-EBPZHfyzojNsKusZr2RuEfC9xE+iw@mail.gmail.com>
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2016-01-14  9:19 UTC (permalink / raw)
  To: buildroot

Vicen?,

Thanks for your report.

On Wed, 13 Jan 2016 18:15:37 +0100, Vicen? wrote:
> Hello,
> could this patch be added to buildroot to fix the issue:
> 
> https://dev.openwrt.org/browser/trunk/package/libs/argp-standalone/patches/002-no_optimize.patch

Could you describe more precisely what doesn't work ? The OpenWRT
patch unfortunately doesn't give any details about what it is fixing.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] argp-standalone broken when optimization is enabled
  2016-01-14  9:19 ` Thomas Petazzoni
@ 2016-01-14 10:49   ` Vicenç
       [not found]   ` <CAAMcf8AcZzNpGrvfOaGO-EBPZHfyzojNsKusZr2RuEfC9xE+iw@mail.gmail.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Vicenç @ 2016-01-14 10:49 UTC (permalink / raw)
  To: buildroot

On Thu, Jan 14, 2016 at 10:19 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Vicen?,
>
> Thanks for your report.
>
> On Wed, 13 Jan 2016 18:15:37 +0100, Vicen? wrote:
>> Hello,
>> could this patch be added to buildroot to fix the issue:
>>
>> https://dev.openwrt.org/browser/trunk/package/libs/argp-standalone/patches/002-no_optimize.patch
>
> Could you describe more precisely what doesn't work ? The OpenWRT
> patch unfortunately doesn't give any details about what it is fixing.

Hello Thomas,
In the OpenWRT page there is a link to the bug fixed by this patch:
https://dev.openwrt.org/ticket/20460
The configuration that fails in my case is when this buildroot options
are enabled:
BR2_OPTIMIZE_3
BR2_TOOLCHAIN_EXTERNAL_GCC_5
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL
BR2_PACKAGE_LIBV4L_UTILS

The error reported is the same as in OpenWRT.
argp is provided with the glibc, but the standalone version is
automatically selected when building some packages with musl.
So, libc != glibc plus some other specific package triggers the issue.

Hope this helps.
Thanks,
  Vicente.

>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

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

* [Buildroot] argp-standalone broken when optimization is enabled
       [not found]   ` <CAAMcf8AcZzNpGrvfOaGO-EBPZHfyzojNsKusZr2RuEfC9xE+iw@mail.gmail.com>
@ 2016-01-14 10:57     ` Thomas Petazzoni
  2016-01-14 11:54       ` Vicenç
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2016-01-14 10:57 UTC (permalink / raw)
  To: buildroot

Vicen?,

Please keep the Buildroot list in Cc, thanks!

On Thu, 14 Jan 2016 11:26:45 +0100, Vicen? wrote:
> On Thu, Jan 14, 2016 at 10:19 AM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
> > Vicen?,
> >
> > Thanks for your report.
> >
> > On Wed, 13 Jan 2016 18:15:37 +0100, Vicen? wrote:
> >> Hello,
> >> could this patch be added to buildroot to fix the issue:
> >>
> >> https://dev.openwrt.org/browser/trunk/package/libs/argp-standalone/patches/002-no_optimize.patch
> >
> > Could you describe more precisely what doesn't work ? The OpenWRT
> > patch unfortunately doesn't give any details about what it is fixing.
> 
> Hello Thomas,
> In the OpenWRT page there is a link to the bug fixed by this patch:
> https://dev.openwrt.org/ticket/20460
> The configuration that fails in my case is when this buildroot options
> are enabled:
> BR2_OPTIMIZE_3
> BR2_TOOLCHAIN_EXTERNAL_GCC_5
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL
> BR2_PACKAGE_LIBV4L_UTILS
> 
> The error reported is the same as in OpenWRT.
> argp is provided with the glibc, but the standalone version is
> automatically selected when building some packages with musl.
> So, libc != glibc plus some other specific package triggers the issue.

Thanks for the details. Then I think
http://review.gluster.org/#/c/6034/ is a better solution than the one
taken by OpenWRT. Can you try this change ?

It originates from https://bugzilla.redhat.com/show_bug.cgi?id=1201898.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] argp-standalone broken when optimization is enabled
  2016-01-14 10:57     ` Thomas Petazzoni
@ 2016-01-14 11:54       ` Vicenç
  2016-01-14 13:20         ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Vicenç @ 2016-01-14 11:54 UTC (permalink / raw)
  To: buildroot

On Thu, Jan 14, 2016 at 11:57 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Vicen?,
>
> Please keep the Buildroot list in Cc, thanks!
>
> On Thu, 14 Jan 2016 11:26:45 +0100, Vicen? wrote:
>> On Thu, Jan 14, 2016 at 10:19 AM, Thomas Petazzoni
>> <thomas.petazzoni@free-electrons.com> wrote:
>> > Vicen?,
>> >
>> > Thanks for your report.
>> >
>> > On Wed, 13 Jan 2016 18:15:37 +0100, Vicen? wrote:
>> >> Hello,
>> >> could this patch be added to buildroot to fix the issue:
>> >>
>> >> https://dev.openwrt.org/browser/trunk/package/libs/argp-standalone/patches/002-no_optimize.patch
>> >
>> > Could you describe more precisely what doesn't work ? The OpenWRT
>> > patch unfortunately doesn't give any details about what it is fixing.
>>
>> Hello Thomas,
>> In the OpenWRT page there is a link to the bug fixed by this patch:
>> https://dev.openwrt.org/ticket/20460
>> The configuration that fails in my case is when this buildroot options
>> are enabled:
>> BR2_OPTIMIZE_3
>> BR2_TOOLCHAIN_EXTERNAL_GCC_5
>> BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL
>> BR2_PACKAGE_LIBV4L_UTILS
>>
>> The error reported is the same as in OpenWRT.
>> argp is provided with the glibc, but the standalone version is
>> automatically selected when building some packages with musl.
>> So, libc != glibc plus some other specific package triggers the issue.
>
> Thanks for the details. Then I think
> http://review.gluster.org/#/c/6034/ is a better solution than the one
> taken by OpenWRT. Can you try this change ?

Hello Thomas,
I can confirm that
http://review.gluster.org/changes/6034/revisions/b2dfa011a3fdcb7d22764d143517d0fbd1c2a201/patch?zip
works fine.
It just needs to tweak the file paths.
And it is a proper solution, indeed better than just disabling optimizations.

Thanks!
  Vicente.

>
> It originates from https://bugzilla.redhat.com/show_bug.cgi?id=1201898.
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

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

* [Buildroot] argp-standalone broken when optimization is enabled
  2016-01-14 11:54       ` Vicenç
@ 2016-01-14 13:20         ` Thomas Petazzoni
  2016-01-14 14:31           ` [Buildroot] [PATCH] package/argp-standalone: Fix build with c99 compilers Vicente Bergas
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2016-01-14 13:20 UTC (permalink / raw)
  To: buildroot

Dear Vicen?,

On Thu, 14 Jan 2016 12:54:40 +0100, Vicen? wrote:

> I can confirm that
> http://review.gluster.org/changes/6034/revisions/b2dfa011a3fdcb7d22764d143517d0fbd1c2a201/patch?zip
> works fine.
> It just needs to tweak the file paths.
> And it is a proper solution, indeed better than just disabling optimizations.

Thanks. Then can you send a patch adding this patch to the Buildroot
argp-standalone package ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] package/argp-standalone: Fix build with c99 compilers
  2016-01-14 13:20         ` Thomas Petazzoni
@ 2016-01-14 14:31           ` Vicente Bergas
  2016-01-14 19:36             ` Peter Korsgaard
  0 siblings, 1 reply; 8+ messages in thread
From: Vicente Bergas @ 2016-01-14 14:31 UTC (permalink / raw)
  To: buildroot

Add patch from:
http://review.gluster.org/6034

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Tested-by: Vicente Bergas <vicencb@gmail.com>
---
 .../0003-fix_build_with_c99_compilers.patch        | 80 ++++++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 package/argp-standalone/0003-fix_build_with_c99_compilers.patch

diff --git a/package/argp-standalone/0003-fix_build_with_c99_compilers.patch b/package/argp-standalone/0003-fix_build_with_c99_compilers.patch
new file mode 100644
index 0000000..bfa0bb5
--- /dev/null
+++ b/package/argp-standalone/0003-fix_build_with_c99_compilers.patch
@@ -0,0 +1,80 @@
+From b2dfa011a3fdcb7d22764d143517d0fbd1c2a201 Mon Sep 17 00:00:00 2001
+From: Emmanuel Dreyfus <manu@netbsd.org>
+Date: Wed, 22 Jan 2014 14:47:23 +0100
+Subject: [PATCH] Fix build with c99 compilers
+
+BUG: 764655
+Change-Id: If5dfdc9c7427bd3d39d8da8f79e33ae2da6a3137
+Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
+Reviewed-on: http://review.gluster.org/6034
+Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
+Tested-by: Gluster Build System <jenkins@build.gluster.com>
+---
+
+diff --git a/argp-fmtstream.c b/argp-fmtstream.c
+index 7f79285..494b6b3 100644
+--- a/argp-fmtstream.c
++++ b/argp-fmtstream.c
+@@ -389,6 +389,7 @@
+ weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
+ #endif
+ 
++#if __STDC_VERSION__ - 199900L < 1
+ /* Duplicate the inline definitions in argp-fmtstream.h, for compilers
+  * that don't do inlining. */
+ size_t
+@@ -471,5 +472,6 @@
+     __argp_fmtstream_update (__fs);
+   return __fs->point_col >= 0 ? __fs->point_col : 0;
+ }
++#endif /* __STDC_VERSION__ - 199900L < 1 */
+ 
+ #endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
+diff --git a/argp-fmtstream.h b/argp-fmtstream.h
+index e797b11..828f435 100644
+--- a/argp-fmtstream.h
++++ b/argp-fmtstream.h
+@@ -153,6 +153,7 @@
+ 				      __const char *__fmt, ...)
+      PRINTF_STYLE(2,3);
+ 
++#if __STDC_VERSION__ - 199900L < 1
+ extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
+ extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
+ 
+@@ -163,6 +164,7 @@
+ 				      __const char *__str, size_t __len);
+ extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
+ 				    __const char *__str, size_t __len);
++#endif /* __STDC_VERSION__ - 199900L < 1 */
+ \f
+ /* Access macros for various bits of state.  */
+ #define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
+@@ -172,6 +174,7 @@
+ #define __argp_fmtstream_rmargin argp_fmtstream_rmargin
+ #define __argp_fmtstream_wmargin argp_fmtstream_wmargin
+ 
++#if __STDC_VERSION__ - 199900L < 1
+ /* Set __FS's left margin to LMARGIN and return the old value.  */
+ extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
+ 					  size_t __lmargin);
+@@ -193,6 +196,7 @@
+ /* Return the column number of the current output point in __FS.  */
+ extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
+ extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
++#endif /* __STDC_VERSION__ - 199900L < 1 */
+ 
+ /* Internal routines.  */
+ extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
+@@ -216,7 +220,11 @@
+ #endif
+ 
+ #ifndef ARGP_FS_EI
++#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
+ #define ARGP_FS_EI extern inline
++#else
++#define ARGP_FS_EI inline
++#endif
+ #endif
+ 
+ ARGP_FS_EI size_t
-- 
2.7.0

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

* [Buildroot] [PATCH] package/argp-standalone: Fix build with c99 compilers
  2016-01-14 14:31           ` [Buildroot] [PATCH] package/argp-standalone: Fix build with c99 compilers Vicente Bergas
@ 2016-01-14 19:36             ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2016-01-14 19:36 UTC (permalink / raw)
  To: buildroot

>>>>> "Vicente" == Vicente Bergas <vicencb@gmail.com> writes:

 > Add patch from:
 > http://review.gluster.org/6034

 > Signed-off-by: Vicente Bergas <vicencb@gmail.com>
 > Tested-by: Vicente Bergas <vicencb@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2016-01-14 19:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-13 17:15 [Buildroot] argp-standalone broken when optimization is enabled Vicenç
2016-01-14  9:19 ` Thomas Petazzoni
2016-01-14 10:49   ` Vicenç
     [not found]   ` <CAAMcf8AcZzNpGrvfOaGO-EBPZHfyzojNsKusZr2RuEfC9xE+iw@mail.gmail.com>
2016-01-14 10:57     ` Thomas Petazzoni
2016-01-14 11:54       ` Vicenç
2016-01-14 13:20         ` Thomas Petazzoni
2016-01-14 14:31           ` [Buildroot] [PATCH] package/argp-standalone: Fix build with c99 compilers Vicente Bergas
2016-01-14 19:36             ` Peter Korsgaard

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.