All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/libcap: fix build with gperf >= 3.1
Date: Wed, 18 Jan 2017 11:31:07 +0100	[thread overview]
Message-ID: <87r340u0b8.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20170117221723.10235-1-romain.naour@gmail.com> (Romain Naour's message of "Tue, 17 Jan 2017 23:17:23 +0100")

>>>>> "Romain" == Romain Naour <romain.naour@gmail.com> writes:

 > See gperf 3.1 ChangeLog:
 > * The 'len' parameter of the hash function and of the lookup function is now
 >   of type 'size_t' instead of 'unsigned int'. This makes it safe to call these
 >   functions with strings of length > 4 GB, on 64-bit machines.

:/

Have you submitted this patch upstream? Doesn't this then break building
against gperf <3.1?

I think I'll apply Gustavoz patch to (temporarily) revert the gperf bump
instead. Once we have sorted out this libcap issue (and apparently eudev
as well) we can bump the version again.

 > Fixes:
 > http://autobuild.buildroot.net/results/a2d/a2da03b1a586fcfb0c7f9146aaf24bfab2e885b0

 > Signed-off-by: Romain Naour <romain.naour@gmail.com>
 > Cc: Alvaro Gamez Machado <alvaro.gamez@hazent.com>
 > ---
 > I haven't checked how many packages are affected by this breakage...
 > ---
 >  ...p-Change-the-len-parameter-type-to-size_t.patch | 43 ++++++++++++++++++++++
 >  1 file changed, 43 insertions(+)
 >  create mode 100644 package/libcap/0004-libcap-Change-the-len-parameter-type-to-size_t.patch

 > diff --git a/package/libcap/0004-libcap-Change-the-len-parameter-type-to-size_t.patch b/package/libcap/0004-libcap-Change-the-len-parameter-type-to-size_t.patch
 > new file mode 100644
 > index 0000000..e28f780
 > --- /dev/null
 > +++ b/package/libcap/0004-libcap-Change-the-len-parameter-type-to-size_t.patch
 > @@ -0,0 +1,43 @@
 > +From 532493467fa751edb12dc06b5e12c72d5d9baeef Mon Sep 17 00:00:00 2001
 > +From: Romain Naour <romain.naour@gmail.com>
 > +Date: Tue, 17 Jan 2017 22:55:53 +0100
 > +Subject: [PATCH] libcap: Change the 'len' parameter type to 'size_t'
 > +
 > +See gperf 3.1 ChangeLog:
 > +* The 'len' parameter of the hash function and of the lookup function is now
 > +  of type 'size_t' instead of 'unsigned int'. This makes it safe to call these
 > +  functions with strings of length > 4 GB, on 64-bit machines.
 > +
 > +Fixes:
 > +http://autobuild.buildroot.net/results/a2d/a2da03b1a586fcfb0c7f9146aaf24bfab2e885b0
 > +
 > +Signed-off-by: Romain Naour <romain.naour@gmail.com>
 > +---
 > + libcap/Makefile | 4 ++--
 > + 1 file changed, 2 insertions(+), 2 deletions(-)
 > +
 > +diff --git a/libcap/Makefile b/libcap/Makefile
 > +index d189777..40cbc30 100644
 > +--- a/libcap/Makefile
 > ++++ b/libcap/Makefile
 > +@@ -22,7 +22,7 @@ all: $(MINLIBNAME) $(STALIBNAME) libcap.pc
 > + 
 > + ifeq ($(BUILD_GPERF),yes)
 > + USE_GPERF_OUTPUT = $(GPERF_OUTPUT)
 > +-INCLUDE_GPERF_OUTPUT = -include $(GPERF_OUTPUT)
 > ++INCLUDE_GPERF_OUTPUT = -include string.h -include $(GPERF_OUTPUT)
 > + endif
 > + 
 > + libcap.pc: libcap.pc.in
 > +@@ -41,7 +41,7 @@ cap_names.h: _makenames
 > + 	./_makenames > cap_names.h
 > + 
 > + $(GPERF_OUTPUT): cap_names.list.h
 > +-	perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, unsigned int);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@
 > ++	perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, size_t);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@
 > + 
 > + cap_names.list.h: Makefile $(KERNEL_HEADERS)/linux/capability.h
 > + 	@echo "=> making $@ from $(KERNEL_HEADERS)/linux/capability.h"
 > +-- 
 > +2.9.3
 > +
 > -- 
 > 2.9.3

 > _______________________________________________
 > buildroot mailing list
 > buildroot at busybox.net
 > http://lists.busybox.net/mailman/listinfo/buildroot

-- 
Bye, Peter Korsgaard

  parent reply	other threads:[~2017-01-18 10:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-17 22:17 [Buildroot] [PATCH] package/libcap: fix build with gperf >= 3.1 Romain Naour
2017-01-18  6:13 ` Alvaro Gamez
2017-01-18 10:31 ` Peter Korsgaard [this message]
2017-01-18 10:43   ` Romain NAOUR
2017-01-18 10:37 ` Thomas Petazzoni
2017-01-18 10:50   ` Romain NAOUR
2017-01-18 11:22 ` Alvaro G. M.
2017-01-18 16:01   ` Alvaro G. M.
2017-01-18 21:31     ` Romain Naour
2017-01-19 10:07       ` Alvaro G. M.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r340u0b8.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.