All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/kmsxx: remove erroneous use of static-libc option
@ 2021-08-06 12:50 Tomi Valkeinen
  2021-08-06 12:50 ` [Buildroot] [PATCH 2/2] package/kmsxx: update to latest Tomi Valkeinen
  2021-08-08  8:50 ` [Buildroot] [PATCH 1/2] package/kmsxx: remove erroneous use of static-libc option Yann E. MORIN
  0 siblings, 2 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2021-08-06 12:50 UTC (permalink / raw)
  To: buildroot; +Cc: Tomi Valkeinen, Peter Seiderer, Yann E . MORIN

For some reason the build file sets -Dstatic-libc=true option when
BR2_STATIC_LIBS is set. This is not correct, or at least I cannot figure
out the reason for this, so remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---

Re-sending, as first attempt was rejected as I was not subscribed to the
list.

 package/kmsxx/kmsxx.mk | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/package/kmsxx/kmsxx.mk b/package/kmsxx/kmsxx.mk
index fd40ff8e73..871ecaf85c 100644
--- a/package/kmsxx/kmsxx.mk
+++ b/package/kmsxx/kmsxx.mk
@@ -17,12 +17,6 @@ KMSXX_CONF_OPTS = \
 	-Duse-system-fmt=true \
 	-Duse-system-pybind11=true
 
-ifeq ($(BR2_STATIC_LIBS),y)
-KMSXX_CONF_OPTS += -Dstatic-libc=true
-else
-KMSXX_CONF_OPTS += -Dstatic-libc=false
-endif
-
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
 KMSXX_CXXFLAGS += $(TARGET_CXXFLAGS) -O0
 endif
-- 
2.25.1

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

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

* [Buildroot] [PATCH 2/2] package/kmsxx: update to latest
  2021-08-06 12:50 [Buildroot] [PATCH 1/2] package/kmsxx: remove erroneous use of static-libc option Tomi Valkeinen
@ 2021-08-06 12:50 ` Tomi Valkeinen
  2021-08-08  9:29   ` Yann E. MORIN
  2021-08-08  8:50 ` [Buildroot] [PATCH 1/2] package/kmsxx: remove erroneous use of static-libc option Yann E. MORIN
  1 sibling, 1 reply; 9+ messages in thread
From: Tomi Valkeinen @ 2021-08-06 12:50 UTC (permalink / raw)
  To: buildroot; +Cc: Tomi Valkeinen, Peter Seiderer, Yann E . MORIN

We can drop all the patches as they have been sorted out in upstream.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
 ...0001-meson-add-use-system-fmt-option.patch | 46 ------------------
 ...meson-add-use-system-pybind11-option.patch | 43 -----------------
 ...ly-build-py-in-case-pykms-is-enabled.patch | 48 -------------------
 package/kmsxx/kmsxx.hash                      |  2 +-
 package/kmsxx/kmsxx.mk                        |  6 +--
 5 files changed, 3 insertions(+), 142 deletions(-)
 delete mode 100644 package/kmsxx/0001-meson-add-use-system-fmt-option.patch
 delete mode 100644 package/kmsxx/0002-meson-add-use-system-pybind11-option.patch
 delete mode 100644 package/kmsxx/0003-meson-only-build-py-in-case-pykms-is-enabled.patch

diff --git a/package/kmsxx/0001-meson-add-use-system-fmt-option.patch b/package/kmsxx/0001-meson-add-use-system-fmt-option.patch
deleted file mode 100644
index e9d67b1202..0000000000
--- a/package/kmsxx/0001-meson-add-use-system-fmt-option.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 61db7d5520f50564da8f2c9ac952eadb31f70727 Mon Sep 17 00:00:00 2001
-From: Peter Seiderer <ps.report@gmx.net>
-Date: Sun, 29 Nov 2020 11:13:41 +0100
-Subject: [PATCH] meson: add use-system-fmt option
-
-[Upstream: https://github.com/tomba/kmsxx/pull/60]
-Signed-off-by: Peter Seiderer <ps.report@gmx.net>
----
- meson.build       | 10 +++++++---
- meson_options.txt |  2 ++
- 2 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 9652009..29080f4 100644
---- a/meson.build
-+++ b/meson.build
-@@ -31,9 +31,13 @@ endif
- 
- add_global_link_arguments(link_arguments, language : 'cpp')
- 
--libfmt_includes = include_directories('ext/fmt/include')
--libfmt_dep = declare_dependency(include_directories : libfmt_includes,
--                                compile_args : '-DFMT_HEADER_ONLY')
-+if get_option('use-system-fmt')
-+    libfmt_dep = dependency('fmt')
-+else
-+    libfmt_includes = include_directories('ext/fmt/include')
-+    libfmt_dep = declare_dependency(include_directories : libfmt_includes,
-+                                    compile_args : '-DFMT_HEADER_ONLY')
-+endif
- 
- pybind11_includes = include_directories('ext/pybind11/include')
- pybind11_dep = declare_dependency(include_directories : pybind11_includes)
-diff --git a/meson_options.txt b/meson_options.txt
-index cd854ab..48176a8 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -3,3 +3,5 @@ option('pykms', type : 'feature', value : 'auto')
- option('omap', type : 'feature', value : 'auto')
- option('static-libc', type : 'boolean', value : false)
- option('utils', type : 'boolean', value : true)
-+
-+option('use-system-fmt', type : 'boolean', value : false)
--- 
-2.29.2
-
diff --git a/package/kmsxx/0002-meson-add-use-system-pybind11-option.patch b/package/kmsxx/0002-meson-add-use-system-pybind11-option.patch
deleted file mode 100644
index be58b65b42..0000000000
--- a/package/kmsxx/0002-meson-add-use-system-pybind11-option.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 27f15549ce67194e4152c57db2b762b7a443b4c7 Mon Sep 17 00:00:00 2001
-From: Peter Seiderer <ps.report@gmx.net>
-Date: Sun, 29 Nov 2020 11:14:41 +0100
-Subject: [PATCH] meson: add use-system-pybind11 option
-
-[Upstream: https://github.com/tomba/kmsxx/pull/60]
-Signed-off-by: Peter Seiderer <ps.report@gmx.net>
----
- meson.build       | 8 ++++++--
- meson_options.txt | 1 +
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 29080f4..4b3e7c3 100644
---- a/meson.build
-+++ b/meson.build
-@@ -39,8 +39,12 @@ else
-                                     compile_args : '-DFMT_HEADER_ONLY')
- endif
- 
--pybind11_includes = include_directories('ext/pybind11/include')
--pybind11_dep = declare_dependency(include_directories : pybind11_includes)
-+if get_option('use-system-pybind11')
-+    pybind11_dep = dependency('pybind11')
-+else
-+    pybind11_includes = include_directories('ext/pybind11/include')
-+    pybind11_dep = declare_dependency(include_directories : pybind11_includes)
-+endif
- 
- libdrmomap_dep = dependency('libdrm_omap', required : get_option('omap'))
- 
-diff --git a/meson_options.txt b/meson_options.txt
-index 48176a8..095c6f2 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -5,3 +5,4 @@ option('static-libc', type : 'boolean', value : false)
- option('utils', type : 'boolean', value : true)
- 
- option('use-system-fmt', type : 'boolean', value : false)
-+option('use-system-pybind11', type : 'boolean', value : false)
--- 
-2.29.2
-
diff --git a/package/kmsxx/0003-meson-only-build-py-in-case-pykms-is-enabled.patch b/package/kmsxx/0003-meson-only-build-py-in-case-pykms-is-enabled.patch
deleted file mode 100644
index a908521381..0000000000
--- a/package/kmsxx/0003-meson-only-build-py-in-case-pykms-is-enabled.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 0ef36b2e22c2ac0331b3096b7adc69fb08044048 Mon Sep 17 00:00:00 2001
-From: Peter Seiderer <ps.report@gmx.net>
-Date: Sun, 29 Nov 2020 11:37:26 +0100
-Subject: [PATCH] meson: only build py in case pykms is enabled
-
-[Upstream: https://github.com/tomba/kmsxx/pull/60]
-Signed-off-by: Peter Seiderer <ps.report@gmx.net>
----
- meson.build | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 4b3e7c3..1810b17 100644
---- a/meson.build
-+++ b/meson.build
-@@ -39,11 +39,13 @@ else
-                                     compile_args : '-DFMT_HEADER_ONLY')
- endif
- 
--if get_option('use-system-pybind11')
--    pybind11_dep = dependency('pybind11')
--else
--    pybind11_includes = include_directories('ext/pybind11/include')
--    pybind11_dep = declare_dependency(include_directories : pybind11_includes)
-+if get_option('pykms').enabled()
-+    if get_option('use-system-pybind11')
-+        pybind11_dep = dependency('pybind11')
-+    else
-+        pybind11_includes = include_directories('ext/pybind11/include')
-+        pybind11_dep = declare_dependency(include_directories : pybind11_includes)
-+    endif
- endif
- 
- libdrmomap_dep = dependency('libdrm_omap', required : get_option('omap'))
-@@ -55,7 +57,9 @@ if get_option('utils')
-     subdir('utils')
- endif
- 
--subdir('py')
-+if get_option('pykms').enabled()
-+    subdir('py')
-+endif
- 
- if get_option('kmscube')
-     subdir('kmscube')
--- 
-2.29.2
-
diff --git a/package/kmsxx/kmsxx.hash b/package/kmsxx/kmsxx.hash
index 1eeb1e6a7e..c141ef7e07 100644
--- a/package/kmsxx/kmsxx.hash
+++ b/package/kmsxx/kmsxx.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  4a682328b03c28ff1f6cfcafc48d30c3feb5ef98ed07e5dd3bbd9e6a1d4a47cc  kmsxx-548905611c130ea9d31929a0caf7a198d8bac462.tar.gz
+sha256  99759fe9334369ccd80ab0bbfe1110ee47e74f1e20abc2d7b2f028067ea0a0c3  kmsxx-824bbb1f4cd062d66b457faca50f904b34dfd96c.tar.gz
 sha256  fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85  LICENSE
diff --git a/package/kmsxx/kmsxx.mk b/package/kmsxx/kmsxx.mk
index 871ecaf85c..ab0158d1ed 100644
--- a/package/kmsxx/kmsxx.mk
+++ b/package/kmsxx/kmsxx.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-KMSXX_VERSION = 548905611c130ea9d31929a0caf7a198d8bac462
+KMSXX_VERSION = 824bbb1f4cd062d66b457faca50f904b34dfd96c
 KMSXX_SITE = $(call github,tomba,kmsxx,$(KMSXX_VERSION))
 KMSXX_LICENSE = MPL-2.0
 KMSXX_LICENSE_FILES = LICENSE
@@ -13,9 +13,7 @@ KMSXX_DEPENDENCIES = fmt libdrm host-pkgconf
 KMSXX_CONF_OPTS = \
 	-Dkmscube=false \
 	-Dpykms=disabled \
-	-Domap=disabled \
-	-Duse-system-fmt=true \
-	-Duse-system-pybind11=true
+	-Domap=disabled
 
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
 KMSXX_CXXFLAGS += $(TARGET_CXXFLAGS) -O0
-- 
2.25.1

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

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

* Re: [Buildroot] [PATCH 1/2] package/kmsxx: remove erroneous use of static-libc option
  2021-08-06 12:50 [Buildroot] [PATCH 1/2] package/kmsxx: remove erroneous use of static-libc option Tomi Valkeinen
  2021-08-06 12:50 ` [Buildroot] [PATCH 2/2] package/kmsxx: update to latest Tomi Valkeinen
@ 2021-08-08  8:50 ` Yann E. MORIN
  1 sibling, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2021-08-08  8:50 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: Peter Seiderer, buildroot

Tomi, All,

On 2021-08-06 15:50 +0300, Tomi Valkeinen spake thusly:
> For some reason the build file sets -Dstatic-libc=true option when
> BR2_STATIC_LIBS is set. This is not correct, or at least I cannot figure
> out the reason for this, so remove it.

Well, the reasonning was probably that: "if BR2_STATIC_LIBS is set, then
we want to do a fully-static build, so let's use that option that looks
like its name means exactly that."

But static-libc is not about the C library; it is about statically
linking against libgcc and libstdc++. Which should not happen, because
we are doing a full static build.

The issue that I can see, however, is that for pre-built toolchins, we
bulk-install their sysroot, and so we end up with our staging that may
contain shared libraries, and thus this be have been an attempt at
forcing the use of the static libgcc and libstdc++.

But in Buildroot, we force the use of -static in CFLAGS, CXXFLAGS, and
LDFLAGS (and any similar mechanism in all packages infras), and this
should be enough to link everything statically.

In the end, that does not seem to be necessary at all, indeed. I just
did a static-only build, and the sizes of the utils or the libs are
strictly identical with or without that option.

So, I've applied this patch to next, after expanding the commit log with
a summary of the above.

Regards,
Yann E. MORIN.

> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> ---
> 
> Re-sending, as first attempt was rejected as I was not subscribed to the
> list.
> 
>  package/kmsxx/kmsxx.mk | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/package/kmsxx/kmsxx.mk b/package/kmsxx/kmsxx.mk
> index fd40ff8e73..871ecaf85c 100644
> --- a/package/kmsxx/kmsxx.mk
> +++ b/package/kmsxx/kmsxx.mk
> @@ -17,12 +17,6 @@ KMSXX_CONF_OPTS = \
>  	-Duse-system-fmt=true \
>  	-Duse-system-pybind11=true
>  
> -ifeq ($(BR2_STATIC_LIBS),y)
> -KMSXX_CONF_OPTS += -Dstatic-libc=true
> -else
> -KMSXX_CONF_OPTS += -Dstatic-libc=false
> -endif
> -
>  ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
>  KMSXX_CXXFLAGS += $(TARGET_CXXFLAGS) -O0
>  endif
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/kmsxx: update to latest
  2021-08-06 12:50 ` [Buildroot] [PATCH 2/2] package/kmsxx: update to latest Tomi Valkeinen
