Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pppd: disable for sparc and sparc64 architectures
@ 2023-10-15 20:47 Bernd Kuhls
  2023-11-01 22:39 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Kuhls @ 2023-10-15 20:47 UTC (permalink / raw)
  To: buildroot

pppd fails to build on sparc and sparc64 architectures with a
redefinition of 'struct termio' error, with no proper fix or workaround
for now. See discussions in [1] and [2] and picocom source code in [3].

[1] http://patchwork.ozlabs.org/project/buildroot/patch/20191227204520.1500501-1-fontaine.fabrice@gmail.com/
[2] http://patchwork.ozlabs.org/project/buildroot/patch/20200511142602.46170-1-vadim4j@gmail.com/
[3] https://github.com/npat-efault/picocom/blob/master/termbits2.h#L37

So let's disable it for now on sparc and sparc64 architectures.

Fixes:
http://autobuild.buildroot.net/results/c0a/c0a9dd410664dec670f90966e12b76e68f9883ee/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/network-manager/Config.in | 1 +
 package/pppd/Config.in            | 8 ++++++++
 package/rp-pppoe/Config.in        | 1 +
 3 files changed, 10 insertions(+)

diff --git a/package/network-manager/Config.in b/package/network-manager/Config.in
index 57d7543131..8c284024e1 100644
--- a/package/network-manager/Config.in
+++ b/package/network-manager/Config.in
@@ -48,6 +48,7 @@ config BR2_PACKAGE_NETWORK_MANAGER_MODEM_MANAGER
 
 config BR2_PACKAGE_NETWORK_MANAGER_PPPD
 	bool "pppd support"
+	depends on !BR2_sparc64 && !BR2_sparc # pppd
 	select BR2_PACKAGE_PPPD
 	help
 	  This option enables support for PPPD daemon
diff --git a/package/pppd/Config.in b/package/pppd/Config.in
index 88c2180a9b..3ff8123aab 100644
--- a/package/pppd/Config.in
+++ b/package/pppd/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_PPPD
 	bool "pppd"
+	depends on !BR2_sparc64 && !BR2_sparc
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU
 	select BR2_PACKAGE_OPENSSL if BR2_TOOLCHAIN_USES_GLIBC
@@ -22,5 +23,12 @@ config BR2_PACKAGE_PPPD_FILTER
 endif
 
 comment "pppd needs a toolchain w/ dynamic library"
+	depends on !BR2_sparc64 && !BR2_sparc
 	depends on BR2_STATIC_LIBS
 	depends on BR2_USE_MMU
+
+# pppd is disabled for sparc and sparc64 architectures because it fails
+# to build with a redefinition of 'struct termio' error, with no proper
+# fix or workaround for now
+comment "pppd is disabled for sparc and sparc64 architectures"
+	depends on BR2_sparc64 || BR2_sparc
diff --git a/package/rp-pppoe/Config.in b/package/rp-pppoe/Config.in
index 6ff005a1e1..27eb0276db 100644
--- a/package/rp-pppoe/Config.in
+++ b/package/rp-pppoe/Config.in
@@ -4,6 +4,7 @@ comment "rp-pppoe needs a toolchain w/ dynamic library"
 
 config BR2_PACKAGE_RP_PPPOE
 	bool "rp-pppoe"
+	depends on !BR2_sparc64 && !BR2_sparc # pppd
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # fork()
 	select BR2_PACKAGE_PPPD
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/pppd: disable for sparc and sparc64 architectures
  2023-10-15 20:47 [Buildroot] [PATCH 1/1] package/pppd: disable for sparc and sparc64 architectures Bernd Kuhls
@ 2023-11-01 22:39 ` Thomas Petazzoni via buildroot
  2024-07-12 19:17   ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-11-01 22:39 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

On Sun, 15 Oct 2023 22:47:53 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> diff --git a/package/pppd/Config.in b/package/pppd/Config.in
> index 88c2180a9b..3ff8123aab 100644
> --- a/package/pppd/Config.in
> +++ b/package/pppd/Config.in
> @@ -1,5 +1,6 @@
>  config BR2_PACKAGE_PPPD
>  	bool "pppd"
> +	depends on !BR2_sparc64 && !BR2_sparc

If we wanted to merge that, it should be:

config BR2_PACKAGE_PPPD_ARCH_SUPPORTS
	bool
	default y if !BR2_sparc64 && !BR2_sparc

However, it's never nice to have to do something like this. Has this
issue been reported to upstream pppd?

Also, it seems like the ppp package in Debian builds on sparc64, see
https://packages.debian.org/sid/ppp. How do they achieve this? I
haven't spotted a particular patch/quirk (but I looked quickly).

In
https://github.com/ppp-project/ppp/blob/master/pppd/termios_linux.h#L14,
the pppd code base is definitely playing with fire. I'm not sure what
they are trying to do, but they know that the inclusion of kernel
headers will cause some redefinition... Perhaps something to discuss
with ppp upstream first.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/pppd: disable for sparc and sparc64 architectures
  2023-11-01 22:39 ` Thomas Petazzoni via buildroot
@ 2024-07-12 19:17   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-12 19:17 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Bernd Kuhls, Thomas Petazzoni

Hello Bernd,

On Wed, 1 Nov 2023 23:39:31 +0100
Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:

> If we wanted to merge that, it should be:
> 
> config BR2_PACKAGE_PPPD_ARCH_SUPPORTS
> 	bool
> 	default y if !BR2_sparc64 && !BR2_sparc
> 
> However, it's never nice to have to do something like this. Has this
> issue been reported to upstream pppd?
> 
> Also, it seems like the ppp package in Debian builds on sparc64, see
> https://packages.debian.org/sid/ppp. How do they achieve this? I
> haven't spotted a particular patch/quirk (but I looked quickly).
> 
> In
> https://github.com/ppp-project/ppp/blob/master/pppd/termios_linux.h#L14,
> the pppd code base is definitely playing with fire. I'm not sure what
> they are trying to do, but they know that the inclusion of kernel
> headers will cause some redefinition... Perhaps something to discuss
> with ppp upstream first.

I finally took some time, narrowed down the issue, and wrote a
work-around. The real fix was in fact done very recently in the Linux
kernel, but it will only appear in Linux 6.10, so we need a workaround
for toolchains that use headers < 6.10.

See my commit at:

  https://gitlab.com/buildroot.org/buildroot/-/commit/b162aab7c6da6b45dc5ba9ad30b59b4362e2dc2e

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-07-12 19:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-15 20:47 [Buildroot] [PATCH 1/1] package/pppd: disable for sparc and sparc64 architectures Bernd Kuhls
2023-11-01 22:39 ` Thomas Petazzoni via buildroot
2024-07-12 19:17   ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox