Skip to contentSkip to conversation

toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC

PATCH New Veronika Kremneva 4 participants 4 messages Dec 11, 2020 – Dec 15, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC

There is an error present when building lmbench with glibc-2.26 and above:
----------------------------->8--------------------------- Makefile:226: recipe for target '../bin/arc/lib_udp.o' failed make[2]: *** [../bin/arc/lib_udp.o] Error 1
In file included from lib_unix.c:9:
bench.h:39:10: fatal error: rpc/rpc.h: No such file or directory
39 | #include <rpc/rpc.h>

      |          ^~~~~~~~~~~

compilation terminated.
Makefile:228: recipe for target '../bin/arc/lib_unix.o' failed make[2]: *** [../bin/arc/lib_unix.o] Error 1
In file included from lib_timing.c:17:
bench.h:39:10: fatal error: rpc/rpc.h: No such file or directory
39 | #include <rpc/rpc.h>

      |          ^~~~~~~~~~~

compilation terminated. ----------------------------->8--------------------------- You can find more details about failed builds here:
http://autobuild.buildroot.net/?reason=lmbench-3.0-a9

This happens because native implementation of Sun RPC was removed from glibc and moved to a separate library (libtirpc):
https://fedoraproject.org/wiki/Changes/SunRPCRemoval

Yet in Buildroot we still assume BR2_TOOLCHAIN_HAS_NATIVE_RPC in case of glibc, which is not true.

The following patch removes the default assumption that glibc has a built-in implementation of SunRPC.

---
 toolchain/toolchain-buildroot/Config.in | 2 --
 1 file changed, 2 deletions(-)
toolchain/toolchain-buildroot/Config.in +0 -2
index 2058ff1eb9..74aa9abc25 100644
@@ -59,8 +59,6 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
 	depends on !BR2_powerpc_SPE
 	depends on BR2_RISCV_ISA_RVA || !BR2_riscv
 	select BR2_TOOLCHAIN_USES_GLIBC
-	# our glibc.mk enables RPC support
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  This option selects glibc as the C library for the
 	  cross-compilation toolchain.
Signature · 1 line
2.16.2
#1 lore raw

PATCH 1/1 toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC

Quoted 40 lines · Veronika Kremneva

There is an error present when building lmbench with glibc-2.26 and above:
----------------------------->8--------------------------- Makefile:226: recipe for target '../bin/arc/lib_udp.o' failed make[2]: *** [../bin/arc/lib_udp.o] Error 1
In file included from lib_unix.c:9:
bench.h:39:10: fatal error: rpc/rpc.h: No such file or directory
39 | #include <rpc/rpc.h>

      |          ^~~~~~~~~~~

compilation terminated.
Makefile:228: recipe for target '../bin/arc/lib_unix.o' failed make[2]: *** [../bin/arc/lib_unix.o] Error 1
In file included from lib_timing.c:17:
bench.h:39:10: fatal error: rpc/rpc.h: No such file or directory
39 | #include <rpc/rpc.h>

      |          ^~~~~~~~~~~

compilation terminated. ----------------------------->8--------------------------- You can find more details about failed builds here:
http://autobuild.buildroot.net/?reason=lmbench-3.0-a9

This happens because native implementation of Sun RPC was removed from glibc and moved to a separate library (libtirpc):
https://fedoraproject.org/wiki/Changes/SunRPCRemoval

Yet in Buildroot we still assume BR2_TOOLCHAIN_HAS_NATIVE_RPC in case of glibc, which is not true.

The following patch removes the default assumption that glibc has a built-in implementation of SunRPC.

---
 toolchain/toolchain-buildroot/Config.in | 2 --
 1 file changed, 2 deletions(-)
toolchain/toolchain-buildroot/Config.in +0 -0
index 2058ff1eb9..74aa9abc25 100644

toolchain/toolchain-buildroot/Config.in config BR2_TOOLCHAIN_BUILDROOT_GLIBC · line 62

Quoted 4 lines
toolchain/toolchain-buildroot/Config.in +0 -1
@@ -59,8 +59,6 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
 	depends on !BR2_powerpc_SPE
 	depends on BR2_RISCV_ISA_RVA || !BR2_riscv
 	select BR2_TOOLCHAIN_USES_GLIBC
-	# our glibc.mk enables RPC support

As you see from this comment, we *do* enable rpc support in our glibc build.

However, this feature is removed in glibc 2.32. In Buildroot, we are still
using glibc 2.31 - except for ARC and RISCV-32. So I guess you're using one of those. Well, based on your e-mail, probably ARC :-). Please note in the commit message that it is really removed in glibc 2.32.

I think this obsolete RPC was a transitory measure for when some versions of
glibc still had RPC bundled. Now, I indeed think we can remove it.

In addition to this, we should also remove the --enable-obsolete-rpc flag from
glibc.mk. And maybe also check if nsswitch.conf needs to be adapted as well.

Romain, can you think of anything else that has to change?

Ideally we should be able to remove BR2_TOOLCHAIN_HAS_NATIVE_RPC completely,
but there are external toolchains that still have it bundled, so we can't do that yet.

Thomas, the script that generates the external bootlin toolchain
Config.in.options files will need to be adapted as well.

Regards,
Arnout

