All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1 of 3] host-acl: build fix on RHEL6 hosts (GCC 4.4.7)
@ 2018-07-19 17:20 Hollis Blanchard
  2018-07-19 17:20 ` [Buildroot] [PATCH 2 of 3] host-attr: build fix for " Hollis Blanchard
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Hollis Blanchard @ 2018-07-19 17:20 UTC (permalink / raw)
  To: buildroot

This didn't introduce any build warnings, FWIW.

Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>

diff --git a/package/acl/0001-pragma-gcc-diagnostic-in-fn.patch b/package/acl/0001-pragma-gcc-diagnostic-in-fn.patch
new file mode 100644
--- /dev/null
+++ b/package/acl/0001-pragma-gcc-diagnostic-in-fn.patch
@@ -0,0 +1,21 @@
+build with old GCC versions
+
+GCC 4.4.7, as found in RHEL6, reports:
+	libacl/acl_from_text.c:307: error: #pragma GCC diagnostic not allowed inside functions
+
+Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>
+
+--- host-acl-2.2.53/libacl/acl_from_text.c.orig	2018-07-19 09:15:40.425940094 -0700
++++ host-acl-2.2.53/libacl/acl_from_text.c	2018-07-19 09:15:50.777940093 -0700
+@@ -304,11 +304,8 @@
+ create_entry:
+ 	if (acl_create_entry(acl_p, &entry_d) != 0)
+ 		return -1;
+-#pragma GCC diagnostic push
+-#pragma GCC diagnostic ignored "-Waddress"
+ 	if (acl_copy_entry(entry_d, int2ext(&entry_obj)) != 0)
+ 		return -1;
+-#pragma GCC diagnostic pop
+ 	return 0;
+ 
+ fail:

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

* [Buildroot] [PATCH 2 of 3] host-attr: build fix for RHEL6 hosts (GCC 4.4.7)
  2018-07-19 17:20 [Buildroot] [PATCH 1 of 3] host-acl: build fix on RHEL6 hosts (GCC 4.4.7) Hollis Blanchard
@ 2018-07-19 17:20 ` Hollis Blanchard
  2018-07-19 17:20 ` [Buildroot] [PATCH 3 of 3] libglib2: " Hollis Blanchard
  2018-07-25 21:12 ` [Buildroot] [PATCH 1 of 3] host-acl: build fix on " Thomas Petazzoni
  2 siblings, 0 replies; 9+ messages in thread
From: Hollis Blanchard @ 2018-07-19 17:20 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>