@ 2021-08-08  9:29   ` Yann E. MORIN
  2021-08-08 18:12     ` Tomi Valkeinen
  0 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2021-08-08  9:29 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: Peter Seiderer, buildroot

Tomi, All,

On 2021-08-06 15:50 +0300, Tomi Valkeinen spake thusly:
> We can drop all the patches as they have been sorted out in upstream.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> ---
[--SNIP--]
> diff --git a/package/kmsxx/kmsxx.mk b/package/kmsxx/kmsxx.mk
> index 871ecaf85c..ab0158d1ed 100644
> --- a/package/kmsxx/kmsxx.mk
> +++ b/package/kmsxx/kmsxx.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>  
> -KMSXX_VERSION = 548905611c130ea9d31929a0caf7a198d8bac462
> +KMSXX_VERSION = 824bbb1f4cd062d66b457faca50f904b34dfd96c
>  KMSXX_SITE = $(call github,tomba,kmsxx,$(KMSXX_VERSION))
>  KMSXX_LICENSE = MPL-2.0
>  KMSXX_LICENSE_FILES = LICENSE
> @@ -13,9 +13,7 @@ KMSXX_DEPENDENCIES = fmt libdrm host-pkgconf
>  KMSXX_CONF_OPTS = \
>  	-Dkmscube=false \
>  	-Dpykms=disabled \
> -	-Domap=disabled \
> -	-Duse-system-fmt=true \
> -	-Duse-system-pybind11=true

Those options have been dropped upstream. Does that mean that they now
always use a system-provided fmt and pybind11, or that they always use
their bundled versions?

The answer is mixed.

For fmt, the option was dropped entirely, and upstream dropped their
bundled version in fdffbcdc0b0e (Use system libfmt). So we can indeed
drop -Duse-system-fmt=true.

But for pybind11, the option we added in our patch, was added with a
different name upstream. We had 'use-system-pybind11' as a boolean, they
added 'system-pybind11' as a feature.

Applied to next, with the above changes. Thanks.

Regards,
Yann E. MORIN.

> +	-Domap=disabled
>  
>  ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
>  KMSXX_CXXFLAGS += $(TARGET_CXXFLAGS) -O0
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/kmsxx: update to latest
  2021-08-08  9:29   ` Yann E. MORIN
@ 2021-08-08 18:12     ` Tomi Valkeinen
  2021-08-08 20:33       ` Yann E. MORIN
  0 siblings, 1 reply; 9+ messages in thread
From: Tomi Valkeinen @ 2021-08-08 18:12 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Peter Seiderer, buildroot

Hi,

On 08/08/2021 12:29, Yann E. MORIN wrote:
> Tomi, All,
> 
> On 2021-08-06 15:50 +0300, Tomi Valkeinen spake thusly:
>> We can drop all the patches as they have been sorted out in upstream.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>> ---
> [--SNIP--]
>> diff --git a/package/kmsxx/kmsxx.mk b/package/kmsxx/kmsxx.mk
>> index 871ecaf85c..ab0158d1ed 100644
>> --- a/package/kmsxx/kmsxx.mk
>> +++ b/package/kmsxx/kmsxx.mk
>> @@ -4,7 +4,7 @@
>>   #
>>   ################################################################################
>>   
>> -KMSXX_VERSION = 548905611c130ea9d31929a0caf7a198d8bac462
>> +KMSXX_VERSION = 824bbb1f4cd062d66b457faca50f904b34dfd96c
>>   KMSXX_SITE = $(call github,tomba,kmsxx,$(KMSXX_VERSION))
>>   KMSXX_LICENSE = MPL-2.0
>>   KMSXX_LICENSE_FILES = LICENSE
>> @@ -13,9 +13,7 @@ KMSXX_DEPENDENCIES = fmt libdrm host-pkgconf
>>   KMSXX_CONF_OPTS = \
>>   	-Dkmscube=false \
>>   	-Dpykms=disabled \
>> -	-Domap=disabled \
>> -	-Duse-system-fmt=true \
>> -	-Duse-system-pybind11=true
> 
> Those options have been dropped upstream. Does that mean that they now
> always use a system-provided fmt and pybind11, or that they always use
> their bundled versions?
> 
> The answer is mixed.
> 
> For fmt, the option was dropped entirely, and upstream dropped their
> bundled version in fdffbcdc0b0e (Use system libfmt). So we can indeed
> drop -Duse-system-fmt=true.
> 
> But for pybind11, the option we added in our patch, was added with a
> different name upstream. We had 'use-system-pybind11' as a boolean, they
> added 'system-pybind11' as a feature.
> 
> Applied to next, with the above changes. Thanks.

Actually, looks like I messed up a bit. I was probably a bit tired on 
Friday...

- I didn't push kms++ 824bbb1f4cd062d66b457faca50f904b34dfd96c to master 
branch. But it's in 'travis' branch, so it's available for fetching.

- I dropped both system-fmt and system-pybind11 options, as they didn't 
seem necessary [*]. However, I forgot to remove system-pybind11 from 
meson_options.txt, even if it's not used anywhere.

- My patch descriptions were shamefully terse. Sorry about that.

  Tomi

[*] For fmt, I didn't see a need for using meson subproject at all, as 
fmt seems to be available "everywhere", and afaics it's been quite 
stable. For pybind11, I still like to keep the option for meson 
subproject to easily test/use specific versions. However, this doesn't 
need an option in meson-option.txt, as the behavior of the 
fallback-to-subproject can be managed with meson commandline options. 
Also, if 'pykms' option is set to disabled, pybind11 is skipped also.
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/kmsxx: update to latest
  2021-08-08 18:12     ` Tomi Valkeinen
@ 2021-08-08 20:33       ` Yann E. MORIN
  2021-08-09  6:23         ` Tomi Valkeinen
  0 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2021-08-08 20:33 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: Peter Seiderer, buildroot

Tomi, All,

On 2021-08-08 21:12 +0300, Tomi Valkeinen spake thusly:
> On 08/08/2021 12:29, Yann E. MORIN wrote:
> >On 2021-08-06 15:50 +0300, Tomi Valkeinen spake thusly:
> >>We can drop all the patches as they have been sorted out in upstream.
[--SNIP--]
> >>-	-Domap=disabled \
> >>-	-Duse-system-fmt=true \
> >>-	-Duse-system-pybind11=true
> >Those options have been dropped upstream. Does that mean that they now
> >always use a system-provided fmt and pybind11, or that they always use
> >their bundled versions?
[--SNIP--]
> >Applied to next, with the above changes. Thanks.
> Actually, looks like I messed up a bit. I was probably a bit tired on
> Friday...

It seems I too was probably off my shoes: I initially missed that
use-system-fmt was added by one of the patches we had.

Oh, I just realised you are the upstream. Great, thanks for keeping
kmsxx up-to-date in Buildroot! 👍

> - I didn't push kms++ 824bbb1f4cd062d66b457faca50f904b34dfd96c to master
> branch. But it's in 'travis' branch, so it's available for fetching.

I see it's in master now.

> - I dropped both system-fmt and system-pybind11 options, as they didn't seem
> necessary [*]. However, I forgot to remove system-pybind11 from
> meson_options.txt, even if it's not used anywhere.

Ah, I only looked at meson_options.txt.

> - My patch descriptions were shamefully terse. Sorry about that.

