Skip to contentSkip to conversation

This patch is needed for host-util-linux

PATCH In review Giulio Benetti 3 participants 14 messages Feb 1, 2022 – Feb 12, 2022

lore
Share & tools
lore
#0 lore raw

cover This patch is needed for host-util-linux

host-util-linux is very used, so please apply this asap, otherwise a lot of builds will fail.

Giulio Benetti (1):
package/util-linux: fix host build failure

 package/util-linux/util-linux.mk | 1 +
 1 file changed, 1 insertion(+)
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 1/1 package/util-linux: fix host build failure

The UTIL_LINUX_FIX_DISK_UTILS_COMPILE workaround is needed for host building too. So let's add it to HOST_UTIL_LINUX_POST_PATCH_HOOKS. host-util-linux is used a lot, so this patch fixes a lot of future builds.

---
 package/util-linux/util-linux.mk | 1 +
 1 file changed, 1 insertion(+)
package/util-linux/util-linux.mk +1 -0
index e59ef7dadc..5a4ff64d01 100644
@@ -41,6 +41,7 @@ define UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 	touch $(@D)/disk-utils/raw.8
 endef
 UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
+HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 
 HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [URGENT 1/1] package/util-linux: fix host build failure

Quoted 4 lines · Giulio Benetti

The UTIL_LINUX_FIX_DISK_UTILS_COMPILE workaround is needed for host building too. So let's add it to HOST_UTIL_LINUX_POST_PATCH_HOOKS. host-util-linux is used a lot, so this patch fixes a lot of future builds.

I was too fast...

Fixes:
http://autobuild.buildroot.net/results/b8c/b8cb40efc036a01802c914544cd4fc29dfd67af6//

and others that are coming out.

Best regards!

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 10 lines
---
  package/util-linux/util-linux.mk | 1 +
  1 file changed, 1 insertion(+)
package/util-linux/util-linux.mk +0 -0
index e59ef7dadc..5a4ff64d01 100644

package/util-linux/util-linux.mk define UTIL_LINUX_FIX_DISK_UTILS_COMPILE · line 47

Quoted 7 lines
package/util-linux/util-linux.mk +1 -0
@@ -41,6 +41,7 @@ define UTIL_LINUX_FIX_DISK_UTILS_COMPILE
  	touch $(@D)/disk-utils/raw.8
  endef
  UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
+HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 
  HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Re: [Buildroot] [URGENT 1/1] package/util-linux: fix host build failure

In reply to Giulio Benetti
Quoted 4 lines · Giulio Benetti

The UTIL_LINUX_FIX_DISK_UTILS_COMPILE workaround is needed for host building too. So let's add it to HOST_UTIL_LINUX_POST_PATCH_HOOKS. host-util-linux is used a lot, so this patch fixes a lot of future builds.

Darn, I tested that, both with and without BR2_PACKAGE_HOST_UTIL_LINUX set. I
don't understand what went wrong in my test...

Anyway, applied to master, thanks.

Regards,
Arnout

Quoted 11 lines
---
  package/util-linux/util-linux.mk | 1 +
  1 file changed, 1 insertion(+)
package/util-linux/util-linux.mk +0 -0
index e59ef7dadc..5a4ff64d01 100644

package/util-linux/util-linux.mk define UTIL_LINUX_FIX_DISK_UTILS_COMPILE · line 47

Quoted 7 lines
package/util-linux/util-linux.mk +1 -0
@@ -41,6 +41,7 @@ define UTIL_LINUX_FIX_DISK_UTILS_COMPILE
  	touch $(@D)/disk-utils/raw.8
  endef
  UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
+HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 
  HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw

Re: [Buildroot] [URGENT 1/1] package/util-linux: fix host build failure

Hello Arnout, Giulio,

Quoted 8 lines · Arnout Vandecappelle
Quoted 4 lines · Giulio Benetti

The UTIL_LINUX_FIX_DISK_UTILS_COMPILE workaround is needed for host building too. So let's add it to HOST_UTIL_LINUX_POST_PATCH_HOOKS. host-util-linux is used a lot, so this patch fixes a lot of future builds.

Darn, I tested that, both with and without BR2_PACKAGE_HOST_UTIL_LINUX set. I
don't understand what went wrong in my test...

The raw support depends on the available toolchain headers, see e.g. package/util-linux/Config.in:

config BR2_PACKAGE_UTIL_LINUX_RAW
bool "raw"
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14 help
Build a linux raw character device

Or according to [1] '--disable-raw' for the host build should do the trick too...

Regards,
Peter

[1] https://github.com/util-linux/util-linux/issues/1577

Quoted 23 lines