diff --git a/package/attr/0001-deprecated-attribute-message.patch b/package/attr/0001-deprecated-attribute-message.patch
new file mode 100644
--- /dev/null
+++ b/package/attr/0001-deprecated-attribute-message.patch
@@ -0,0 +1,76 @@
+build with older GCCs
+
+GCC versions up through 4.4.7 (which is used in RHEL 6) do not accept any
+argument for the deprecated attribute. GCC 4.5 and later say the "msg"
+argument is optional. We don't need the messages during Buildroot builds
+anyways.
+
+Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>
+
+--- host-attr-2.4.48/include/attributes.h.orig	2018-07-19 08:49:19.506854736 -0700
++++ host-attr-2.4.48/include/attributes.h	2018-07-19 08:49:22.132854736 -0700
+@@ -127,10 +127,10 @@
+  */
+ EXPORT int attr_get (const char *__path, const char *__attrname,
+ 			char *__attrvalue, int *__valuelength, int __flags)
+-	__attribute__ ((deprecated ("Use getxattr or lgetxattr instead")));
++	__attribute__ ((deprecated));
+ EXPORT int attr_getf (int __fd, const char *__attrname, char *__attrvalue,
+ 			int *__valuelength, int __flags)
+-	__attribute__ ((deprecated ("Use fgetxattr instead")));
++	__attribute__ ((deprecated));
+ 
+ /*
+  * Set the value of an attribute, creating the attribute if necessary.
+@@ -139,11 +139,11 @@
+ EXPORT int attr_set (const char *__path, const char *__attrname,
+ 			const char *__attrvalue, const int __valuelength,
+ 			int __flags)
+-	__attribute__ ((deprecated ("Use setxattr or lsetxattr instead")));
++	__attribute__ ((deprecated));
+ EXPORT int attr_setf (int __fd, const char *__attrname,
+ 			const char *__attrvalue, const int __valuelength,
+ 			int __flags)
+-	__attribute__ ((deprecated ("Use fsetxattr instead")));
++	__attribute__ ((deprecated));
+ 
+ /*
+  * Remove an attribute.
+@@ -151,9 +151,9 @@
+  */
+ EXPORT int attr_remove (const char *__path, const char *__attrname,
+ 			int __flags)
+-	__attribute__ ((deprecated ("Use removexattr or lremovexattr instead")));
++	__attribute__ ((deprecated));
+ EXPORT int attr_removef (int __fd, const char *__attrname, int __flags)
+-	__attribute__ ((deprecated ("Use fremovexattr instead")));
++	__attribute__ ((deprecated));
+ 
+ /*
+  * List the names and sizes of the values of all the attributes of an object.
+@@ -164,10 +164,10 @@
+  */
+ EXPORT int attr_list(const char *__path, char *__buffer, const int __buffersize,
+ 		int __flags, attrlist_cursor_t *__cursor)
+-	__attribute__ ((deprecated ("Use listxattr or llistxattr instead")));
++	__attribute__ ((deprecated));
+ EXPORT int attr_listf(int __fd, char *__buffer, const int __buffersize,
+ 		int __flags, attrlist_cursor_t *__cursor)
+-	__attribute__ ((deprecated ("Use flistxattr instead")));
++	__attribute__ ((deprecated));
+ 
+ /*
+  * Operate on multiple attributes of the same object simultaneously.
+@@ -188,10 +188,10 @@
+  */
+ EXPORT int attr_multi (const char *__path, attr_multiop_t *__oplist,
+ 			int __count, int __flags)
+-	__attribute__ ((deprecated ("Use getxattr, setxattr, listxattr, removexattr instead")));
++	__attribute__ ((deprecated));
+ EXPORT int attr_multif (int __fd, attr_multiop_t *__oplist,
+ 			int __count, int __flags)
+-	__attribute__ ((deprecated ("Use getxattr, setxattr, listxattr, removexattr instead")));
++	__attribute__ ((deprecated));
+ 
+ #ifdef __cplusplus
+ }

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

* [Buildroot] [PATCH 3 of 3] libglib2: build fix for RHEL6 hosts (GCC 4.4.7)
  2018-07-19 17:20 [Buildroot] [PATCH 1 of 3] host-acl: build fix on RHEL6 hosts (GCC 4.4.7) Hollis Blanchard
  2018-07-19 17:20 ` [Buildroot] [PATCH 2 of 3] host-attr: build fix for " Hollis Blanchard
@ 2018-07-19 17:20 ` Hollis Blanchard
  2018-07-25 21:12 ` [Buildroot] [PATCH 1 of 3] host-acl: build fix on " Thomas Petazzoni
  2 siblings, 0 replies; 9+ messages in thread
From: Hollis Blanchard @ 2018-07-19 17:20 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>

diff --git a/package/libglib2/0004-define-F_SETPIPE_SZ.patch b/package/libglib2/0004-define-F_SETPIPE_SZ.patch
new file mode 100644
--- /dev/null
+++ b/package/libglib2/0004-define-F_SETPIPE_SZ.patch
@@ -0,0 +1,17 @@
+On RHEL6 hosts, fcntl.h doesn't define F_SETPIPE_SZ or F_GETPIPE_SZ.
+
+Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>
+
+--- libglib2-2.56.1/gio/gfile.c.orig	2018-07-12 11:31:13.862255422 -0700
++++ libglib2-2.56.1/gio/gfile.c	2018-07-12 12:06:49.984118708 -0700
+@@ -34,6 +34,10 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#ifndef F_SETPIPE_SZ
++#define F_SETPIPE_SZ 1031
++#define F_GETPIPE_SZ 1032
++#endif
+ #include <errno.h>
+ #endif
+ 

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

* [Buildroot] [PATCH 1 of 3] host-acl: build fix on RHEL6 hosts (GCC 4.4.7)
  2018-07-19 17:20 [Buildroot] [PATCH 1 of 3] host-acl: build fix on RHEL6 hosts (GCC 4.4.7) Hollis Blanchard
  2018-07-19 17:20 ` [Buildroot] [PATCH 2 of 3] host-attr: build fix for " Hollis Blanchard
  2018-07-19 17:20 ` [Buildroot] [PATCH 3 of 3] libglib2: " Hollis Blanchard
@ 2018-07-25 21:12 ` Thomas Petazzoni
  2018-07-25 22:10   ` Hollis Blanchard
  2 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2018-07-25 21:12 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 19 Jul 2018 10:20:42 -0700, Hollis Blanchard wrote:
> This didn't introduce any build warnings, FWIW.
> 
> Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>
> 
> diff --git a/package/acl/0001-pragma-gcc-diagnostic-in-fn.patch b/package/acl/0001-pragma-gcc-diagnostic-in-fn.patch
> new file mode 100644
> --- /dev/null
> +++ b/package/acl/0001-pragma-gcc-diagnostic-in-fn.patch
> @@ -0,0 +1,21 @@
> +build with old GCC versions
> +
> +GCC 4.4.7, as found in RHEL6, reports:
> +	libacl/acl_from_text.c:307: error: #pragma GCC diagnostic not allowed inside functions
> +
> +Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>

Are you sure removing this won't break the build with newer gcc
versions ?

In any case, for all three of your patches, could you please use Git to
generate the package patches themselves ? All three packages being
patched use Git upstream, and we very much like having Git formatted
patches in this case.

However, a larger question is: do you intend to contribute an
autobuilder that tests Buildroot under RHEL6 ? Indeed, you are fixing
just the few packages that are useful to you, but if we are going to
support something as old as RHEL6, then we need to do it properly and
have an autobuilder running on this distro. Do you think this is
something that could be done ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1 of 3] host-acl: build fix on RHEL6 hosts (GCC 4.4.7)
  2018-07-25 21:12 ` [Buildroot] [PATCH 1 of 3] host-acl: build fix on " Thomas Petazzoni
@ 2018-07-25 22:10   ` Hollis Blanchard
  2018-07-26  7:43     ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Hollis Blanchard @ 2018-07-25 22:10 UTC (permalink / raw)
  To: buildroot

On 07/25/2018 02:12 PM, Thomas Petazzoni wrote:
> Hello,
>
> On Thu, 19 Jul 2018 10:20:42 -0700, Hollis Blanchard wrote:
>> This didn't introduce any build warnings, FWIW.
>>
>> Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>
>>
>> diff --git a/package/acl/0001-pragma-gcc-diagnostic-in-fn.patch b/package/acl/0001-pragma-gcc-diagnostic-in-fn.patch
>> new file mode 100644
>> --- /dev/null
>> +++ b/package/acl/0001-pragma-gcc-diagnostic-in-fn.patch
>> @@ -0,0 +1,21 @@
>> +build with old GCC versions
>> +
>> +GCC 4.4.7, as found in RHEL6, reports:
>> +	libacl/acl_from_text.c:307: error: #pragma GCC diagnostic not allowed inside functions
>> +
>> +Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>
> Are you sure removing this won't break the build with newer gcc
> versions ?
I've built it with host gcc 6.3.0 and 4.4.7 and saw no warnings in 
either case. (Aside: patchelf refused to build with 6.3.0, so I had to 
manually build that.)

If some toolchain emits a warning on this code, and if the package is 
built with -Werror somehow, I suppose it's possible to break the build. 
If you'd like, I will try relocating the pragma outside the whole 
function, which could only hide more warnings and thus be less likely to 
break the build.
> In any case, for all three of your patches, could you please use Git to
> generate the package patches themselves ? All three packages being
> patched use Git upstream, and we very much like having Git formatted
> patches in this case.
OK.
> However, a larger question is: do you intend to contribute an
> autobuilder that tests Buildroot under RHEL6 ? Indeed, you are fixing
> just the few packages that are useful to you, but if we are going to
> support something as old as RHEL6, then we need to do it properly and
> have an autobuilder running on this distro. Do you think this is
> something that could be done ?
Not certain, but possible. What does it entail, exactly? Do I just have 
to run 
https://git.buildroot.net/buildroot-test/tree/scripts/autobuild-run via 
cron?

Hollis Blanchard
Mentor Graphics Emulation Division

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

* [Buildroot] [PATCH 1 of 3] host-acl: build fix on RHEL6 hosts (GCC 4.4.7)
  2018-07-25 22:10   ` Hollis Blanchard
