diff mbox series

[meta-oe] nlohmann-json: Allow empty main package for SDK

Message ID 20230206210911.2074894-1-tom.hochstein@nxp.com
State New
Headers show
Series [meta-oe] nlohmann-json: Allow empty main package for SDK | expand

Commit Message

Tom Hochstein Feb. 6, 2023, 9:09 p.m. UTC
The header-only package cannot be included in the SDK without marking
the main package with ALLOW_EMPTY.

Fixes rootfs problem:
```
The following packages have unmet dependencies:
 imx-gpu-sdk : Depends: nlohmann-json but it is not installable
E: Unable to correct problems, you have held broken packages.
```

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin Jansa Feb. 6, 2023, 9:13 p.m. UTC | #1
Wrong ML and why do you want to install empty package? Add
nlohmann-json-dev to imx-gpu-sdk recipe instead.

On Mon, Feb 6, 2023 at 10:09 PM Tom Hochstein <tom.hochstein@nxp.com> wrote:

> The header-only package cannot be included in the SDK without marking
> the main package with ALLOW_EMPTY.
>
> Fixes rootfs problem:
> ```
> The following packages have unmet dependencies:
>  imx-gpu-sdk : Depends: nlohmann-json but it is not installable
> E: Unable to correct problems, you have held broken packages.
> ```
>
> Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
> ---
>  meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-oe/recipes-devtools/nlohmann-json/
> nlohmann-json_3.11.2.bb b/meta-oe/recipes-devtools/nlohmann-json/
> nlohmann-json_3.11.2.bb
> index 502262820..6cf27755e 100644
> --- a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb
> +++ b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb
> @@ -18,7 +18,7 @@ inherit cmake
>  EXTRA_OECMAKE += "-DJSON_BuildTests=OFF"
>
>  # nlohmann-json is a header only C++ library, so the main package will be
> empty.
> -
> +ALLOW_EMPTY:${PN} = "1"
>  RDEPENDS:${PN}-dev = ""
>
>  BBCLASSEXTEND = "native nativesdk"
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#176797):
> https://lists.openembedded.org/g/openembedded-core/message/176797
> Mute This Topic: https://lists.openembedded.org/mt/96793459/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Tom Hochstein Feb. 6, 2023, 9:36 p.m. UTC | #2
Oops, I don't often send for non OE-Core and I forgot there was a separate mailing list for that. I usually just cut and paste from here:

http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Sending_patches

Which makes it easy to overlook the mailing list requirement.

There are several examples in the repo that use this same pattern. Here's one:

https://github.com/openembedded/meta-openembedded/commit/7163946b56539725d5a5868a9318e56e713a4a95

It has the advantage of not installing the header in the image. Should the -dev solution be preferred?

Tom

From: Martin Jansa <martin.jansa@gmail.com>
Sent: Monday, February 6, 2023 3:13 PM
To: Tom Hochstein <tom.hochstein@nxp.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [meta-oe][PATCH] nlohmann-json: Allow empty main package for SDK

Wrong ML and why do you want to install empty package? Add nlohmann-json-dev to imx-gpu-sdk recipe instead.

On Mon, Feb 6, 2023 at 10:09 PM Tom Hochstein <tom.hochstein@nxp.com<mailto:tom.hochstein@nxp.com>> wrote:
The header-only package cannot be included in the SDK without marking
the main package with ALLOW_EMPTY.

Fixes rootfs problem:
```
The following packages have unmet dependencies:
 imx-gpu-sdk : Depends: nlohmann-json but it is not installable
E: Unable to correct problems, you have held broken packages.
```

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com<mailto:tom.hochstein@nxp.com>>
---
 meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnlohmann-json_3.11.2.bb%2F&data=05%7C01%7Ctom.hochstein%40nxp.com%7Ccd434fb892594f67b4df08db0886f900%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638113148012774729%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vhZ3gJZfb%2FF4qX25hkN%2BQIA6jUK6jBFLgsIFAX6dQAQ%3D&reserved=0> | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnlohmann-json_3.11.2.bb%2F&data=05%7C01%7Ctom.hochstein%40nxp.com%7Ccd434fb892594f67b4df08db0886f900%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638113148012774729%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vhZ3gJZfb%2FF4qX25hkN%2BQIA6jUK6jBFLgsIFAX6dQAQ%3D&reserved=0> b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnlohmann-json_3.11.2.bb%2F&data=05%7C01%7Ctom.hochstein%40nxp.com%7Ccd434fb892594f67b4df08db0886f900%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638113148012774729%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vhZ3gJZfb%2FF4qX25hkN%2BQIA6jUK6jBFLgsIFAX6dQAQ%3D&reserved=0>
index 502262820..6cf27755e 100644
--- a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnlohmann-json_3.11.2.bb%2F&data=05%7C01%7Ctom.hochstein%40nxp.com%7Ccd434fb892594f67b4df08db0886f900%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638113148012774729%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vhZ3gJZfb%2FF4qX25hkN%2BQIA6jUK6jBFLgsIFAX6dQAQ%3D&reserved=0>
+++ b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb<https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnlohmann-json_3.11.2.bb%2F&data=05%7C01%7Ctom.hochstein%40nxp.com%7Ccd434fb892594f67b4df08db0886f900%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638113148012930975%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=svBLqUNpOl3rYXMGmHR6RfR9il6dkPxnxENyv6IUCME%3D&reserved=0>
@@ -18,7 +18,7 @@ inherit cmake
 EXTRA_OECMAKE += "-DJSON_BuildTests=OFF"

 # nlohmann-json is a header only C++ library, so the main package will be empty.
