Skip to contentSkip to conversation

package/libselinux: host gcc at least 4.7

PATCH New Matt Weber 3 participants 9 messages Aug 13, 2018

lore
Share & tools
lore

Matt Weber

author
#0 lore raw

PATCH 1/1 package/libselinux: host gcc at least 4.7

Resolves.
label_file.h: In function 'compile_regex':
label_file.h:353: error: '__ATOMIC_ACQUIRE' undeclared (first use in this function) label_file.h:353: error: (Each undeclared identifier is reported only once label_file.h:353: error: for each function it appears in.) label_file.h:405: error: '__ATOMIC_RELEASE' undeclared (first use in this function)

Fixes:
http://autobuild.buildroot.net/results/3d3/3d3ecf63236bb41abca7d1996619ba697a7cbdb8/
http://autobuild.buildroot.net/results/e98/e98789785a03e238e7cdca0ad07526d70fcfa30b/

---
 package/libselinux/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/libselinux/Config.in +2 -0
index 6be816db77..74d87bef1a 100644
@@ -6,6 +6,8 @@ config BR2_PACKAGE_LIBSELINUX
 	depends on BR2_TOOLCHAIN_USES_GLIBC
 	# Toolchain issue: "fixup not contained within frag"
 	depends on !BR2_arc
+	# Uses __ATOMIC_*
+	depends on BR2_HOST_GCC_AT_LEAST_4_7
 	select BR2_PACKAGE_LIBSEPOL
 	select BR2_PACKAGE_PCRE
 	help
Signature · 1 line
2.17.0
#1 lore raw

PATCH 1/1 package/libselinux: host gcc at least 4.7

Hi Matt,

Quoted 21 lines · Matt Weber

Resolves.
label_file.h: In function 'compile_regex':
label_file.h:353: error: '__ATOMIC_ACQUIRE' undeclared (first use in this function) label_file.h:353: error: (Each undeclared identifier is reported only once label_file.h:353: error: for each function it appears in.) label_file.h:405: error: '__ATOMIC_RELEASE' undeclared (first use in this function)

Fixes:
http://autobuild.buildroot.net/results/3d3/3d3ecf63236bb41abca7d1996619ba697a7cbdb8/
http://autobuild.buildroot.net/results/e98/e98789785a03e238e7cdca0ad07526d70fcfa30b/

---
 package/libselinux/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/libselinux/Config.in +0 -0
index 6be816db77..74d87bef1a 100644

package/libselinux/Config.in config BR2_PACKAGE_LIBSELINUX · line 10

Quoted 5 lines
package/libselinux/Config.in +2 -0
@@ -6,6 +6,8 @@ config BR2_PACKAGE_LIBSELINUX
 	depends on BR2_TOOLCHAIN_USES_GLIBC
 	# Toolchain issue: "fixup not contained within frag"
 	depends on !BR2_arc
+	# Uses __ATOMIC_*
+	depends on BR2_HOST_GCC_AT_LEAST_4_7

You add the dependency to the target libselinux. But libselinux is not even enabled in the build configs you reference in the commit log. The failing package is host-libselinux.

We don't see target libselinux failures in autobuilders because we don't test target toolchains older than gcc 4.7. This change is probably correct though, but it doesn't fix the autobuilders. In any case, for target libselinux you need to propagate this dependency to all libselinux reverse dependencies.

baruch

Quoted 3 lines
package/libselinux/Config.in +0 -0
 	select BR2_PACKAGE_LIBSEPOL
 	select BR2_PACKAGE_PCRE
 	help
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 package/libselinux: host gcc at least 4.7

Baruch,

Quoted 35 lines · Baruch Siach

Hi Matt,

Quoted 21 lines · Matt Weber

Resolves.
label_file.h: In function 'compile_regex':
label_file.h:353: error: '__ATOMIC_ACQUIRE' undeclared (first use in this function) label_file.h:353: error: (Each undeclared identifier is reported only once label_file.h:353: error: for each function it appears in.) label_file.h:405: error: '__ATOMIC_RELEASE' undeclared (first use in this function)

Fixes:
http://autobuild.buildroot.net/results/3d3/3d3ecf63236bb41abca7d1996619ba697a7cbdb8/
http://autobuild.buildroot.net/results/e98/e98789785a03e238e7cdca0ad07526d70fcfa30b/

---
 package/libselinux/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/libselinux/Config.in +0 -0
index 6be816db77..74d87bef1a 100644

package/libselinux/Config.in config BR2_PACKAGE_LIBSELINUX · line 10

Quoted 5 lines
package/libselinux/Config.in +2 -0
@@ -6,6 +6,8 @@ config BR2_PACKAGE_LIBSELINUX
      depends on BR2_TOOLCHAIN_USES_GLIBC
      # Toolchain issue: "fixup not contained within frag"
      depends on !BR2_arc
+     # Uses __ATOMIC_*
+     depends on BR2_HOST_GCC_AT_LEAST_4_7

You add the dependency to the target libselinux. But libselinux is not even enabled in the build configs you reference in the commit log. The failing package is host-libselinux.

Quoted 4 lines

We don't see target libselinux failures in autobuilders because we don't test target toolchains older than gcc 4.7. This change is probably correct though, but it doesn't fix the autobuilders. In any case, for target libselinux you need to propagate this dependency to all libselinux reverse dependencies.

Ah true..... host-. So I need to add a randconfig update. I'll fix the dependency propogation you mention and add a second patch for the cfg generation filtering

#3 lore raw

PATCH 1/1 package/libselinux: host gcc at least 4.7

Hi Matt,

Quoted 33 lines · Matthew Weber
Quoted 32 lines · Baruch Siach
Quoted 21 lines · Matt Weber

Resolves.
label_file.h: In function 'compile_regex':
label_file.h:353: error: '__ATOMIC_ACQUIRE' undeclared (first use in this function) label_file.h:353: error: (Each undeclared identifier is reported only once label_file.h:353: error: for each function it appears in.) label_file.h:405: error: '__ATOMIC_RELEASE' undeclared (first use in this function)

Fixes:
http://autobuild.buildroot.net/results/3d3/3d3ecf63236bb41abca7d1996619ba697a7cbdb8/
http://autobuild.buildroot.net/results/e98/e98789785a03e238e7cdca0ad07526d70fcfa30b/

---
 package/libselinux/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/libselinux/Config.in +0 -0
index 6be816db77..74d87bef1a 100644

package/libselinux/Config.in config BR2_PACKAGE_LIBSELINUX · line 10

Quoted 5 lines
package/libselinux/Config.in +2 -0
@@ -6,6 +6,8 @@ config BR2_PACKAGE_LIBSELINUX
      depends on BR2_TOOLCHAIN_USES_GLIBC
      # Toolchain issue: "fixup not contained within frag"
      depends on !BR2_arc
+     # Uses __ATOMIC_*
+     depends on BR2_HOST_GCC_AT_LEAST_4_7

You add the dependency to the target libselinux. But libselinux is not even enabled in the build configs you reference in the commit log. The failing package is host-libselinux.

Quoted 8 lines
Quoted 4 lines

We don't see target libselinux failures in autobuilders because we don't test target toolchains older than gcc 4.7. This change is probably correct though, but it doesn't fix the autobuilders. In any case, for target libselinux you need to propagate this dependency to all libselinux reverse dependencies.

Ah true..... host-. So I need to add a randconfig update. I'll fix the dependency propogation you mention and add a second patch for the cfg generation filtering

Note that you need to propagate the host- dependency as well.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#4 lore raw

PATCH 1/1 package/libselinux: host gcc at least 4.7

Baruch

Quoted 42 lines · Baruch Siach

Hi Matt,

Quoted 38 lines · Matthew Weber
Quoted 36 lines · Baruch Siach
Quoted 21 lines · Matt Weber

Resolves.
label_file.h: In function 'compile_regex':
label_file.h:353: error: '__ATOMIC_ACQUIRE' undeclared (first use in this function) label_file.h:353: error: (Each undeclared identifier is reported only once label_file.h:353: error: for each function it appears in.) label_file.h:405: error: '__ATOMIC_RELEASE' undeclared (first use in this function)

Fixes:
http://autobuild.buildroot.net/results/3d3/3d3ecf63236bb41abca7d1996619ba697a7cbdb8/
http://autobuild.buildroot.net/results/e98/e98789785a03e238e7cdca0ad07526d70fcfa30b/

---
 package/libselinux/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/libselinux/Config.in +0 -0
index 6be816db77..74d87bef1a 100644

package/libselinux/Config.in config BR2_PACKAGE_LIBSELINUX · line 10

Quoted 5 lines
package/libselinux/Config.in +2 -0
@@ -6,6 +6,8 @@ config BR2_PACKAGE_LIBSELINUX
      depends on BR2_TOOLCHAIN_USES_GLIBC
      # Toolchain issue: "fixup not contained within frag"
      depends on !BR2_arc
+     # Uses __ATOMIC_*
+     depends on BR2_HOST_GCC_AT_LEAST_4_7

You add the dependency to the target libselinux. But libselinux is not even enabled in the build configs you reference in the commit log. The failing package is host-libselinux.

We don't see target libselinux failures in autobuilders because we don't test target toolchains older than gcc 4.7. This change is probably correct though, but it doesn't fix the autobuilders. In any case, for target libselinux you need to propagate this dependency to all libselinux reverse dependencies.

Quoted 5 lines
Quoted 3 lines

Ah true..... host-. So I need to add a randconfig update. I'll fix the dependency propogation you mention and add a second patch for the cfg generation filtering

Note that you need to propagate the host- dependency as well.

You mean in utils/genrandconfig's update for this, right?

For the original patch above, I'm assuming I should propogate the depends on BR2_HOST_GCC_AT_LEAST_4_7 but also add depends on BR2_GCC_AT_LEAST_4_7.

Matt

#5 lore raw

PATCH 1/1 package/libselinux: host gcc at least 4.7

Baruch,

Quoted 49 lines · Matthew Weber

Baruch

Quoted 46 lines · Baruch Siach

Hi Matt,

Quoted 41 lines · Matthew Weber
Quoted 32 lines · Baruch Siach
Quoted 21 lines · Matt Weber

Resolves.
label_file.h: In function 'compile_regex':
label_file.h:353: error: '__ATOMIC_ACQUIRE' undeclared (first use in this function) label_file.h:353: error: (Each undeclared identifier is reported only once label_file.h:353: error: for each function it appears in.) label_file.h:405: error: '__ATOMIC_RELEASE' undeclared (first use in this function)

Fixes:
http://autobuild.buildroot.net/results/3d3/3d3ecf63236bb41abca7d1996619ba697a7cbdb8/
http://autobuild.buildroot.net/results/e98/e98789785a03e238e7cdca0ad07526d70fcfa30b/

---
 package/libselinux/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/libselinux/Config.in +0 -0
index 6be816db77..74d87bef1a 100644

package/libselinux/Config.in config BR2_PACKAGE_LIBSELINUX · line 10

Quoted 5 lines
package/libselinux/Config.in +2 -0
@@ -6,6 +6,8 @@ config BR2_PACKAGE_LIBSELINUX
      depends on BR2_TOOLCHAIN_USES_GLIBC
      # Toolchain issue: "fixup not contained within frag"
      depends on !BR2_arc
+     # Uses __ATOMIC_*
+     depends on BR2_HOST_GCC_AT_LEAST_4_7

You add the dependency to the target libselinux. But libselinux is not even enabled in the build configs you reference in the commit log. The failing package is host-libselinux.

Quoted 4 lines

We don't see target libselinux failures in autobuilders because we don't test target toolchains older than gcc 4.7. This change is probably correct though, but it doesn't fix the autobuilders. In any case, for target libselinux you need to propagate this dependency to all libselinux reverse dependencies.

Ah true..... host-. So I need to add a randconfig update. I'll fix the dependency propogation you mention and add a second patch for the cfg generation filtering

Quoted 8 lines
Quoted 1 line

Note that you need to propagate the host- dependency as well.

You mean in utils/genrandconfig's update for this, right?

For the original patch above, I'm assuming I should propogate the depends on BR2_HOST_GCC_AT_LEAST_4_7 but also add depends on BR2_GCC_AT_LEAST_4_7.

Just realized this is going to get messy. Here's more detail.

For these, I'll propagate the BR2_HOST_GCC_AT_LEAST_4_7 and BR2_GCC_AT_LEAST_4_7 based on the .mk having a make depends on host-libselinux
android-tools
restorecond
checkpolicy
setools
libsemanage

For these just, BR2_GCC_AT_LEAST_4_7 as there is no host-libselinux built. busybox

Matt

#6 lore raw

PATCH 1/1 package/libselinux: host gcc at least 4.7

In reply to Matthew Weber

Hi Matt,

Quoted 40 lines · Matthew Weber
Quoted 39 lines · Baruch Siach
Quoted 38 lines · Matthew Weber
Quoted 36 lines · Baruch Siach
Quoted 21 lines · Matt Weber

Resolves.
label_file.h: In function 'compile_regex':
label_file.h:353: error: '__ATOMIC_ACQUIRE' undeclared (first use in this function) label_file.h:353: error: (Each undeclared identifier is reported only once label_file.h:353: error: for each function it appears in.) label_file.h:405: error: '__ATOMIC_RELEASE' undeclared (first use in this function)

Fixes:
http://autobuild.buildroot.net/results/3d3/3d3ecf63236bb41abca7d1996619ba697a7cbdb8/
http://autobuild.buildroot.net/results/e98/e98789785a03e238e7cdca0ad07526d70fcfa30b/

---
 package/libselinux/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/libselinux/Config.in +0 -0
index 6be816db77..74d87bef1a 100644

package/libselinux/Config.in config BR2_PACKAGE_LIBSELINUX · line 10

Quoted 5 lines
package/libselinux/Config.in +2 -0
@@ -6,6 +6,8 @@ config BR2_PACKAGE_LIBSELINUX
      depends on BR2_TOOLCHAIN_USES_GLIBC
      # Toolchain issue: "fixup not contained within frag"
      depends on !BR2_arc
+     # Uses __ATOMIC_*
+     depends on BR2_HOST_GCC_AT_LEAST_4_7

You add the dependency to the target libselinux. But libselinux is not even enabled in the build configs you reference in the commit log. The failing package is host-libselinux.

We don't see target libselinux failures in autobuilders because we don't test target toolchains older than gcc 4.7. This change is probably correct though, but it doesn't fix the autobuilders. In any case, for target libselinux you need to propagate this dependency to all libselinux reverse dependencies.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Ah true..... host-. So I need to add a randconfig update. I'll fix the dependency propogation you mention and add a second patch for the cfg generation filtering

Note that you need to propagate the host- dependency as well.

You mean in utils/genrandconfig's update for this, right?

No. I mean all host and target packages that have host-libselinux in their _DEPENDENCIES. Otherwise, enabling any of them would cause a build of host-libselinux regardless of the Config.in dependency.

Isn't it easier to apply the alternative patch that uses the older __sync routines for older gcc?

Quoted 3 lines

For the original patch above, I'm assuming I should propogate the depends on BR2_HOST_GCC_AT_LEAST_4_7 but also add depends on BR2_GCC_AT_LEAST_4_7.

Both dependencies need to be propagated, as far as I understand.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#7 lore raw

PATCH 1/1 package/libselinux: host gcc at least 4.7

Baruch,

Quoted 56 lines · Baruch Siach

Hi Matt,

Quoted 40 lines · Matthew Weber
Quoted 39 lines · Baruch Siach
Quoted 38 lines · Matthew Weber
Quoted 36 lines · Baruch Siach
Quoted 21 lines · Matt Weber

Resolves.
label_file.h: In function 'compile_regex':
label_file.h:353: error: '__ATOMIC_ACQUIRE' undeclared (first use in this function) label_file.h:353: error: (Each undeclared identifier is reported only once label_file.h:353: error: for each function it appears in.) label_file.h:405: error: '__ATOMIC_RELEASE' undeclared (first use in this function)

Fixes:
http://autobuild.buildroot.net/results/3d3/3d3ecf63236bb41abca7d1996619ba697a7cbdb8/
http://autobuild.buildroot.net/results/e98/e98789785a03e238e7cdca0ad07526d70fcfa30b/

---
 package/libselinux/Config.in | 2 ++
 1 file changed, 2 insertions(+)
package/libselinux/Config.in +0 -0
index 6be816db77..74d87bef1a 100644

package/libselinux/Config.in config BR2_PACKAGE_LIBSELINUX · line 10

Quoted 5 lines
package/libselinux/Config.in +2 -0
@@ -6,6 +6,8 @@ config BR2_PACKAGE_LIBSELINUX
      depends on BR2_TOOLCHAIN_USES_GLIBC
      # Toolchain issue: "fixup not contained within frag"
      depends on !BR2_arc
+     # Uses __ATOMIC_*
+     depends on BR2_HOST_GCC_AT_LEAST_4_7

You add the dependency to the target libselinux. But libselinux is not even enabled in the build configs you reference in the commit log. The failing package is host-libselinux.

We don't see target libselinux failures in autobuilders because we don't test target toolchains older than gcc 4.7. This change is probably correct though, but it doesn't fix the autobuilders. In any case, for target libselinux you need to propagate this dependency to all libselinux reverse dependencies.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Ah true..... host-. So I need to add a randconfig update. I'll fix the dependency propogation you mention and add a second patch for the cfg generation filtering

Note that you need to propagate the host- dependency as well.

You mean in utils/genrandconfig's update for this, right?

No. I mean all host and target packages that have host-libselinux in their _DEPENDENCIES. Otherwise, enabling any of them would cause a build of host-libselinux regardless of the Config.in dependency.

Quoted 9 lines

Isn't it easier to apply the alternative patch that uses the older __sync routines for older gcc?

Quoted 3 lines

For the original patch above, I'm assuming I should propogate the depends on BR2_HOST_GCC_AT_LEAST_4_7 but also add depends on BR2_GCC_AT_LEAST_4_7.

Both dependencies need to be propagated, as far as I understand.

http://patchwork.ozlabs.org/project/buildroot/list/?series=60561

#8 lore raw

PATCH 1/1 package/libselinux: host gcc at least 4.7

In reply to Baruch Siach

Hello,

Quoted 6 lines · Baruch Siach

No. I mean all host and target packages that have host-libselinux in their _DEPENDENCIES. Otherwise, enabling any of them would cause a build of host-libselinux regardless of the Config.in dependency.

Isn't it easier to apply the alternative patch that uses the older __sync routines for older gcc?

Is it would be much easier. The question is: is this patch correct ? I am not super familiar with the semantic of those atomic operations, so I'm not super confident in reviewing Hollis proposal. But if you think Hollis patch is correct, a Acked-by or Reviewed-by on it would be good.

Thanks!

Thomas

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