@ 2018-07-26  7:43     ` Thomas Petazzoni
  2018-07-26  7:55       ` Arnout Vandecappelle
  2018-07-27 19:30       ` [Buildroot] RHEL6 autobuilder Hollis Blanchard
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2018-07-26  7:43 UTC (permalink / raw)
  To: buildroot

Hello Hollis,

On Wed, 25 Jul 2018 15:10:56 -0700, Hollis Blanchard wrote:

> >> +Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>  
> > Are you sure removing this won't break the build with newer gcc
> > versions ?  
> I've built it with host gcc 6.3.0 and 4.4.7 and saw no warnings in 
> either case. (Aside: patchelf refused to build with 6.3.0, so I had to 
> manually build that.)
> 
> If some toolchain emits a warning on this code, and if the package is 
> built with -Werror somehow, I suppose it's possible to break the build. 

The package doesn't seem to be built with -Werror by default, so it
should be fine. Let's apply your patch, and see if it works fine on the
autobuilders.

> > However, a larger question is: do you intend to contribute an
> > autobuilder that tests Buildroot under RHEL6 ? Indeed, you are fixing
> > just the few packages that are useful to you, but if we are going to
> > support something as old as RHEL6, then we need to do it properly and
> > have an autobuilder running on this distro. Do you think this is
> > something that could be done ?  
> Not certain, but possible. What does it entail, exactly? Do I just have 
> to run 
> https://git.buildroot.net/buildroot-test/tree/scripts/autobuild-run via 
> cron?

It is about running this script yes, but it does not need to be run in
cron, the script itself is an infinite loop that continuously does some
builds and contribute the results to autobuild.buildroot.org.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1 of 3] host-acl: build fix on RHEL6 hosts (GCC 4.4.7)
  2018-07-26  7:43     ` Thomas Petazzoni
@ 2018-07-26  7:55       ` Arnout Vandecappelle
  2018-07-27 19:30       ` [Buildroot] RHEL6 autobuilder Hollis Blanchard
  1 sibling, 0 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2018-07-26  7:55 UTC (permalink / raw)
  To: buildroot



On 26-07-18 09:43, Thomas Petazzoni wrote:
> Hello Hollis,
> 
> On Wed, 25 Jul 2018 15:10:56 -0700, Hollis Blanchard wrote:
> 
>>>> +Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>  
[snip]
>>> However, a larger question is: do you intend to contribute an
>>> autobuilder that tests Buildroot under RHEL6 ? Indeed, you are fixing
>>> just the few packages that are useful to you, but if we are going to
>>> support something as old as RHEL6, then we need to do it properly and
>>> have an autobuilder running on this distro. Do you think this is
>>> something that could be done ?  
>> Not certain, but possible. What does it entail, exactly? Do I just have 
>> to run 
>> https://git.buildroot.net/buildroot-test/tree/scripts/autobuild-run via 
>> cron?
> 
> It is about running this script yes, but it does not need to be run in
> cron, the script itself is an infinite loop that continuously does some
> builds and contribute the results to autobuild.buildroot.org.

 You also need disk space, at least 100GB per job I think? That's the sole
reason why I'm not running an autobuilder myself. It's very annoying to get
spurious failures because of -ENOSPC.

 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] RHEL6 autobuilder
  2018-07-26  7:43     ` Thomas Petazzoni
  2018-07-26  7:55       ` Arnout Vandecappelle
@ 2018-07-27 19:30       ` Hollis Blanchard
  2018-07-30 12:28         ` Thomas Petazzoni
  1 sibling, 1 reply; 9+ messages in thread
From: Hollis Blanchard @ 2018-07-27 19:30 UTC (permalink / raw)
  To: buildroot

