All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC
@ 2020-12-11 12:12 Veronika Kremneva
  2020-12-15 21:24 ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: Veronika Kremneva @ 2020-12-11 12:12 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Veronika Kremneva <kremneva@synopsys.com>
---
 toolchain/toolchain-buildroot/Config.in | 2 --
 1 file changed, 2 deletions(-)

diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 2058ff1eb9..74aa9abc25 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -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.
-- 
2.16.2

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

* [Buildroot] [PATCH] toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC
  2020-12-11 12:12 [Buildroot] [PATCH] toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC Veronika Kremneva
@ 2020-12-15 21:24 ` Arnout Vandecappelle
  2020-12-15 21:42   ` Thomas Petazzoni
  2020-12-15 22:15   ` Romain Naour
  0 siblings, 2 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2020-12-15 21:24 UTC (permalink / raw)
  To: buildroot



On 11/12/2020 13:12, Veronika Kremneva wrote:
> 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.
> 
> Signed-off-by: Veronika Kremneva <kremneva@synopsys.com>
> ---
>  toolchain/toolchain-buildroot/Config.in | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
> index 2058ff1eb9..74aa9abc25 100644
> --- a/toolchain/toolchain-buildroot/Config.in
> +++ b/toolchain/toolchain-buildroot/Config.in
> @@ -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


> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
>  	help
>  	  This option selects glibc as the C library for the
>  	  cross-compilation toolchain.
> 

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

* [Buildroot] [PATCH] toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC
  2020-12-15 21:24 ` Arnout Vandecappelle
@ 2020-12-15 21:42   ` Thomas Petazzoni
  2020-12-15 22:15   ` Romain Naour
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2020-12-15 21:42 UTC (permalink / raw)
  To: buildroot

On Tue, 15 Dec 2020 22:24:12 +0100
Arnout Vandecappelle <arnout@mind.be> 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.
> 
>  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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH] toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC
  2020-12-15 21:24 ` Arnout Vandecappelle
  2020-12-15 21:42   ` Thomas Petazzoni
@ 2020-12-15 22:15   ` Romain Naour
  1 sibling, 0 replies; 4+ messages in thread
From: Romain Naour @ 2020-12-15 22:15 UTC (permalink / raw)
  To: buildroot

Hello Arnout,

Le 15/12/2020 ? 22:24, Arnout Vandecappelle a ?crit?:
> 
> 
> On 11/12/2020 13:12, Veronika Kremneva wrote:
>> 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.
>>
>> Signed-off-by: Veronika Kremneva <kremneva@synopsys.com>
>> ---
>>  toolchain/toolchain-buildroot/Config.in | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
>> index 2058ff1eb9..74aa9abc25 100644
>> --- a/toolchain/toolchain-buildroot/Config.in
>> +++ b/toolchain/toolchain-buildroot/Config.in
>> @@ -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?

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.

> 
>  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

> 
>  Regards,
>  Arnout
> 
> 
>> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
>>  	help
>>  	  This option selects glibc as the C library for the
>>  	  cross-compilation toolchain.
>>

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

end of thread, other threads:[~2020-12-15 22:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11 12:12 [Buildroot] [PATCH] toolchain-buildroot: glibc: Remove the default choice of built-in SunRPC Veronika Kremneva
2020-12-15 21:24 ` Arnout Vandecappelle
2020-12-15 21:42   ` Thomas Petazzoni
2020-12-15 22:15   ` Romain Naour

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.