Anyway, applied to master, thanks.

Regards,
Arnout

Quoted 16 lines
---
  package/util-linux/util-linux.mk | 1 +
  1 file changed, 1 insertion(+)
package/util-linux/util-linux.mk +1 -0
index e59ef7dadc..5a4ff64d01 100644
@@ -41,6 +41,7 @@ define UTIL_LINUX_FIX_DISK_UTILS_COMPILE
  	touch $(@D)/disk-utils/raw.8
  endef
  UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
+HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 
Quoted 2 lines

package/util-linux/util-linux.mk define UTIL_LINUX_FIX_DISK_UTILS_COMPILE · line 47

Quoted 2 lines
package/util-linux/util-linux.mk +0 -0
  HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw

Re: [Buildroot] [URGENT 1/1] package/util-linux: fix host build failure

Hi Peter,

Quoted 16 lines · Peter Seiderer

Hello Arnout, Giulio,

Quoted 8 lines · Arnout Vandecappelle
Quoted 4 lines · Giulio Benetti

The UTIL_LINUX_FIX_DISK_UTILS_COMPILE workaround is needed for host building too. So let's add it to HOST_UTIL_LINUX_POST_PATCH_HOOKS. host-util-linux is used a lot, so this patch fixes a lot of future builds.

Darn, I tested that, both with and without BR2_PACKAGE_HOST_UTIL_LINUX set. I
don't understand what went wrong in my test...

The raw support depends on the available toolchain headers, see e.g. package/util-linux/Config.in:

Quoted 8 lines

config BR2_PACKAGE_UTIL_LINUX_RAW
bool "raw"
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14 help
Build a linux raw character device

Or according to [1] '--disable-raw' for the host build should do the trick too...

I was in hurry to produce the patch last night, so I went for the fastest way. Can you give a try with --disable-raw and eventually submit the patch? That would save some time while building. Also because host-util-linux is used a lot

Thank you!
Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 28 lines

Regards,
Peter

[1] https://github.com/util-linux/util-linux/issues/1577

Quoted 23 lines

Anyway, applied to master, thanks.

Regards,
Arnout

Quoted 16 lines
---
   package/util-linux/util-linux.mk | 1 +
   1 file changed, 1 insertion(+)
package/util-linux/util-linux.mk +1 -0
index e59ef7dadc..5a4ff64d01 100644
@@ -41,6 +41,7 @@ define UTIL_LINUX_FIX_DISK_UTILS_COMPILE
   	touch $(@D)/disk-utils/raw.8
   endef
   UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
+HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 
Quoted 3 lines
Quoted 2 lines

package/util-linux/util-linux.mk define UTIL_LINUX_FIX_DISK_UTILS_COMPILE · line 47

Quoted 2 lines
package/util-linux/util-linux.mk +0 -0
   HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#6 lore raw

Re: [Buildroot] [URGENT 1/1] package/util-linux: fix host build failure

Hello Giulio,

Quoted 25 lines · Giulio Benetti

Hi Peter,

Quoted 22 lines · Peter Seiderer

Hello Arnout, Giulio,

Quoted 8 lines · Arnout Vandecappelle
Quoted 4 lines · Giulio Benetti

The UTIL_LINUX_FIX_DISK_UTILS_COMPILE workaround is needed for host building too. So let's add it to HOST_UTIL_LINUX_POST_PATCH_HOOKS. host-util-linux is used a lot, so this patch fixes a lot of future builds.

Darn, I tested that, both with and without BR2_PACKAGE_HOST_UTIL_LINUX set. I
don't understand what went wrong in my test...

The raw support depends on the available toolchain headers, see e.g. package/util-linux/Config.in:

config BR2_PACKAGE_UTIL_LINUX_RAW
bool "raw"
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14 help
Build a linux raw character device

Quoted 5 lines
Quoted 2 lines

Or according to [1] '--disable-raw' for the host build should do the trick too...

I was in hurry to produce the patch last night, so I went for the fastest way. Can you give a try with --disable-raw and eventually submit

Thanks for taking care!

Quoted 2 lines

the patch? That would save some time while building. Also because host-util-linux is used a lot

Sorry, could not reproduce the host-build failure on my system, seems the toolchain is too up-to-date (openSUSE Tumbleweed - gcc-11.2.1) ;-)

But can provide an RFC patch for testing...

Regards,
Peter

Quoted 3 lines

Thank you!
Best regards

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#7 lore raw

Re: [Buildroot] [URGENT 1/1] package/util-linux: fix host build failure

Quoted 37 lines · Peter Seiderer

Hello Giulio,

Quoted 25 lines · Giulio Benetti