Usually, a version bump does not need much explanations, so your commit
log would have been pretty OK. But when options get removed, it's nice
to have a little blurb about it, if just to acknowledge the removal was
intentional.

>  Tomi
> 
> [*] For fmt, I didn't see a need for using meson subproject at all, as fmt
> seems to be available "everywhere", and afaics it's been quite stable. For
> pybind11, I still like to keep the option for meson subproject to easily
> test/use specific versions. However, this doesn't need an option in
> meson-option.txt, as the behavior of the fallback-to-subproject can be
> managed with meson commandline options. Also, if 'pykms' option is set to
> disabled, pybind11 is skipped also.

The thing is, if pybind11 is not available in the system, then kmsxx
will build its bundled version when pykms is enabled.

So, by forcibly disabling pykms in Buildroot, this means that pybind11
is not needed and thus the bundled version is not built.

I am by far not a meson expert, so when you say "the fallback-to-subproject
can be managed with meson commandline options", I'd be much interested
in hos to do that, so that in Buildrot we know how to forcibly forbid
bundled sub-projects (or wraps?) to be used...

Thanks afain for your patches! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/kmsxx: update to latest
  2021-08-08 20:33       ` Yann E. MORIN
@ 2021-08-09  6:23         ` Tomi Valkeinen
  2021-08-10 19:39           ` Yann E. MORIN
  0 siblings, 1 reply; 9+ messages in thread
From: Tomi Valkeinen @ 2021-08-09  6:23 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Peter Seiderer, buildroot

On 08/08/2021 23:33, Yann E. MORIN wrote:

>> [*] For fmt, I didn't see a need for using meson subproject at all, as fmt
>> seems to be available "everywhere", and afaics it's been quite stable. For
>> pybind11, I still like to keep the option for meson subproject to easily
>> test/use specific versions. However, this doesn't need an option in
>> meson-option.txt, as the behavior of the fallback-to-subproject can be
>> managed with meson commandline options. Also, if 'pykms' option is set to
>> disabled, pybind11 is skipped also.
> 
> The thing is, if pybind11 is not available in the system, then kmsxx
> will build its bundled version when pykms is enabled.
> 
> So, by forcibly disabling pykms in Buildroot, this means that pybind11
> is not needed and thus the bundled version is not built.

Right.

And I'd love to enable the python bindings for kms++ in buildroot, but I 
didn't manage to get meson find buildroot's pybind11. I'll look at that 
more at some point. I think the problem is that meson should find 
pybind11 using cmake (apparently that can be used to find 
dependencies...), but when building kms++, meson just says:

CMake binary for MachineChoice.HOST is not cached
CMake binary missing from cross or native file, or env var undefined.
Default target is not allowed for cross use
Found CMake: NO

> I am by far not a meson expert, so when you say "the fallback-to-subproject
> can be managed with meson commandline options", I'd be much interested
> in hos to do that, so that in Buildrot we know how to forcibly forbid
> bundled sub-projects (or wraps?) to be used...

Yes, "wrap" is a better word here, as that handles the download of the 
subproject.

https://mesonbuild.com/Subprojects.html#commandline-options

So, buildroot could globally define "--wrap-mode=nodownload" for meson 
to prevent download of the subprojects. Developers who need the 
functionality of 'use-system-pybind11' option can use 
"--force-fallback-for=list,of,dependencies".

And at least for me, the download doesn't even work inside buildroot:

Downloading pybind11 source from 
https://github.com/pybind/pybind11/archive/v2.6.0.zip
<urlopen error unknown url type: https>
A fallback URL could be specified using source_fallback_url key in the 
wrap file

../output32/build/kmsxx-824bbb1f4cd062d66b457faca50f904b34dfd96c/py/pykms/meson.build:7:0: 
ERROR: could not get 
https://github.com/pybind/pybind11/archive/v2.6.0.zip is the internet 
available?

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

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

* Re: [Buildroot] [PATCH 2/2] package/kmsxx: update to latest
  2021-08-09  6:23         ` Tomi Valkeinen
@ 2021-08-10 19:39           ` Yann E. MORIN
  2021-08-11  7:42             ` Tomi Valkeinen
  0 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2021-08-10 19:39 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: Peter Seiderer, buildroot

Tomi, All,

On 2021-08-09 09:23 +0300, Tomi Valkeinen spake thusly:
> And I'd love to enable the python bindings for kms++ in buildroot, but I
> didn't manage to get meson find buildroot's pybind11. I'll look at that more
> at some point. I think the problem is that meson should find pybind11 using
> cmake (apparently that can be used to find dependencies...), but when
> building kms++, meson just says:
> 
> CMake binary for MachineChoice.HOST is not cached
> CMake binary missing from cross or native file, or env var undefined.
> Default target is not allowed for cross use
> Found CMake: NO

Could you try to add:

    KMSXX_DEPENDENCIES += $(BR2_CMAKE_HOST_DEPENDENCY)

To see if that would solve the issue?

> On 08/08/2021 23:33, Yann E. MORIN wrote:
> >I am by far not a meson expert, so when you say "the fallback-to-subproject
> >can be managed with meson commandline options", I'd be much interested
> >in hos to do that, so that in Buildrot we know how to forcibly forbid
> >bundled sub-projects (or wraps?) to be used...
> https://mesonbuild.com/Subprojects.html#commandline-options
> So, buildroot could globally define "--wrap-mode=nodownload" for meson to
> prevent download of the subprojects.

Shouldn't we instead use:   --wrap-mode=nofallback

This entirely prevent use of wraps, even those that are already present
(e.g. because an upstream packager would have added them when generating
the release tarball for example).

> Developers who need the functionality
> of 'use-system-pybind11' option can use
> "--force-fallback-for=list,of,dependencies".

This should only be done in conjunction with --wrap-mode=nodownload

> And at least for me, the download doesn't even work inside buildroot:
> 
> Downloading pybind11 source from
> https://github.com/pybind/pybind11/archive/v2.6.0.zip
> <urlopen error unknown url type: https>
                            ,------^^^^^
I think the error lies there: meson is written in python3, and is
executed with our host-python3, which we only conditionally build it
with support for TLS:

   package/python3/python3.mk:
   46 ifeq ($(BR2_PACKAGE_HOST_PYTHON3_SSL),y)
   47 HOST_PYTHON3_DEPENDENCIES += host-openssl
   48 else
   49 HOST_PYTHON3_CONF_OPTS += --disable-openssl
   50 endif

So, this is a good thing that this is not available by default: wraps
can only be downloaded from insecure sites, which if the meson wrapDB is
properly curated, should not happen. And thus, it should not be possible
to ever download any wrap at all! Aha. Aha! AHA! MUAHAHA! ;-]

But jokes aside, try setting BR2_PACKAGE_HOST_PYTHON3_SSL=y, and I would
guess downloading wraps would be come possible (although this would be a
very bad idea).

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/kmsxx: update to latest
  2021-08-10 19:39           ` Yann E. MORIN
@ 2021-08-11  7:42             ` Tomi Valkeinen
  0 siblings, 0 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2021-08-11  7:42 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Peter Seiderer, buildroot

Hi,

On 10/08/2021 22:39, Yann E. MORIN wrote:
> Tomi, All,
> 
> On 2021-08-09 09:23 +0300, Tomi Valkeinen spake thusly:
>> And I'd love to enable the python bindings for kms++ in buildroot, but I
>> didn't manage to get meson find buildroot's pybind11. I'll look at that more
>> at some point. I think the problem is that meson should find pybind11 using
>> cmake (apparently that can be used to find dependencies...), but when
>> building kms++, meson just says:
>>
>> CMake binary for MachineChoice.HOST is not cached
>> CMake binary missing from cross or native file, or env var undefined.
>> Default target is not allowed for cross use
>> Found CMake: NO
> 
> Could you try to add:
> 
>      KMSXX_DEPENDENCIES += $(BR2_CMAKE_HOST_DEPENDENCY)
> 
> To see if that would solve the issue?

I did get a bit forward, but not much. I think this also needs to be 
added, to package/meson/cross-compilation.conf.in:

cmake = '@HOST_DIR@/bin/cmake'

This helps meson to find cmake, but then the problems wrt. pybind11 and 
python started. I don't think cmake managed to find the .cmake files 
installed by buildroot's pybind11 package, so I just hacked and copied

<output>/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/python3.9/site-packages/pybind11/share/cmake/pybind11

to

<output>/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/cmake/

so that they are in similar place as from Ubuntu's pybind11 package.

I think that helped cmake find them, but then I'm seeing "Python config 
failure: Python is 64-bit, chosen compiler is 32-bit" error from 
pybind11's cmake files.

I also tried to change buildroot's python-pybind package to be a 
cmake-package, instead of python-package (thinking that perhaps it'll 
install the files to correct place), but again go the 64/32-bit error.

At this point I gave up, as I don't have much experience with cmake (and 
it's horrible =).

>> On 08/08/2021 23:33, Yann E. MORIN wrote:
>>> I am by far not a meson expert, so when you say "the fallback-to-subproject
>>> can be managed with meson commandline options", I'd be much interested
>>> in hos to do that, so that in Buildrot we know how to forcibly forbid
>>> bundled sub-projects (or wraps?) to be used...
>> https://mesonbuild.com/Subprojects.html#commandline-options
>> So, buildroot could globally define "--wrap-mode=nodownload" for meson to
>> prevent download of the subprojects.
> 
> Shouldn't we instead use:   --wrap-mode=nofallback
> 
> This entirely prevent use of wraps, even those that are already present
> (e.g. because an upstream packager would have added them when generating
> the release tarball for example).

Yes, I that makes sense too. I was thinking that the reason to avoid 
fallback is to avoid downloading unverified source code. nodownload does 
that, as if the subproject is packaged in the release tarball, it's 
"verified" in the same way the source of the package itself is, i.e. the 
exact code is known at the time the buildroot package is made, and the 
hash file checks the subproject too.

But if the intention is to make sure all packages use the same version 
of a library, then nofallback is better.

>> Developers who need the functionality
>> of 'use-system-pybind11' option can use
>> "--force-fallback-for=list,of,dependencies".
> 
> This should only be done in conjunction with --wrap-mode=nodownload
> 
>> And at least for me, the download doesn't even work inside buildroot:
>>
>> Downloading pybind11 source from
>> https://github.com/pybind/pybind11/archive/v2.6.0.zip
>> <urlopen error unknown url type: https>
>                              ,------^^^^^
> I think the error lies there: meson is written in python3, and is
> executed with our host-python3, which we only conditionally build it
> with support for TLS:
> 
>     package/python3/python3.mk:
>     46 ifeq ($(BR2_PACKAGE_HOST_PYTHON3_SSL),y)
>     47 HOST_PYTHON3_DEPENDENCIES += host-openssl
>     48 else
>     49 HOST_PYTHON3_CONF_OPTS += --disable-openssl
>     50 endif
> 
> So, this is a good thing that this is not available by default: wraps
> can only be downloaded from insecure sites, which if the meson wrapDB is
> properly curated, should not happen. And thus, it should not be possible
> to ever download any wrap at all! Aha. Aha! AHA! MUAHAHA! ;-]
> 
> But jokes aside, try setting BR2_PACKAGE_HOST_PYTHON3_SSL=y, and I would
> guess downloading wraps would be come possible (although this would be a
> very bad idea).

Then I get:

<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify 
failed: unable to get local issuer certificate (_ssl.c:1129)>

I guess root certs are missing?

This would be nice to have working for the cases where buildroot doesn't 
have the subproject package available (or working, as is the case here 
with pybind11). Even if mainline buildroot doesn't allow subproject 
downloads, it's nice to have it locally.

In my case, I had to remove the subproject stuff from kms++, add 
pybind11 back as a git submodule (which does work in buildroot), and 
then use that kms++ version with buildroot to get a rootfs with kms++ 
with py-bindings.

But I also understand that this is probably a bit of a corner case, and 
no one else is interested =).

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

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

end of thread, other threads:[~2021-08-11  7:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 12:50 [Buildroot] [PATCH 1/2] package/kmsxx: remove erroneous use of static-libc option Tomi Valkeinen
2021-08-06 12:50 ` [Buildroot] [PATCH 2/2] package/kmsxx: update to latest Tomi Valkeinen
2021-08-08  9:29   ` Yann E. MORIN
2021-08-08 18:12     ` Tomi Valkeinen
2021-08-08 20:33       ` Yann E. MORIN
2021-08-09  6:23         ` Tomi Valkeinen
2021-08-10 19:39           ` Yann E. MORIN
2021-08-11  7:42             ` Tomi Valkeinen
2021-08-08  8:50 ` [Buildroot] [PATCH 1/2] package/kmsxx: remove erroneous use of static-libc option Yann E. MORIN

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.