All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/xenomai: fix build on arc and riscv32
@ 2021-08-10 16:24 Fabrice Fontaine
  2021-08-12 21:18 ` Thomas Petazzoni
  2023-03-15 14:54 ` Romain Naour
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2021-08-10 16:24 UTC (permalink / raw)
  To: buildroot
  Cc: Romain Naour, Alistair Francis, Matt Weber,
	Thomas De Schampheleire, Fabrice Fontaine

Fix the following build failures on arc and riscv32:

latency.c: In function 'display':
latency.c:326:21: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
  326 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
      |                 ~~~~^
      |                     |
      |                     long int
      |                 %.2lld
  327 |          "priority %d)\n", dt / 3600,
      |                            ~~~~~~~~~
      |                               |
      |                               time_t {aka long long int}

altency.c: In function ‘display’:
altency.c:262:21: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
  262 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
      |                 ~~~~^
      |                     |
      |                     long int
      |                 %.2lld
  263 |          "priority %d)\n", dt / 3600,
      |                            ~~~~~~~~~
      |                               |
      |                               time_t {aka long long int}

Fixes:
 - http://autobuild.buildroot.org/results/448efe22e8fe058a1b354a3c124874e30b9ce138

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...2-Add-disable-demo-testsuite-options.patch | 94 +++++++++++++++++++
 package/xenomai/xenomai.mk                    |  7 +-
 2 files changed, 100 insertions(+), 1 deletion(-)
 create mode 100644 package/xenomai/3.0.10/0002-Add-disable-demo-testsuite-options.patch

diff --git a/package/xenomai/3.0.10/0002-Add-disable-demo-testsuite-options.patch b/package/xenomai/3.0.10/0002-Add-disable-demo-testsuite-options.patch
new file mode 100644
index 0000000000..0a817503b6
--- /dev/null
+++ b/package/xenomai/3.0.10/0002-Add-disable-demo-testsuite-options.patch
@@ -0,0 +1,94 @@
+From 702697cafcec735e55f075594a2990204c8ea17d Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Tue, 10 Aug 2021 18:01:48 +0200
+Subject: [PATCH] Add --disable-{demo,testsuite} options
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Allow the user to disable demo and testsuite to avoid the following
+build failures on arc and riscv32:
+
+latency.c: In function 'display':
+latency.c:326:21: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
+  326 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
+      |                 ~~~~^
+      |                     |
+      |                     long int
+      |                 %.2lld
+  327 |          "priority %d)\n", dt / 3600,
+      |                            ~~~~~~~~~
+      |                               |
+      |                               time_t {aka long long int}
+
+altency.c: In function ‘display’:
+altency.c:262:21: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
+  262 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
+      |                 ~~~~^
+      |                     |
+      |                     long int
+      |                 %.2lld
+  263 |          "priority %d)\n", dt / 3600,
+      |                            ~~~~~~~~~
+      |                               |
+      |                               time_t {aka long long int}
+
+Fixes:
+ - http://autobuild.buildroot.org/results/448efe22e8fe058a1b354a3c124874e30b9ce138
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ Makefile.am  | 12 ++++++++++--
+ configure.ac | 12 ++++++++++++
+ 2 files changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 891e53f66..604644277 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -6,9 +6,17 @@ SUBDIRS = 		\
+ 	config		\
+ 	include		\
+ 	scripts		\
+-	testsuite	\
+-	utils		\
++	utils
++
++if XENO_ENABLE_DEMO
++SUBDIRS += 		\
+ 	demo
++endif
++
++if XENO_ENABLE_TESTSUITE
++SUBDIRS += 		\
++	testsuite
++endif
+ 
+ EXTRA_DIST = kernel debian
+ 
+diff --git a/configure.ac b/configure.ac
+index bd5fd5ba9..29dfd16e5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -200,6 +200,18 @@ test \! x$debug_mode = x && AC_DEFINE(CONFIG_XENO_DEBUG,1,[config])
+ AM_CONDITIONAL(XENO_DEBUG_FULL,[test x$debug_mode = xfull])
+ test x$debug_mode = xfull && AC_DEFINE(CONFIG_XENO_DEBUG_FULL,1,[config])
+ 
++dnl Demo (default: on)
++
++AC_ARG_ENABLE(demo,
++	AS_HELP_STRING([--disable-demo], [Disable demo]))
++AM_CONDITIONAL(XENO_ENABLE_DEMO,[test x$enable_demo != xno])
++
++dnl Testsuite (default: on)
++
++AC_ARG_ENABLE(testsuite,
++	AS_HELP_STRING([--disable-testsuite], [Disable testsuite]))
++AM_CONDITIONAL(XENO_ENABLE_TESTSUITE,[test x$enable_testsuite != xno])
++
+ dnl Low resolution clock (default: off)
+ 
+ unset lores_clock
+-- 
+2.30.2
+
diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk
index 7e3b130085..c1ad0c5df6 100644
--- a/package/xenomai/xenomai.mk
+++ b/package/xenomai/xenomai.mk
@@ -16,6 +16,8 @@ else
 XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2
 XENOMAI_SITE = http://xenomai.org/downloads/xenomai/stable
 endif
+# We're patching configure.ac
+XENOMAI_AUTORECONF = YES
 
 # Exclude all from the hash check, but the latest version.
 ifeq ($(BR2_PACKAGE_XENOMAI)$(BR2_PACKAGE_XENOMAI_LATEST_VERSION),y)
@@ -37,7 +39,10 @@ XENOMAI_INSTALL_STAGING = YES
 XENOMAI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-user
 XENOMAI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-user
 
-XENOMAI_CONF_OPTS += --includedir=/usr/include/xenomai/
+XENOMAI_CONF_OPTS += \
+	--disable-demo \
+	--disable-testsuite \
+	--includedir=/usr/include/xenomai/
 
 ifeq ($(BR2_PACKAGE_XENOMAI_MERCURY),y)
 XENOMAI_CONF_OPTS += --with-core=mercury
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/xenomai: fix build on arc and riscv32
  2021-08-10 16:24 [Buildroot] [PATCH 1/1] package/xenomai: fix build on arc and riscv32 Fabrice Fontaine
@ 2021-08-12 21:18 ` Thomas Petazzoni
  2023-03-15 14:54 ` Romain Naour
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2021-08-12 21:18 UTC (permalink / raw)
  To: Fabrice Fontaine
  Cc: Romain Naour, Alistair Francis, Matt Weber,
	Thomas De Schampheleire, buildroot

Hello Fabrice,

On Tue, 10 Aug 2021 18:24:47 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following build failures on arc and riscv32:
> 
> latency.c: In function 'display':
> latency.c:326:21: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
>   326 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
>       |                 ~~~~^
>       |                     |
>       |                     long int
>       |                 %.2lld
>   327 |          "priority %d)\n", dt / 3600,
>       |                            ~~~~~~~~~
>       |                               |
>       |                               time_t {aka long long int}
> 
> altency.c: In function ‘display’:
> altency.c:262:21: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
>   262 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
>       |                 ~~~~^
>       |                     |
>       |                     long int
>       |                 %.2lld
>   263 |          "priority %d)\n", dt / 3600,
>       |                            ~~~~~~~~~
>       |                               |
>       |                               time_t {aka long long int}
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/448efe22e8fe058a1b354a3c124874e30b9ce138
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...2-Add-disable-demo-testsuite-options.patch | 94 +++++++++++++++++++
>  package/xenomai/xenomai.mk                    |  7 +-
>  2 files changed, 100 insertions(+), 1 deletion(-)
>  create mode 100644 package/xenomai/3.0.10/0002-Add-disable-demo-testsuite-options.patch

I have applied but, could you (1) submit this patch upstream and (2)
report the issue upstream so that they fix it?

Thanks a lot,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/xenomai: fix build on arc and riscv32
  2021-08-10 16:24 [Buildroot] [PATCH 1/1] package/xenomai: fix build on arc and riscv32 Fabrice Fontaine
  2021-08-12 21:18 ` Thomas Petazzoni
@ 2023-03-15 14:54 ` Romain Naour
  1 sibling, 0 replies; 3+ messages in thread
From: Romain Naour @ 2023-03-15 14:54 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot
  Cc: Romain Naour, Alistair Francis, Matt Weber, Thomas De Schampheleire

Hello Fabrice,

Le 10/08/2021 à 18:24, Fabrice Fontaine a écrit :
> Fix the following build failures on arc and riscv32:
> 
> latency.c: In function 'display':
> latency.c:326:21: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
>   326 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
>       |                 ~~~~^
>       |                     |
>       |                     long int
>       |                 %.2lld
>   327 |          "priority %d)\n", dt / 3600,
>       |                            ~~~~~~~~~
>       |                               |
>       |                               time_t {aka long long int}
> 
> altency.c: In function ‘display’:
> altency.c:262:21: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
>   262 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
>       |                 ~~~~^
>       |                     |
>       |                     long int
>       |                 %.2lld
>   263 |          "priority %d)\n", dt / 3600,
>       |                            ~~~~~~~~~
>       |                               |
>       |                               time_t {aka long long int}
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/448efe22e8fe058a1b354a3c124874e30b9ce138
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...2-Add-disable-demo-testsuite-options.patch | 94 +++++++++++++++++++
>  package/xenomai/xenomai.mk                    |  7 +-
>  2 files changed, 100 insertions(+), 1 deletion(-)
>  create mode 100644 package/xenomai/3.0.10/0002-Add-disable-demo-testsuite-options.patch
> 
> diff --git a/package/xenomai/3.0.10/0002-Add-disable-demo-testsuite-options.patch b/package/xenomai/3.0.10/0002-Add-disable-demo-testsuite-options.patch
> new file mode 100644
> index 0000000000..0a817503b6
> --- /dev/null
> +++ b/package/xenomai/3.0.10/0002-Add-disable-demo-testsuite-options.patch
> @@ -0,0 +1,94 @@
> +From 702697cafcec735e55f075594a2990204c8ea17d Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Tue, 10 Aug 2021 18:01:48 +0200
> +Subject: [PATCH] Add --disable-{demo,testsuite} options

Actually we have an option named BR2_PACKAGE_XENOMAI_TESTSUITE to keep the
Xenomai testsuite on the target.

The testsuite actually provide some tools used to configure and fine tuning
Xenomai on the target. testsuite should have been named tools in the xenomai
project...

Xenomai users may be interested by some tools from the testsuite like dohell and
latency to measure the system latencies.

Same about the demos like altency and cyclictest (cyclictest may be provided by
rt-test package).

Maybe we should disable the Werror while building Xenomai instead of disabling
the testsuite entirely.

Also, I'm not sure if there is any Xenomai user on arc or riscv32.
The cobalt core only support arm, aarch64 and x86.
The ipipe kernel had a ppc32 support but there is no new commit since 3 years.

See:
https://source.denx.de/Xenomai/xenomai/-/tree/master/kernel/cobalt/arch
https://source.denx.de/Xenomai

Best regards,
Romain

> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Allow the user to disable demo and testsuite to avoid the following
> +build failures on arc and riscv32:
> +
> +latency.c: In function 'display':
> +latency.c:326:21: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'time_t' {aka 'long long int'} [-Werror=format=]
> +  326 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
> +      |                 ~~~~^
> +      |                     |
> +      |                     long int
> +      |                 %.2lld
> +  327 |          "priority %d)\n", dt / 3600,
> +      |                            ~~~~~~~~~
> +      |                               |
> +      |                               time_t {aka long long int}
> +
> +altency.c: In function ‘display’:
> +altency.c:262:21: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘time_t’ {aka ‘long long int’} [-Werror=format=]
> +  262 |         ("RTT|  %.2ld:%.2ld:%.2ld  (%s, %Ld us period, "
> +      |                 ~~~~^
> +      |                     |
> +      |                     long int
> +      |                 %.2lld
> +  263 |          "priority %d)\n", dt / 3600,
> +      |                            ~~~~~~~~~
> +      |                               |
> +      |                               time_t {aka long long int}
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/448efe22e8fe058a1b354a3c124874e30b9ce138
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + Makefile.am  | 12 ++++++++++--
> + configure.ac | 12 ++++++++++++
> + 2 files changed, 22 insertions(+), 2 deletions(-)
> +
> +diff --git a/Makefile.am b/Makefile.am
> +index 891e53f66..604644277 100644
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +@@ -6,9 +6,17 @@ SUBDIRS = 		\
> + 	config		\
> + 	include		\
> + 	scripts		\
> +-	testsuite	\
> +-	utils		\
> ++	utils
> ++
> ++if XENO_ENABLE_DEMO
> ++SUBDIRS += 		\
> + 	demo
> ++endif
> ++
> ++if XENO_ENABLE_TESTSUITE
> ++SUBDIRS += 		\
> ++	testsuite
> ++endif
> + 
> + EXTRA_DIST = kernel debian
> + 
> +diff --git a/configure.ac b/configure.ac
> +index bd5fd5ba9..29dfd16e5 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -200,6 +200,18 @@ test \! x$debug_mode = x && AC_DEFINE(CONFIG_XENO_DEBUG,1,[config])
> + AM_CONDITIONAL(XENO_DEBUG_FULL,[test x$debug_mode = xfull])
> + test x$debug_mode = xfull && AC_DEFINE(CONFIG_XENO_DEBUG_FULL,1,[config])
> + 
> ++dnl Demo (default: on)
> ++
> ++AC_ARG_ENABLE(demo,
> ++	AS_HELP_STRING([--disable-demo], [Disable demo]))
> ++AM_CONDITIONAL(XENO_ENABLE_DEMO,[test x$enable_demo != xno])
> ++
> ++dnl Testsuite (default: on)
> ++
> ++AC_ARG_ENABLE(testsuite,
> ++	AS_HELP_STRING([--disable-testsuite], [Disable testsuite]))
> ++AM_CONDITIONAL(XENO_ENABLE_TESTSUITE,[test x$enable_testsuite != xno])
> ++
> + dnl Low resolution clock (default: off)
> + 
> + unset lores_clock
> +-- 
> +2.30.2
> +
> diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk
> index 7e3b130085..c1ad0c5df6 100644
> --- a/package/xenomai/xenomai.mk
> +++ b/package/xenomai/xenomai.mk
> @@ -16,6 +16,8 @@ else
>  XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2
>  XENOMAI_SITE = http://xenomai.org/downloads/xenomai/stable
>  endif
> +# We're patching configure.ac
> +XENOMAI_AUTORECONF = YES
>  
>  # Exclude all from the hash check, but the latest version.
>  ifeq ($(BR2_PACKAGE_XENOMAI)$(BR2_PACKAGE_XENOMAI_LATEST_VERSION),y)
> @@ -37,7 +39,10 @@ XENOMAI_INSTALL_STAGING = YES
>  XENOMAI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-user
>  XENOMAI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-user
>  
> -XENOMAI_CONF_OPTS += --includedir=/usr/include/xenomai/
> +XENOMAI_CONF_OPTS += \
> +	--disable-demo \
> +	--disable-testsuite \
> +	--includedir=/usr/include/xenomai/
>  
>  ifeq ($(BR2_PACKAGE_XENOMAI_MERCURY),y)
>  XENOMAI_CONF_OPTS += --with-core=mercury

_______________________________________________
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:[~2023-03-15 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 16:24 [Buildroot] [PATCH 1/1] package/xenomai: fix build on arc and riscv32 Fabrice Fontaine
2021-08-12 21:18 ` Thomas Petazzoni
2023-03-15 14:54 ` 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.