Hi Peter,

Quoted 22 lines · Peter Seiderer

Hello Arnout, Giulio,

Quoted 8 lines · Arnout Vandecappelle
Quoted 4 lines · Giulio Benetti

The UTIL_LINUX_FIX_DISK_UTILS_COMPILE workaround is needed for host building too. So let's add it to HOST_UTIL_LINUX_POST_PATCH_HOOKS. host-util-linux is used a lot, so this patch fixes a lot of future builds.

Darn, I tested that, both with and without BR2_PACKAGE_HOST_UTIL_LINUX set. I
don't understand what went wrong in my test...

The raw support depends on the available toolchain headers, see e.g. package/util-linux/Config.in:

config BR2_PACKAGE_UTIL_LINUX_RAW
bool "raw"
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14 help
Build a linux raw character device

Quoted 5 lines
Quoted 2 lines

Or according to [1] '--disable-raw' for the host build should do the trick too...

I was in hurry to produce the patch last night, so I went for the fastest way. Can you give a try with --disable-raw and eventually submit

Thanks for taking care!

Quoted 7 lines
Quoted 2 lines

the patch? That would save some time while building. Also because host-util-linux is used a lot

Sorry, could not reproduce the host-build failure on my system, seems the toolchain is too up-to-date (openSUSE Tumbleweed - gcc-11.2.1) ;-)

But can provide an RFC patch for testing...

I give a go on my pc and if it works I add

Are you on IRC? If yes my nick is benettig you can ping me there :-)

Best regards

Signature · 6 lines
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

PATCH 1/1 package/util-linux: improve host build failure fix

As suggested by Peter Seiderer package util-linux doesn't need raw support when built for host, so let's remove:
HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE in favor of:
HOST_UTIL_LINUX_CONF_OPTS += --disable-raw
This is a better approach than my commit:
https://git.buildroot.net/buildroot/commit/?id=d895bd973b35fde10d3dd7db530d9e4782926497

---
 package/util-linux/util-linux.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/util-linux/util-linux.mk +2 -2
index 5a4ff64d01..f3297257cf 100644
@@ -41,7 +41,6 @@ define UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 	touch $(@D)/disk-utils/raw.8
 endef
 UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
-HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 
 HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 
@@ -49,7 +48,8 @@ HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 HOST_UTIL_LINUX_CONF_OPTS = \
 	--without-systemd \
 	--with-systemdsystemunitdir=no \
-	--without-python
+	--without-python \
+	--disable-raw
 
 ifneq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES)$(BR2_PACKAGE_UTIL_LINUX_CRAMFS)$(BR2_PACKAGE_UTIL_LINUX_FSCK)$(BR2_PACKAGE_UTIL_LINUX_LOSETUP),)
 UTIL_LINUX_SELINUX_MODULES = fstools
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Tested-by Reviewed-by on v1 1/1
#9 lore raw

Re: [Buildroot] [PATCH] package/util-linux: improve host build failure fix

Hello Giulio,

Quoted 10 lines · Giulio Benetti

As suggested by Peter Seiderer package util-linux doesn't need raw support when built for host, so let's remove:
HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE in favor of:
HOST_UTIL_LINUX_CONF_OPTS += --disable-raw
This is a better approach than my commit:
https://git.buildroot.net/buildroot/commit/?id=d895bd973b35fde10d3dd7db530d9e4782926497

Tested with registry.gitlab.com/buildroot.org/buildroot/base:20220105.2314:

- reverted 'package/util-linux: fix host build failure' (d895bd973b35fde10d3dd7db530d9e4782926497) --> build fails with: No rule to make target 'disk-utils/raw.8'

- build with 'package/util-linux: fix host build failure' (d895bd973b35fde10d3dd7db530d9e4782926497) --> build o.k.

- build with this additional patch
--> build o.k.

Quoted 9 lines
---
 package/util-linux/util-linux.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/util-linux/util-linux.mk +0 -0
index 5a4ff64d01..f3297257cf 100644

package/util-linux/util-linux.mk define UTIL_LINUX_FIX_DISK_UTILS_COMPILE · line 46

Quoted 7 lines
package/util-linux/util-linux.mk +0 -1
@@ -41,7 +41,6 @@ define UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 	touch $(@D)/disk-utils/raw.8
 endef
 UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
-HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 
 HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 

The line above reads:

# We also don't want the host-python dependency

package/util-linux/util-linux.mk HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf · line 52

Quoted 7 lines
package/util-linux/util-linux.mk +2 -1
@@ -49,7 +48,8 @@ HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 HOST_UTIL_LINUX_CONF_OPTS = \
 	--without-systemd \
 	--with-systemdsystemunitdir=no \
