[Buildroot] [PATCH v3 1/2] package/lua-lunix: fix build with recent gcc

François Perrad francois.perrad at gadz.org
Sat Aug 7 08:55:59 UTC 2021


Le jeu. 5 août 2021 à 19:05, Arnout Vandecappelle <arnout at mind.be> a écrit :

>
>
> On 04/08/2021 15:46, Francois Perrad wrote:
> > Fixes:
> http://autobuild.buildroot.net/results/749a11d5289c6fec3b2f236b9073fc1ab730d090/
> > Signed-off-by: Francois Perrad <francois.perrad at gadz.org>
> > ---
> >  package/lua-lunix/0003-force-no-sysctl.patch | 32 ++++++++++++++++++++
> >  1 file changed, 32 insertions(+)
> >  create mode 100644 package/lua-lunix/0003-force-no-sysctl.patch
> >
> > diff --git a/package/lua-lunix/0003-force-no-sysctl.patch
> b/package/lua-lunix/0003-force-no-sysctl.patch
> > new file mode 100644
> > index 000000000..3467e2713
> > --- /dev/null
> > +++ b/package/lua-lunix/0003-force-no-sysctl.patch
> > @@ -0,0 +1,32 @@
> > +From d9b65e306478f5d2356ef90eab8191984534238a Mon Sep 17 00:00:00 2001
> > +From: Francois Perrad <francois.perrad at gadz.org>
> > +Date: Wed, 4 Aug 2021 15:27:05 +0200
> > +Subject: [PATCH] force no sysctl
> > +
> > +Signed-off-by: Francois Perrad <francois.perrad at gadz.org>
> > +---
> > + lunix-rel-20170920/lunix-20170920-1.rockspec | 9 +++++++++
> > + 1 file changed, 9 insertions(+)
> > +
> > +diff --git a/lunix-rel-20170920/lunix-20170920-1.rockspec
> b/lunix-rel-20170920/lunix-20170920-1.rockspec
> > +index 76cafeb..e42fd34 100644
> > +--- a/lunix-rel-20170920/lunix-20170920-1.rockspec
> > ++++ b/lunix-rel-20170920/lunix-20170920-1.rockspec
> > +@@ -35,5 +35,14 @@ build = {
> > +                             };
> > +                     };
> > +             };
> > ++            linux = {
> > ++                    modules = {
> > ++                            ["unix"] = {
> > ++                                    defines = {nil, nil, nil;
> > ++                                            "HAVE_SYS_SYSCTL_H=0";
>
>  That's a really dirty way of setting a define...
>
>  Unless this patch is accepted upstream (unlikely, given that there was no
> maintainer activity on [1] since more than a month), a much better way
> IMHO is
> to set it from the .mk file:
>
> LUA_LUNIX_BUILD_OPTS = CFLAGS="$(TARGET_CFLAGS) -DHAVE_SYS_SYSCTL_H=0"
>
>
It looks elegant but it doesn't work, because CFLAGS is already set in
pkg-luarocks.mk

The file lunix-20170920-1.rockspec is not a part of the upstream project (
https://25thandclement.com/~william/projects/releases/lunix-20170920.tgz or
https://github.com/wahern/lunix).
It was created by the author of Luarocks package, it is only available on
https://luarocks.org/modules/daurnimator/lunix
So, my patch cannot be upstreamed, but it is currently the only way to do.

François


> (This may not work though, depending on the order of the flags added by
> luarocks.)
>
>
>  Regards,
>  Arnout
>
> > ++                                    };
> > ++                            };
> > ++                    };
> > ++            };
> > +     };
> > + }
> > +--
> > +2.30.2
> > +
> >
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210807/9b65484d/attachment.html>


More information about the buildroot mailing list