* [PATCH] meson.bbclass: Specify a cross binary for cmake
@ 2025-02-04 16:06 Peter Kjellerstedt
2025-02-04 16:19 ` [OE-core] " Ross Burton
2025-04-04 9:17 ` Brehm, Wolfgang
0 siblings, 2 replies; 5+ messages in thread
From: Peter Kjellerstedt @ 2025-02-04 16:06 UTC (permalink / raw)
To: openembedded-core
This is needed to find dependencies that only provide CMake files, e.g.,
json-schema-validator in meta-oe.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes-recipe/meson.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
index b343480f9a..bd1b86e931 100644
--- a/meta/classes-recipe/meson.bbclass
+++ b/meta/classes-recipe/meson.bbclass
@@ -73,6 +73,7 @@ nm = ${@meson_array('NM', d)}
strip = ${@meson_array('STRIP', d)}
readelf = ${@meson_array('READELF', d)}
objcopy = ${@meson_array('OBJCOPY', d)}
+cmake = 'cmake'
pkg-config = 'pkg-config'
llvm-config = 'llvm-config'
cups-config = 'cups-config'
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] meson.bbclass: Specify a cross binary for cmake
2025-02-04 16:06 [PATCH] meson.bbclass: Specify a cross binary for cmake Peter Kjellerstedt
@ 2025-02-04 16:19 ` Ross Burton
2025-02-04 16:45 ` Peter Kjellerstedt
2025-04-04 9:17 ` Brehm, Wolfgang
1 sibling, 1 reply; 5+ messages in thread
From: Ross Burton @ 2025-02-04 16:19 UTC (permalink / raw)
To: peter.kjellerstedt@axis.com; +Cc: openembedded-core@lists.openembedded.org
On 4 Feb 2025, at 16:06, Peter Kjellerstedt via lists.openembedded.org <peter.kjellerstedt=axis.com@lists.openembedded.org> wrote:
> +cmake = ‘cmake'
Is that not the default?
Ross
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [OE-core] [PATCH] meson.bbclass: Specify a cross binary for cmake
2025-02-04 16:19 ` [OE-core] " Ross Burton
@ 2025-02-04 16:45 ` Peter Kjellerstedt
2025-02-04 17:34 ` Ross Burton
0 siblings, 1 reply; 5+ messages in thread
From: Peter Kjellerstedt @ 2025-02-04 16:45 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core@lists.openembedded.org
> -----Original Message-----
> From: Ross Burton <Ross.Burton@arm.com>
> Sent: den 4 februari 2025 17:20
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] meson.bbclass: Specify a cross binary for cmake
>
> On 4 Feb 2025, at 16:06, Peter Kjellerstedt via lists.openembedded.org <peter.kjellerstedt=axis.com@lists.openembedded.org> wrote:
> > +cmake = ‘cmake'
>
> Is that not the default?
Does not look like it. I guess it is the same as for, e.g., pkg-config,
which is on the next line in the meson.cross file.
Without it, the build fails with:
Found CMake: NO
Run-time dependency nlohmann_json_schema_validator found: NO (tried pkgconfig)
../git/meson.build:8:18: ERROR: Dependency "nlohmann_json_schema_validator" not found, tried pkgconfig
With it, I instead get:
Found CMake: .../recipe-sysroot-native/usr/bin/cmake (3.30.2)
Run-time dependency nlohmann_json_schema_validator found: YES 2.2.0
and the build succeeds.
>
> Ross
//Peter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] meson.bbclass: Specify a cross binary for cmake
2025-02-04 16:45 ` Peter Kjellerstedt
@ 2025-02-04 17:34 ` Ross Burton
0 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2025-02-04 17:34 UTC (permalink / raw)
To: Peter Kjellerstedt; +Cc: openembedded-core@lists.openembedded.org
On 4 Feb 2025, at 16:45, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:
> Does not look like it. I guess it is the same as for, e.g., pkg-config,
> which is on the next line in the meson.cross file.
Just had it confirmed that in cross builds meson needs _every_ binary to be specified, so this patch is entirely correct. Surprised we’d gone so long without the cmake integration to be honest.
Ross
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] meson.bbclass: Specify a cross binary for cmake
2025-02-04 16:06 [PATCH] meson.bbclass: Specify a cross binary for cmake Peter Kjellerstedt
2025-02-04 16:19 ` [OE-core] " Ross Burton
@ 2025-04-04 9:17 ` Brehm, Wolfgang
1 sibling, 0 replies; 5+ messages in thread
From: Brehm, Wolfgang @ 2025-04-04 9:17 UTC (permalink / raw)
To: openembedded-core@lists.openembedded.org,
peter.kjellerstedt@axis.com
[-- Attachment #1: Type: text/plain, Size: 3560 bytes --]
Dear Peter,
I have a dependency that only provided CMake config files, which could not be found by meson, so I thought I'd try your patch. I don't know if it actually fixes the problem because before I could get to testing it, it leads to a strange error in the compilation of libpciaccess, where somehow /usr/include is in the includes leading to a compilation error.
ccache [...] -I/usr/include -fdiagnostics-color=always [...] src/libpciaccess.so.0.11.1.p/common_capability.c.o -MF src/libpciaccess.so.0.11.1.p/common_capability.c.o.d -o src/libpciaccess.so.0.11.1.p/comm
on_capability.c.o -c ../libpciaccess-0.18.1/src/common_capability.c
cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
This then presumably leading to:
In file included from ../libpciaccess-0.18.1/src/common_capability.c:39:
/usr/include/stdio.h:205:27: error: 'L_tmpnam' undeclared here (not in a function)
I'll continue investigating.
Mit freundlichen Grüßen
STORZ Endoskop Produktions GmbH
i. A. Dr. Wolfgang Brehm
Softwareentwickler
Software Components & Multimedia
_____________________________________
Tel.: +41 (0)52 640 35 67
Mobil: +41 (0)76 361 57 07
E-Mail: wolfgang.brehm@karlstorz.com
www.karlstorz.com
Hausadresse:
STORZ Endoskop Produktions GmbH
Tuttlingen (D)
Zweigniederlassung Schaffhausen
Schneckenackerstrasse 1
CH- 8200 Schaffhausen
===========================================================
STORZ Endoskop Produktions GmbH
Dr.-Karl-Storz-Strasse 34
D-78532 Tuttlingen/Germany
Sitz der Gesellschaft/ Place of Business: Tuttlingen
Handelsregister/ Commercial Register: Stuttgart HRB 451 142
USt.-ID-Nr./ VAT-ID-No.: DE 142931059
WEEE-Reg.-Nr./ WEEE Reg.-No.: DE 74465858
Geschäftsführer / Managing Director:
Karl-Christian Storz
===========================================================
Datenschutzmitteilung für Geschäftspartner / Business Partner Data Protection Notice<https://www.karlstorz.com/it/en/business-partner-data-protection.htm?target=business-partner-data-protection.htm>
________________________________
From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> on behalf of Peter Kjellerstedt via lists.openembedded.org <peter.kjellerstedt=axis.com@lists.openembedded.org>
Sent: 04 February 2025 17:06
To: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>
Subject: [Ext] [OE-core] [PATCH] meson.bbclass: Specify a cross binary for cmake
This is needed to find dependencies that only provide CMake files, e. g. , json-schema-validator in meta-oe. Signed-off-by: Peter Kjellerstedt <peter. kjellerstedt@ axis. com> --- meta/classes-recipe/meson. bbclass | 1 + 1 file changed, 1 insertion(+)
This is needed to find dependencies that only provide CMake files, e.g.,
json-schema-validator in meta-oe.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
meta/classes-recipe/meson.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
index b343480f9a..bd1b86e931 100644
--- a/meta/classes-recipe/meson.bbclass
+++ b/meta/classes-recipe/meson.bbclass
@@ -73,6 +73,7 @@ nm = ${@meson_array('NM', d)}
strip = ${@meson_array('STRIP', d)}
readelf = ${@meson_array('READELF', d)}
objcopy = ${@meson_array('OBJCOPY', d)}
+cmake = 'cmake'
pkg-config = 'pkg-config'
llvm-config = 'llvm-config'
cups-config = 'cups-config'
[-- Attachment #2: Type: text/html, Size: 7901 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-04 9:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04 16:06 [PATCH] meson.bbclass: Specify a cross binary for cmake Peter Kjellerstedt
2025-02-04 16:19 ` [OE-core] " Ross Burton
2025-02-04 16:45 ` Peter Kjellerstedt
2025-02-04 17:34 ` Ross Burton
2025-04-04 9:17 ` Brehm, Wolfgang
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.