On 07/26/2018 12:43 AM, Thomas Petazzoni wrote:
>
>>> However, a larger question is: do you intend to contribute an
>>> autobuilder that tests Buildroot under RHEL6 ? Indeed, you are fixing
>>> just the few packages that are useful to you, but if we are going to
>>> support something as old as RHEL6, then we need to do it properly and
>>> have an autobuilder running on this distro. Do you think this is
>>> something that could be done ?
>> Not certain, but possible. What does it entail, exactly? Do I just have
>> to run
>> https://git.buildroot.net/buildroot-test/tree/scripts/autobuild-run via
>> cron?
> It is about running this script yes, but it does not need to be run in
> cron, the script itself is an infinite loop that continuously does some
> builds and contribute the results to autobuild.buildroot.org.

OK, I set this up on a RHEL6.5 host, and it ran enough to hit the known 
libglib2 problem <https://patchwork.ozlabs.org/patch/947086/>. I 
encountered two issues along the way:

  * buildroot-test/buildroot-autobuild script uses the --detach option
    to 'git checkout', which RHEL6.5's git doesn't know about. I just
    deleted the option and everything's working fine. I can submit a
    patch if you like.
  * buildroot/utils/genrandconfig uses argparse, which doesn't exist in
    RHEL6.5's Python. I avoided the problem for now by supplying an
    alternate Python installation.

I guess I just need HTTP credentials to submit to 
http://autobuild.buildroot.org ?

Hollis Blanchard
Mentor Graphics Emulation Division

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180727/e4b5cf34/attachment.html>

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

* [Buildroot] RHEL6 autobuilder
  2018-07-27 19:30       ` [Buildroot] RHEL6 autobuilder Hollis Blanchard
@ 2018-07-30 12:28         ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2018-07-30 12:28 UTC (permalink / raw)
  To: buildroot

Hello Hollis,

+Arnout in Cc about the --detach option.

On Fri, 27 Jul 2018 12:30:15 -0700, Hollis Blanchard wrote:

> OK, I set this up on a RHEL6.5 host, and it ran enough to hit the known 
> libglib2 problem <https://patchwork.ozlabs.org/patch/947086/>. I 
> encountered two issues along the way:

Great!

>   * buildroot-test/buildroot-autobuild script uses the --detach option
>     to 'git checkout', which RHEL6.5's git doesn't know about. I just
>     deleted the option and everything's working fine. I can submit a
>     patch if you like.

This option was added in commit
66f91eb4409e5efacb1871b8ab2b336c4873b796, and Arnout gave the following
reason:

    Since switching repositories may also switch branches, we use a git
    fetch/checkout sequence instead of doing a git pull. With git pull, the
    branches would be merged instead of switched. To avoid polluting the
    log with the long git message about a detached head, while still
    getting some useful output from git, pass the --detach option to
    git checkout.

Since it's apparently just about logging, perhaps we can just remove it. Arnout ?

>   * buildroot/utils/genrandconfig uses argparse, which doesn't exist in
>     RHEL6.5's Python. I avoided the problem for now by supplying an
>     alternate Python installation.

Sounds good.

> I guess I just need HTTP credentials to submit to 
> http://autobuild.buildroot.org ?

I'll reply to you privately about this.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2018-07-30 12:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-19 17:20 [Buildroot] [PATCH 1 of 3] host-acl: build fix on RHEL6 hosts (GCC 4.4.7) Hollis Blanchard
2018-07-19 17:20 ` [Buildroot] [PATCH 2 of 3] host-attr: build fix for " Hollis Blanchard
2018-07-19 17:20 ` [Buildroot] [PATCH 3 of 3] libglib2: " Hollis Blanchard
2018-07-25 21:12 ` [Buildroot] [PATCH 1 of 3] host-acl: build fix on " Thomas Petazzoni
2018-07-25 22:10   ` Hollis Blanchard
2018-07-26  7:43     ` Thomas Petazzoni
2018-07-26  7:55       ` Arnout Vandecappelle
2018-07-27 19:30       ` [Buildroot] RHEL6 autobuilder Hollis Blanchard
2018-07-30 12:28         ` 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.