-
+ALLOW_EMPTY:${PN} = "1"
 RDEPENDS:${PN}-dev = ""

 BBCLASSEXTEND = "native nativesdk"
--
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176797): https://lists.openembedded.org/g/openembedded-core/message/176797<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.openembedded.org%2Fg%2Fopenembedded-core%2Fmessage%2F176797&data=05%7C01%7Ctom.hochstein%40nxp.com%7Ccd434fb892594f67b4df08db0886f900%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638113148012930975%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VYm639TrGNY7AIPC0l7x7pWHuq2b3DvNn6jvnSUYK4s%3D&reserved=0>
Mute This Topic: https://lists.openembedded.org/mt/96793459/3617156<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.openembedded.org%2Fmt%2F96793459%2F3617156&data=05%7C01%7Ctom.hochstein%40nxp.com%7Ccd434fb892594f67b4df08db0886f900%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638113148012930975%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ZlYEnu9DrzznQzzDnPlqCkwD8lV7xuB7jlB9Se7Hff8%3D&reserved=0>
Group Owner: openembedded-core+owner@lists.openembedded.org<mailto:openembedded-core%2Bowner@lists.openembedded.org>
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.openembedded.org%2Fg%2Fopenembedded-core%2Funsub&data=05%7C01%7Ctom.hochstein%40nxp.com%7Ccd434fb892594f67b4df08db0886f900%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638113148012930975%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3wvdYu6JMTk6HvM%2FzyglYQwljY2Ftm2XACftS9egjxk%3D&reserved=0> [Martin.Jansa@gmail.com<mailto:Martin.Jansa@gmail.com>]
-=-=-=-=-=-=-=-=-=-=-=-
Khem Raj Feb. 7, 2023, 2:06 a.m. UTC | #3
On Mon, Feb 6, 2023 at 1:36 PM Tom Hochstein <tom.hochstein@nxp.com> wrote:
>
> Oops, I don’t often send for non OE-Core and I forgot there was a separate mailing list for that. I usually just cut and paste from here:
>
>
>
> http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded#Sending_patches
>
>
>
> Which makes it easy to overlook the mailing list requirement.
>
>
>
> There are several examples in the repo that use this same pattern. Here’s one:
>
>
>
> https://github.com/openembedded/meta-openembedded/commit/7163946b56539725d5a5868a9318e56e713a4a95
>
>
>
> It has the advantage of not installing the header in the image. Should the -dev solution be preferred?

if these are development headers and libs then yes its better since it
goes with the general philosophy of putting these files in -dev pkgs.

>
>
>
> Tom
>
>
>
> From: Martin Jansa <martin.jansa@gmail.com>
> Sent: Monday, February 6, 2023 3:13 PM
> To: Tom Hochstein <tom.hochstein@nxp.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [meta-oe][PATCH] nlohmann-json: Allow empty main package for SDK
>
>
>
> Wrong ML and why do you want to install empty package? Add nlohmann-json-dev to imx-gpu-sdk recipe instead.
>
>
>
> On Mon, Feb 6, 2023 at 10:09 PM Tom Hochstein <tom.hochstein@nxp.com> wrote:
>
> The header-only package cannot be included in the SDK without marking
> the main package with ALLOW_EMPTY.
>
> Fixes rootfs problem:
> ```
> The following packages have unmet dependencies:
>  imx-gpu-sdk : Depends: nlohmann-json but it is not installable
> E: Unable to correct problems, you have held broken packages.
> ```
>
> Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
> ---
>  meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb
> index 502262820..6cf27755e 100644
> --- a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb
> +++ b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb
> @@ -18,7 +18,7 @@ inherit cmake
>  EXTRA_OECMAKE += "-DJSON_BuildTests=OFF"
>
>  # nlohmann-json is a header only C++ library, so the main package will be empty.
> -
> +ALLOW_EMPTY:${PN} = "1"
>  RDEPENDS:${PN}-dev = ""
>
>  BBCLASSEXTEND = "native nativesdk"
> --
> 2.25.1
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#176799): https://lists.openembedded.org/g/openembedded-core/message/176799
> Mute This Topic: https://lists.openembedded.org/mt/96793459/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Tom Hochstein Feb. 7, 2023, 7:06 p.m. UTC | #4
> -----Original Message-----
> From: Khem Raj <raj.khem@gmail.com>
> Sent: Monday, February 6, 2023 8:06 PM
> 
> > > -----Original Message-----
> > > From: Martin Jansa <martin.jansa@gmail.com>
> > > Sent: Monday, February 6, 2023 3:13 PM
> > >
> > > Wrong ML and why do you want to install empty package? Add nlohmann-json-dev to imx-gpu-sdk recipe instead.
> >
> > On Mon, Feb 6, 2023 at 1:36 PM Tom Hochstein <tom.hochstein@nxp.com> wrote:
> >
> > It has the advantage of not installing the header in the image. Should the -dev
> > solution be preferred?
> 
> if these are development headers and libs then yes its better since it
> goes with the general philosophy of putting these files in -dev pkgs.

This change does not change the -dev packaging.

To make my comment more clear, this change has the advantage of not installing the -dev packages in the rootfs, which is an unintended side-effect of Martin's suggestion to "add nlohmann-json-dev to imx-gpu-sdk recipe instead."
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb
index 502262820..6cf27755e 100644
--- a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb
+++ b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.11.2.bb
@@ -18,7 +18,7 @@  inherit cmake
 EXTRA_OECMAKE += "-DJSON_BuildTests=OFF"
 
 # nlohmann-json is a header only C++ library, so the main package will be empty.
-
+ALLOW_EMPTY:${PN} = "1"
 RDEPENDS:${PN}-dev = ""
 
 BBCLASSEXTEND = "native nativesdk"