Quoted 5 lines
toolchain/toolchain-buildroot/Config.in +0 -1
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  This option selects glibc as the C library for the
 	  cross-compilation toolchain.
#2 lore raw

PATCH 1/1 toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC

Quoted 13 lines · On Tue, 15 Dec 2020 22:24:12 +0100 Arnout Vandecappelle <[email protected]> wrote:

As you see from this comment, we *do* enable rpc support in our glibc build.

However, this feature is removed in glibc 2.32. In Buildroot, we are still
using glibc 2.31 - except for ARC and RISCV-32. So I guess you're using one of those. Well, based on your e-mail, probably ARC :-). Please note in the commit message that it is really removed in glibc 2.32.

I think this obsolete RPC was a transitory measure for when some versions of
glibc still had RPC bundled. Now, I indeed think we can remove it.

In addition to this, we should also remove the --enable-obsolete-rpc flag from
glibc.mk. And maybe also check if nsswitch.conf needs to be adapted as well.

Quoted 8 lines

Romain, can you think of anything else that has to change?

Ideally we should be able to remove BR2_TOOLCHAIN_HAS_NATIVE_RPC completely,
but there are external toolchains that still have it bundled, so we can't do that yet.

Thomas, the script that generates the external bootlin toolchain
Config.in.options files will need to be adapted as well.

Actually, Romain has already sent patches doing that, and I made some comments. He then sent some patches to fixup the config fragments provided by toolchains.bootlin.com, and used by the script.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC

In reply to Arnout Vandecappelle

Hello Arnout,

Le 15/12/2020 ? 22:24, Arnout Vandecappelle a ?crit?:

Quoted 55 lines · Veronika Kremneva
Quoted 40 lines

There is an error present when building lmbench with glibc-2.26 and above:
----------------------------->8--------------------------- Makefile:226: recipe for target '../bin/arc/lib_udp.o' failed make[2]: *** [../bin/arc/lib_udp.o] Error 1
In file included from lib_unix.c:9:
bench.h:39:10: fatal error: rpc/rpc.h: No such file or directory
39 | #include <rpc/rpc.h>

      |          ^~~~~~~~~~~

compilation terminated.
Makefile:228: recipe for target '../bin/arc/lib_unix.o' failed make[2]: *** [../bin/arc/lib_unix.o] Error 1
In file included from lib_timing.c:17:
bench.h:39:10: fatal error: rpc/rpc.h: No such file or directory
39 | #include <rpc/rpc.h>

      |          ^~~~~~~~~~~

compilation terminated. ----------------------------->8--------------------------- You can find more details about failed builds here:
http://autobuild.buildroot.net/?reason=lmbench-3.0-a9

This happens because native implementation of Sun RPC was removed from glibc and moved to a separate library (libtirpc):
https://fedoraproject.org/wiki/Changes/SunRPCRemoval

Yet in Buildroot we still assume BR2_TOOLCHAIN_HAS_NATIVE_RPC in case of glibc, which is not true.

The following patch removes the default assumption that glibc has a built-in implementation of SunRPC.

---
 toolchain/toolchain-buildroot/Config.in | 2 --
 1 file changed, 2 deletions(-)
toolchain/toolchain-buildroot/Config.in +0 -0
index 2058ff1eb9..74aa9abc25 100644

toolchain/toolchain-buildroot/Config.in config BR2_TOOLCHAIN_BUILDROOT_GLIBC · line 62

Quoted 4 lines
toolchain/toolchain-buildroot/Config.in +0 -1
@@ -59,8 +59,6 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
 	depends on !BR2_powerpc_SPE
 	depends on BR2_RISCV_ISA_RVA || !BR2_riscv
 	select BR2_TOOLCHAIN_USES_GLIBC
-	# our glibc.mk enables RPC support

As you see from this comment, we *do* enable rpc support in our glibc build.

However, this feature is removed in glibc 2.32. In Buildroot, we are still
using glibc 2.31 - except for ARC and RISCV-32. So I guess you're using one of those. Well, based on your e-mail, probably ARC :-). Please note in the commit message that it is really removed in glibc 2.32.

Quoted 7 lines

I think this obsolete RPC was a transitory measure for when some versions of
glibc still had RPC bundled. Now, I indeed think we can remove it.

In addition to this, we should also remove the --enable-obsolete-rpc flag from
glibc.mk. And maybe also check if nsswitch.conf needs to be adapted as well.

Romain, can you think of anything else that has to change?

I have a patch series for the remaining changes:
http://patchwork.ozlabs.org/project/buildroot/list/?series=219086

As far I can see, when a package depends on RPC it can use either BR2_TOOLCHAIN_HAS_NATIVE_RPC or BR2_PACKAGE_LIBTIRPC.

I don't think we have to update nsswitch.conf.

Quoted 7 lines

Ideally we should be able to remove BR2_TOOLCHAIN_HAS_NATIVE_RPC completely,
but there are external toolchains that still have it bundled, so we can't do that yet.

Thomas, the script that generates the external bootlin toolchain
Config.in.options files will need to be adapted as well.

Indeed but we have to update generated defconfig fragment from toolchain builder project.

Best regards,
Romain

Quoted 10 lines

Regards,
Arnout

Quoted 5 lines
toolchain/toolchain-buildroot/Config.in +0 -1
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  This option selects glibc as the C library for the
 	  cross-compilation toolchain.