-	--without-python
+	--without-python \
+	--disable-raw

So I would move the 'disable-raw' down to line 196ff (or below to an extra 'HOST_UTIL_LINUX_CONF_OPTS +=' section with comment why...

With this change you can add my:

Regards,
Peter

package/util-linux/util-linux.mk HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf · line 55

Quoted 3 lines
package/util-linux/util-linux.mk +0 -0
 ifneq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES)$(BR2_PACKAGE_UTIL_LINUX_CRAMFS)$(BR2_PACKAGE_UTIL_LINUX_FSCK)$(BR2_PACKAGE_UTIL_LINUX_LOSETUP),)
 UTIL_LINUX_SELINUX_MODULES = fstools

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#10 lore raw

Re: [Buildroot] [PATCH] package/util-linux: improve host build failure fix

Hi Peter,

Quoted 43 lines · Peter Seiderer

Hello Giulio,

Quoted 10 lines · Giulio Benetti

As suggested by Peter Seiderer package util-linux doesn't need raw support when built for host, so let's remove:
HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE in favor of:
HOST_UTIL_LINUX_CONF_OPTS += --disable-raw
This is a better approach than my commit:
https://git.buildroot.net/buildroot/commit/?id=d895bd973b35fde10d3dd7db530d9e4782926497

Tested with registry.gitlab.com/buildroot.org/buildroot/base:20220105.2314:

- reverted 'package/util-linux: fix host build failure' (d895bd973b35fde10d3dd7db530d9e4782926497) --> build fails with: No rule to make target 'disk-utils/raw.8'

- build with 'package/util-linux: fix host build failure' (d895bd973b35fde10d3dd7db530d9e4782926497) --> build o.k.

- build with this additional patch
--> build o.k.

Quoted 14 lines
---
  package/util-linux/util-linux.mk | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
package/util-linux/util-linux.mk +0 -1
index 5a4ff64d01..f3297257cf 100644
@@ -41,7 +41,6 @@ define UTIL_LINUX_FIX_DISK_UTILS_COMPILE
  	touch $(@D)/disk-utils/raw.8
  endef
  UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
-HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 
Quoted 6 lines

package/util-linux/util-linux.mk define UTIL_LINUX_FIX_DISK_UTILS_COMPILE · line 46

Quoted 2 lines
package/util-linux/util-linux.mk +0 -0
  HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 

The line above reads:

# We also don't want the host-python dependency

Oh, you're totally right

Quoted 10 lines

package/util-linux/util-linux.mk HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf · line 52

Quoted 7 lines
package/util-linux/util-linux.mk +2 -1
@@ -49,7 +48,8 @@ HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
  HOST_UTIL_LINUX_CONF_OPTS = \
  	--without-systemd \
  	--with-systemdsystemunitdir=no \
-	--without-python
+	--without-python \
+	--disable-raw

So I would move the 'disable-raw' down to line 196ff (or below to an extra 'HOST_UTIL_LINUX_CONF_OPTS +=' section with comment why...

Yes

Quoted 11 lines

With this change you can add my:

Regards,
Peter

Quoted 3 lines
package/util-linux/util-linux.mk +0 -0
  ifneq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES)$(BR2_PACKAGE_UTIL_LINUX_CRAMFS)$(BR2_PACKAGE_UTIL_LINUX_FSCK)$(BR2_PACKAGE_UTIL_LINUX_LOSETUP),)
  UTIL_LINUX_SELINUX_MODULES = fstools

Thank you!

Going to reply with V2.

Best regards

Signature · 6 lines
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#11 lore raw

PATCH v2 1/1 package/util-linux: improve host build failure fix

In reply to Peter Seiderer

As suggested by Peter Seiderer package util-linux doesn't need raw support when built for host, so let's remove:
HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE in favor of:
HOST_UTIL_LINUX_CONF_OPTS += --disable-raw
This is a better approach than my commit:
https://git.buildroot.net/buildroot/commit/?id=d895bd973b35fde10d3dd7db530d9e4782926497

---
V1->V2:
* move --disable-raw to a dedicated HOST_UTIL_LINUX_CONF_OPTS as suggested by Peter Seiderer. This avoid ambiguity since previously it was under the comment "# We also don't want the host-python dependency".

---
 package/util-linux/util-linux.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
package/util-linux/util-linux.mk +5 -1
index 5a4ff64d01..40fd518a58 100644
@@ -41,7 +41,6 @@ define UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 	touch $(@D)/disk-utils/raw.8
 endef
 UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
-HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 
 HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 
@@ -202,6 +201,11 @@ HOST_UTIL_LINUX_CONF_OPTS += \
 	--without-ncursesw \
 	--without-tinfo
 
+# Disable raw command since starting from version 2.37 needs a
+# work-around to build but in the end we don't need at all.
+HOST_UTIL_LINUX_CONF_OPTS += \
+	--disable-raw
+
 ifeq ($(BR2_PACKAGE_HOST_UTIL_LINUX),y)
 HOST_UTIL_LINUX_CONF_OPTS += --disable-makeinstall-chown
 # disable commands that have ncurses dependency, as well as
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#12 lore raw

Re: [Buildroot] [PATCH v2] package/util-linux: improve host build failure fix

Quoted 8 lines · Giulio Benetti

As suggested by Peter Seiderer package util-linux doesn't need raw support when built for host, so let's remove:
HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE in favor of:
HOST_UTIL_LINUX_CONF_OPTS += --disable-raw
This is a better approach than my commit:
https://git.buildroot.net/buildroot/commit/?id=d895bd973b35fde10d3dd7db530d9e4782926497

Quoted 4 lines

Applied to master, thanks.

Regards,
Arnout

Quoted 23 lines

---
V1->V2:
* move --disable-raw to a dedicated HOST_UTIL_LINUX_CONF_OPTS as suggested by Peter Seiderer. This avoid ambiguity since previously it was under the comment "# We also don't want the host-python dependency".

---
  package/util-linux/util-linux.mk | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
package/util-linux/util-linux.mk +0 -1
index 5a4ff64d01..40fd518a58 100644
@@ -41,7 +41,6 @@ define UTIL_LINUX_FIX_DISK_UTILS_COMPILE
  	touch $(@D)/disk-utils/raw.8
  endef
  UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
-HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
 
  HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf
 
@@ -202,6 +201,11 @@ HOST_UTIL_LINUX_CONF_OPTS += \
  	--without-ncursesw \

package/util-linux/util-linux.mk HOST_UTIL_LINUX_CONF_OPTS += \ · line 211

Quoted 10 lines
package/util-linux/util-linux.mk +5 -0
  	--without-tinfo
 
+# Disable raw command since starting from version 2.37 needs a
+# work-around to build but in the end we don't need at all.
+HOST_UTIL_LINUX_CONF_OPTS += \
+	--disable-raw
+
  ifeq ($(BR2_PACKAGE_HOST_UTIL_LINUX),y)
  HOST_UTIL_LINUX_CONF_OPTS += --disable-makeinstall-chown
  # disable commands that have ncurses dependency, as well as

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#13 lore raw

Re: [Buildroot] [URGENT 1/1] package/util-linux: fix host build failure

In reply to Peter Seiderer

Hi Peter,

Quoted 29 lines · Peter Seiderer

Hello Giulio,

Quoted 25 lines · Giulio Benetti

Hi Peter,

Quoted 22 lines · Peter Seiderer

Hello Arnout, Giulio,

Quoted 8 lines · Arnout Vandecappelle
Quoted 4 lines · Giulio Benetti

The UTIL_LINUX_FIX_DISK_UTILS_COMPILE workaround is needed for host building too. So let's add it to HOST_UTIL_LINUX_POST_PATCH_HOOKS. host-util-linux is used a lot, so this patch fixes a lot of future builds.

Darn, I tested that, both with and without BR2_PACKAGE_HOST_UTIL_LINUX set. I
don't understand what went wrong in my test...

The raw support depends on the available toolchain headers, see e.g. package/util-linux/Config.in:

config BR2_PACKAGE_UTIL_LINUX_RAW
bool "raw"
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14 help
Build a linux raw character device

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Or according to [1] '--disable-raw' for the host build should do the trick too...

I was in hurry to produce the patch last night, so I went for the fastest way. Can you give a try with --disable-raw and eventually submit

Thanks for taking care!

I've just sent a patch like you've suggested:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Quoted 5 lines
Quoted 2 lines

the patch? That would save some time while building. Also because host-util-linux is used a lot

Sorry, could not reproduce the host-build failure on my system, seems the toolchain is too up-to-date (openSUSE Tumbleweed - gcc-11.2.1) ;-)

For this situation you can use this docker:
docker pull registry.gitlab.com/buildroot.org/buildroot/base:20220105.2314

There gcc is version 10.2.1 and it's the official one used for build-testing buildroot defconfigs. You can find it also in buildroot/.gitlab-ci.yml

Can you give a go with that docker by reproducing the failure and then applying the latest patch?

That way you can give a Reviewed-by: or also a Tested-by: you

Thank you!
Kind regards

Signature · 6 lines
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot