Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/openswan: not available on musl
@ 2016-07-31  9:51 Bernd Kuhls
  2016-07-31 12:47 ` Jörg Krause
  0 siblings, 1 reply; 8+ messages in thread
From: Bernd Kuhls @ 2016-07-31  9:51 UTC (permalink / raw)
  To: buildroot

After fixing the usual sys/cdefs.h and _P stuff the build still fails
because Openswan makes use of GLOB_ functions

/home/bernd/buildroot/br4/output/build/openswan-2.6.48/lib/libipsecconf/parser.l:200:29: error: ?GLOB_BRACE? undeclared (first use in this function)
      globresult = glob(try, GLOB_BRACE, NULL, &globbuf);
                             ^
/home/bernd/buildroot/br4/output/build/openswan-2.6.48/lib/libipsecconf/parser.l:200:29: note: each undeclared identifier is reported only once for each function it appears in
/home/bernd/buildroot/br4/output/build/openswan-2.6.48/lib/libipsecconf/parser.l:207:41: error: ?GLOB_NOMAGIC? undeclared (first use in this function)
       globresult = glob(try, GLOB_BRACE|GLOB_NOMAGIC, NULL, &globbuf);

https://github.com/xelerance/Openswan/blob/master/lib/libipsecconf/parser.l#L200
https://github.com/xelerance/Openswan/blob/master/lib/libipsecconf/parser.l#L207
[...]
                                         ^
which musl does not support:
http://www.openwall.com/lists/musl/2013/09/16/1

Fixes
http://autobuild.buildroot.net/results/70d/70da34c1528b51e92e9e60788f83733d70b33353/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/openswan/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/openswan/Config.in b/package/openswan/Config.in
index 0370143..ba5d53d 100644
--- a/package/openswan/Config.in
+++ b/package/openswan/Config.in
@@ -2,6 +2,7 @@ config BR2_PACKAGE_OPENSWAN
 	bool "openswan"
 	depends on BR2_USE_MMU # iproute2
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # iproute2
+	depends on !BR2_TOOLCHAIN_USES_MUSL # GLOB_BRACE
 	select BR2_PACKAGE_GMP
 	select BR2_PACKAGE_IPROUTE2
 	help
@@ -9,6 +10,7 @@ config BR2_PACKAGE_OPENSWAN
 
 	  http://www.openswan.org
 
-comment "openswan needs a toolchain w/ headers >= 3.0"
+comment "openswan needs a uClibc or glibc toolchain toolchain w/ headers >= 3.0"
 	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 || \
+		BR2_TOOLCHAIN_USES_MUSL
-- 
2.8.1

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

* [Buildroot] [PATCH 1/1] package/openswan: not available on musl
  2016-07-31  9:51 [Buildroot] [PATCH 1/1] package/openswan: not available on musl Bernd Kuhls
@ 2016-07-31 12:47 ` Jörg Krause
  2016-07-31 16:05   ` Baruch Siach
  0 siblings, 1 reply; 8+ messages in thread
From: Jörg Krause @ 2016-07-31 12:47 UTC (permalink / raw)
  To: buildroot

On So, 2016-07-31 at 11:51 +0200, Bernd Kuhls wrote:
> After fixing the usual sys/cdefs.h and _P stuff the build still fails
> because Openswan makes use of GLOB_ functions
> 
> /home/bernd/buildroot/br4/output/build/openswan-
> 2.6.48/lib/libipsecconf/parser.l:200:29: error: ?GLOB_BRACE?
> undeclared (first use in this function)
> ??????globresult = glob(try, GLOB_BRACE, NULL, &globbuf);
> ?????????????????????????????^
> /home/bernd/buildroot/br4/output/build/openswan-
> 2.6.48/lib/libipsecconf/parser.l:200:29: note: each undeclared
> identifier is reported only once for each function it appears in
> /home/bernd/buildroot/br4/output/build/openswan-
> 2.6.48/lib/libipsecconf/parser.l:207:41: error: ?GLOB_NOMAGIC?
> undeclared (first use in this function)
> ???????globresult = glob(try, GLOB_BRACE|GLOB_NOMAGIC, NULL,
> &globbuf);
> 
> https://github.com/xelerance/Openswan/blob/master/lib/libipsecconf/pa
> rser.l#L200
> https://github.com/xelerance/Openswan/blob/master/lib/libipsecconf/pa
> rser.l#L207
> [...]
> ?????????????????????????????????????????^
> which musl does not support:
> http://www.openwall.com/lists/musl/2013/09/16/1
> 

Maybe we can add libglob [1] as a package and add it as a musl
dependencies like we do it with netbsd-queue?

[1]?https://github.com/voidlinux/libglob

Best regards
J?rg Krause

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

* [Buildroot] [PATCH 1/1] package/openswan: not available on musl
  2016-07-31 12:47 ` Jörg Krause
@ 2016-07-31 16:05   ` Baruch Siach
  2016-07-31 21:01     ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Baruch Siach @ 2016-07-31 16:05 UTC (permalink / raw)
  To: buildroot

Hi J?rg,

On Sun, Jul 31, 2016 at 02:47:47PM +0200, J?rg Krause wrote:
> On So, 2016-07-31 at 11:51 +0200, Bernd Kuhls wrote:
> > After fixing the usual sys/cdefs.h and _P stuff the build still fails
> > because Openswan makes use of GLOB_ functions
> > 
> > /home/bernd/buildroot/br4/output/build/openswan-
> > 2.6.48/lib/libipsecconf/parser.l:200:29: error: ?GLOB_BRACE?
> > undeclared (first use in this function)
> > ??????globresult = glob(try, GLOB_BRACE, NULL, &globbuf);
> > ?????????????????????????????^
> > /home/bernd/buildroot/br4/output/build/openswan-
> > 2.6.48/lib/libipsecconf/parser.l:200:29: note: each undeclared
> > identifier is reported only once for each function it appears in
> > /home/bernd/buildroot/br4/output/build/openswan-
> > 2.6.48/lib/libipsecconf/parser.l:207:41: error: ?GLOB_NOMAGIC?
> > undeclared (first use in this function)
> > ???????globresult = glob(try, GLOB_BRACE|GLOB_NOMAGIC, NULL,
> > &globbuf);
> > 
> > https://github.com/xelerance/Openswan/blob/master/lib/libipsecconf/pa
> > rser.l#L200
> > https://github.com/xelerance/Openswan/blob/master/lib/libipsecconf/pa
> > rser.l#L207
> > [...]
> > ?????????????????????????????????????????^
> > which musl does not support:
> > http://www.openwall.com/lists/musl/2013/09/16/1
> 
> Maybe we can add libglob [1] as a package and add it as a musl
> dependencies like we do it with netbsd-queue?
> 
> [1]?https://github.com/voidlinux/libglob

netbsd-queue is a header only package, so it adds nothing to packages that 
don't use it. libglob adds libglob.so that is only useful for few packages. We 
can do something similar to way we handle gettext by adding

  select BR2_PACKAGE_LIBGLOB if BR2_TOOLCHAIN_USES_MUSL

for each such package.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] [PATCH 1/1] package/openswan: not available on musl
  2016-07-31 16:05   ` Baruch Siach
@ 2016-07-31 21:01     ` Thomas Petazzoni
  2016-08-01 18:24       ` Jörg Krause
  2016-08-28 16:47       ` Yann E. MORIN
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2016-07-31 21:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 31 Jul 2016 19:05:17 +0300, Baruch Siach wrote:

> netbsd-queue is a header only package, so it adds nothing to packages that 
> don't use it. libglob adds libglob.so that is only useful for few packages. We 
> can do something similar to way we handle gettext by adding
> 
>   select BR2_PACKAGE_LIBGLOB if BR2_TOOLCHAIN_USES_MUSL
> 
> for each such package.

Agreed.

BTW, the other day I was wondering if we shouldn't add another dummy
package for musl that adds the <sys/cdefs.h> header. It's supposedly an
internal glibc header but *lots* of packages use the __BEGIN_DECLS /
__END_DECLS definitions, and it's really annoying to fix them all, for
not a huge benefit.

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 1/1] package/openswan: not available on musl
  2016-07-31 21:01     ` Thomas Petazzoni
@ 2016-08-01 18:24       ` Jörg Krause
  2016-08-01 18:28         ` Bernd Kuhls
  2016-08-28 16:47       ` Yann E. MORIN
  1 sibling, 1 reply; 8+ messages in thread
From: Jörg Krause @ 2016-08-01 18:24 UTC (permalink / raw)
  To: buildroot

On So, 2016-07-31 at 23:01 +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Sun, 31 Jul 2016 19:05:17 +0300, Baruch Siach wrote:
> 
> > 
> > netbsd-queue is a header only package, so it adds nothing to
> > packages that?
> > don't use it. libglob adds libglob.so that is only useful for few
> > packages. We?
> > can do something similar to way we handle gettext by adding
> > 
> > ? select BR2_PACKAGE_LIBGLOB if BR2_TOOLCHAIN_USES_MUSL
> > 
> > for each such package.
> 
> Agreed.

Ok. I will submit a patch for adding libglob. In fellow-up patches we
could add this dependency.

> BTW, the other day I was wondering if we shouldn't add another dummy
> package for musl that adds the <sys/cdefs.h> header. It's supposedly
> an
> internal glibc header but *lots* of packages use the __BEGIN_DECLS /
> __END_DECLS definitions, and it's really annoying to fix them all,
> for
> not a huge benefit.

Yes, this could be done too to ease building with musl.

J?rg

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

* [Buildroot] [PATCH 1/1] package/openswan: not available on musl
  2016-08-01 18:24       ` Jörg Krause
@ 2016-08-01 18:28         ` Bernd Kuhls
  0 siblings, 0 replies; 8+ messages in thread
From: Bernd Kuhls @ 2016-08-01 18:28 UTC (permalink / raw)
  To: buildroot

Am Mon, 01 Aug 2016 20:24:18 +0200 schrieb J?rg Krause:

> Ok. I will submit a patch for adding libglob.

Hi,

as RFC already done ;) http://patchwork.ozlabs.org/patch/654378/

Regards, Bernd

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

* [Buildroot] [PATCH 1/1] package/openswan: not available on musl
  2016-07-31 21:01     ` Thomas Petazzoni
  2016-08-01 18:24       ` Jörg Krause
@ 2016-08-28 16:47       ` Yann E. MORIN
  2016-08-29 15:57         ` Peter Korsgaard
  1 sibling, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2016-08-28 16:47 UTC (permalink / raw)
  To: buildroot

Thomas, Bernd, Baruch, All,

On 2016-07-31 23:01 +0200, Thomas Petazzoni spake thusly:
> On Sun, 31 Jul 2016 19:05:17 +0300, Baruch Siach wrote:
> 
> > netbsd-queue is a header only package, so it adds nothing to packages that 
> > don't use it. libglob adds libglob.so that is only useful for few packages. We 
> > can do something similar to way we handle gettext by adding
> > 
> >   select BR2_PACKAGE_LIBGLOB if BR2_TOOLCHAIN_USES_MUSL
> > 
> > for each such package.
> 
> Agreed.

In the meantime, the release is approaching, and libglob is not yet in
the tree.

So I think we should just hide openswan for musl, at least until after
the release.

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> BTW, the other day I was wondering if we shouldn't add another dummy
> package for musl that adds the <sys/cdefs.h> header. It's supposedly an
> internal glibc header but *lots* of packages use the __BEGIN_DECLS /
> __END_DECLS definitions, and it's really annoying to fix them all, for
> not a huge benefit.
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
> _______________________________________________
> 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] 8+ messages in thread

* [Buildroot] [PATCH 1/1] package/openswan: not available on musl
  2016-08-28 16:47       ` Yann E. MORIN
@ 2016-08-29 15:57         ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2016-08-29 15:57 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Thomas, Bernd, Baruch, All,
 > On 2016-07-31 23:01 +0200, Thomas Petazzoni spake thusly:
 >> On Sun, 31 Jul 2016 19:05:17 +0300, Baruch Siach wrote:
 >> 
 >> > netbsd-queue is a header only package, so it adds nothing to packages that 
 >> > don't use it. libglob adds libglob.so that is only useful for few packages. We 
 >> > can do something similar to way we handle gettext by adding
 >> > 
 >> >   select BR2_PACKAGE_LIBGLOB if BR2_TOOLCHAIN_USES_MUSL
 >> > 
 >> > for each such package.
 >> 
 >> Agreed.

 > In the meantime, the release is approaching, and libglob is not yet in
 > the tree.

 > So I think we should just hide openswan for musl, at least until after
 > the release.

 > Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Agreed - Committed, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2016-08-29 15:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-31  9:51 [Buildroot] [PATCH 1/1] package/openswan: not available on musl Bernd Kuhls
2016-07-31 12:47 ` Jörg Krause
2016-07-31 16:05   ` Baruch Siach
2016-07-31 21:01     ` Thomas Petazzoni
2016-08-01 18:24       ` Jörg Krause
2016-08-01 18:28         ` Bernd Kuhls
2016-08-28 16:47       ` Yann E. MORIN
2016-08-29 15:57         ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox