* [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths @ 2022-07-28 1:44 James Hilliard 2022-07-28 1:44 ` [Buildroot] [PATCH 2/2] package/pkg-meson: generate relocatable pkgconfigs James Hilliard 2023-01-11 15:19 ` [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths Romain Naour 0 siblings, 2 replies; 12+ messages in thread From: James Hilliard @ 2022-07-28 1:44 UTC (permalink / raw) To: buildroot; +Cc: Eric Le Bihan, James Hilliard, Samuel Martin These appear to not be getting set correctly and are needed when using meson's relocatable pkgconfig format. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> --- support/misc/toolchainfile.cmake.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in index 5d2b8695b4..2c6adfd02d 100644 --- a/support/misc/toolchainfile.cmake.in +++ b/support/misc/toolchainfile.cmake.in @@ -91,6 +91,12 @@ endif() if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_INCLUDE) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) endif() +if(NOT DEFINED PKG_CONFIG_USE_CMAKE_PREFIX_PATH) + set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON) +endif() +if(NOT DEFINED CMAKE_PREFIX_PATH) + set(CMAKE_PREFIX_PATH "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@/usr") +endif() set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@") # This toolchain file can be used both inside and outside Buildroot. -- 2.34.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 2/2] package/pkg-meson: generate relocatable pkgconfigs 2022-07-28 1:44 [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths James Hilliard @ 2022-07-28 1:44 ` James Hilliard 2023-01-11 15:30 ` Romain Naour 2023-01-11 18:15 ` Yann E. MORIN 2023-01-11 15:19 ` [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths Romain Naour 1 sibling, 2 replies; 12+ messages in thread From: James Hilliard @ 2022-07-28 1:44 UTC (permalink / raw) To: buildroot; +Cc: Eric Le Bihan, James Hilliard, Samuel Martin This format prevents pkgconfig path issues when using meson's built-in install functionality. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> --- package/pkg-meson.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk index 156b005fdd..1830c7b10c 100644 --- a/package/pkg-meson.mk +++ b/package/pkg-meson.mk @@ -134,6 +134,7 @@ define $(2)_CONFIGURE_CMDS CXX_FOR_BUILD="$$(HOSTCXX)" \ $$($$(PKG)_CONF_ENV) \ $$(MESON) \ + --pkgconfig.relocatable \ --prefix=/usr \ --libdir=lib \ --default-library=$(if $(BR2_STATIC_LIBS),static,shared) \ @@ -154,6 +155,7 @@ define $(2)_CONFIGURE_CMDS mkdir -p $$($$(PKG)_SRCDIR)/build $$(HOST_CONFIGURE_OPTS) \ $$($$(PKG)_CONF_ENV) $$(MESON) \ + --pkgconfig.relocatable \ --prefix=$$(HOST_DIR) \ --libdir=lib \ --sysconfdir=$$(HOST_DIR)/etc \ -- 2.34.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/pkg-meson: generate relocatable pkgconfigs 2022-07-28 1:44 ` [Buildroot] [PATCH 2/2] package/pkg-meson: generate relocatable pkgconfigs James Hilliard @ 2023-01-11 15:30 ` Romain Naour 2023-01-28 0:35 ` James Hilliard 2023-01-11 18:15 ` Yann E. MORIN 1 sibling, 1 reply; 12+ messages in thread From: Romain Naour @ 2023-01-11 15:30 UTC (permalink / raw) To: James Hilliard, buildroot; +Cc: Eric Le Bihan, Samuel Martin Hi James, Le 28/07/2022 à 03:44, James Hilliard a écrit : > This format prevents pkgconfig path issues when using meson's > built-in install functionality. Is any package currently affected by this issue? I would add a reference link: https://mesonbuild.com/Pkgconfig-module.html#relocatable-pkgconfig-files Best regards, Romain > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> > --- > package/pkg-meson.mk | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk > index 156b005fdd..1830c7b10c 100644 > --- a/package/pkg-meson.mk > +++ b/package/pkg-meson.mk > @@ -134,6 +134,7 @@ define $(2)_CONFIGURE_CMDS > CXX_FOR_BUILD="$$(HOSTCXX)" \ > $$($$(PKG)_CONF_ENV) \ > $$(MESON) \ > + --pkgconfig.relocatable \ > --prefix=/usr \ > --libdir=lib \ > --default-library=$(if $(BR2_STATIC_LIBS),static,shared) \ > @@ -154,6 +155,7 @@ define $(2)_CONFIGURE_CMDS > mkdir -p $$($$(PKG)_SRCDIR)/build > $$(HOST_CONFIGURE_OPTS) \ > $$($$(PKG)_CONF_ENV) $$(MESON) \ > + --pkgconfig.relocatable \ > --prefix=$$(HOST_DIR) \ > --libdir=lib \ > --sysconfdir=$$(HOST_DIR)/etc \ _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/pkg-meson: generate relocatable pkgconfigs 2023-01-11 15:30 ` Romain Naour @ 2023-01-28 0:35 ` James Hilliard 0 siblings, 0 replies; 12+ messages in thread From: James Hilliard @ 2023-01-28 0:35 UTC (permalink / raw) To: Romain Naour; +Cc: Eric Le Bihan, Samuel Martin, buildroot On Wed, Jan 11, 2023 at 8:30 AM Romain Naour <romain.naour@smile.fr> wrote: > > Hi James, > > Le 28/07/2022 à 03:44, James Hilliard a écrit : > > This format prevents pkgconfig path issues when using meson's > > built-in install functionality. > > Is any package currently affected by this issue? We currently aren't using meson's built-in install feature AFAIU so I don't think there's currently any packages having issues here. > > I would add a reference link: > https://mesonbuild.com/Pkgconfig-module.html#relocatable-pkgconfig-files > > Best regards, > Romain > > > > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> > > --- > > package/pkg-meson.mk | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk > > index 156b005fdd..1830c7b10c 100644 > > --- a/package/pkg-meson.mk > > +++ b/package/pkg-meson.mk > > @@ -134,6 +134,7 @@ define $(2)_CONFIGURE_CMDS > > CXX_FOR_BUILD="$$(HOSTCXX)" \ > > $$($$(PKG)_CONF_ENV) \ > > $$(MESON) \ > > + --pkgconfig.relocatable \ > > --prefix=/usr \ > > --libdir=lib \ > > --default-library=$(if $(BR2_STATIC_LIBS),static,shared) \ > > @@ -154,6 +155,7 @@ define $(2)_CONFIGURE_CMDS > > mkdir -p $$($$(PKG)_SRCDIR)/build > > $$(HOST_CONFIGURE_OPTS) \ > > $$($$(PKG)_CONF_ENV) $$(MESON) \ > > + --pkgconfig.relocatable \ > > --prefix=$$(HOST_DIR) \ > > --libdir=lib \ > > --sysconfdir=$$(HOST_DIR)/etc \ > _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/pkg-meson: generate relocatable pkgconfigs 2022-07-28 1:44 ` [Buildroot] [PATCH 2/2] package/pkg-meson: generate relocatable pkgconfigs James Hilliard 2023-01-11 15:30 ` Romain Naour @ 2023-01-11 18:15 ` Yann E. MORIN 2023-01-28 1:01 ` James Hilliard 1 sibling, 1 reply; 12+ messages in thread From: Yann E. MORIN @ 2023-01-11 18:15 UTC (permalink / raw) To: James Hilliard; +Cc: Eric Le Bihan, Samuel Martin, buildroot James, All, On 2022-07-27 19:44 -0600, James Hilliard spake thusly: > This format prevents pkgconfig path issues when using meson's > built-in install functionality. "pkgconfig path issues" is vague: this is not helping understand why this change is needed. Please explain what is currently broken, and how that patch fixes the issue. If there were a pointer to one or a few autobuild issues, that would also help, and would answers Romain's question: what package(s) is(are) impacted? If I look at the pointer Romain provided, it states: https://mesonbuild.com/Pkgconfig-module.html#relocatable-pkgconfig-files By default, the files generated by pkg.generate contain a hardcoded prefix path. Sure, I can see how that could be an issue. However, we already have two ways to fix that: - for per-package directory, we have a generic fixup that replaces the PPD base with the one for the current package, see: - package/pkg-generic.mk lines 95-onward and 109-onward. - b06294e9897e core/pkg-generic: fixup all PPD paths in a generic fashion - for the SDK, we have a similar fixup, see: - Makefile lines 597-onward - support/misc/relocate-sdk.sh So, if those fixups are not enough, can you describe what they are missing, so that we can extend them? This does not mean we can't apply this change (I even think it would be OK), but we really need to understand why we need it. Regards, Yann E. MORIN. > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> > --- > package/pkg-meson.mk | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk > index 156b005fdd..1830c7b10c 100644 > --- a/package/pkg-meson.mk > +++ b/package/pkg-meson.mk > @@ -134,6 +134,7 @@ define $(2)_CONFIGURE_CMDS > CXX_FOR_BUILD="$$(HOSTCXX)" \ > $$($$(PKG)_CONF_ENV) \ > $$(MESON) \ > + --pkgconfig.relocatable \ > --prefix=/usr \ > --libdir=lib \ > --default-library=$(if $(BR2_STATIC_LIBS),static,shared) \ > @@ -154,6 +155,7 @@ define $(2)_CONFIGURE_CMDS > mkdir -p $$($$(PKG)_SRCDIR)/build > $$(HOST_CONFIGURE_OPTS) \ > $$($$(PKG)_CONF_ENV) $$(MESON) \ > + --pkgconfig.relocatable \ > --prefix=$$(HOST_DIR) \ > --libdir=lib \ > --sysconfdir=$$(HOST_DIR)/etc \ > -- > 2.34.1 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/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@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/pkg-meson: generate relocatable pkgconfigs 2023-01-11 18:15 ` Yann E. MORIN @ 2023-01-28 1:01 ` James Hilliard 0 siblings, 0 replies; 12+ messages in thread From: James Hilliard @ 2023-01-28 1:01 UTC (permalink / raw) To: Yann E. MORIN; +Cc: Eric Le Bihan, Samuel Martin, buildroot On Wed, Jan 11, 2023 at 11:15 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote: > > James, All, > > On 2022-07-27 19:44 -0600, James Hilliard spake thusly: > > This format prevents pkgconfig path issues when using meson's > > built-in install functionality. > > "pkgconfig path issues" is vague: this is not helping understand why > this change is needed. > > Please explain what is currently broken, and how that patch fixes the > issue. If there were a pointer to one or a few autobuild issues, that > would also help, and would answers Romain's question: what package(s) > is(are) impacted? Meson's install feature doesn't work correctly when using non-relocatable format if you are installing to multiple desdir's. There's no autobuild issues as we don't use meson's install feature yet. > > If I look at the pointer Romain provided, it states: > > https://mesonbuild.com/Pkgconfig-module.html#relocatable-pkgconfig-files > > By default, the files generated by pkg.generate contain a hardcoded > prefix path. > > Sure, I can see how that could be an issue. However, we already have two > ways to fix that: > > - for per-package directory, we have a generic fixup that replaces the > PPD base with the one for the current package, see: > - package/pkg-generic.mk lines 95-onward and 109-onward. > - b06294e9897e core/pkg-generic: fixup all PPD paths in a generic fashion > > - for the SDK, we have a similar fixup, see: > - Makefile lines 597-onward > - support/misc/relocate-sdk.sh > > So, if those fixups are not enough, can you describe what they are > missing, so that we can extend them? The reason for making it relocatable via this meson flag is so that we can continue to use a single build stage for both staging and target installs for meson packages. When using meson's install without relocatable the path's generated don't play nice with different destination directory meson native installs, they work with the ninja based different destination installs that we currently use however. This is due to the non-relocatable paths being effectively locked to the expected destination paths set at build time(which prevents destdir changing during staging/target installs) and meson's install feature doing some additional appending manipulation in pkg-config files during install. See previous discussion for more details: https://lore.kernel.org/buildroot/CADvTj4qHOLX3cLsfc6Sc15-yJnKkjYFXLmQcRxhPapQOnbz0Vg@mail.gmail.com/ > > This does not mean we can't apply this change (I even think it would be > OK), but we really need to understand why we need it. > > Regards, > Yann E. MORIN. > > > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> > > --- > > package/pkg-meson.mk | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk > > index 156b005fdd..1830c7b10c 100644 > > --- a/package/pkg-meson.mk > > +++ b/package/pkg-meson.mk > > @@ -134,6 +134,7 @@ define $(2)_CONFIGURE_CMDS > > CXX_FOR_BUILD="$$(HOSTCXX)" \ > > $$($$(PKG)_CONF_ENV) \ > > $$(MESON) \ > > + --pkgconfig.relocatable \ > > --prefix=/usr \ > > --libdir=lib \ > > --default-library=$(if $(BR2_STATIC_LIBS),static,shared) \ > > @@ -154,6 +155,7 @@ define $(2)_CONFIGURE_CMDS > > mkdir -p $$($$(PKG)_SRCDIR)/build > > $$(HOST_CONFIGURE_OPTS) \ > > $$($$(PKG)_CONF_ENV) $$(MESON) \ > > + --pkgconfig.relocatable \ > > --prefix=$$(HOST_DIR) \ > > --libdir=lib \ > > --sysconfdir=$$(HOST_DIR)/etc \ > > -- > > 2.34.1 > > > > _______________________________________________ > > buildroot mailing list > > buildroot@buildroot.org > > https://lists.buildroot.org/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@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths 2022-07-28 1:44 [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths James Hilliard 2022-07-28 1:44 ` [Buildroot] [PATCH 2/2] package/pkg-meson: generate relocatable pkgconfigs James Hilliard @ 2023-01-11 15:19 ` Romain Naour 2023-01-11 16:01 ` Nicolas Cavallari 1 sibling, 1 reply; 12+ messages in thread From: Romain Naour @ 2023-01-11 15:19 UTC (permalink / raw) To: James Hilliard, buildroot; +Cc: Eric Le Bihan, Samuel Martin Hello James, Le 28/07/2022 à 03:44, James Hilliard a écrit : > These appear to not be getting set correctly and are needed when using > meson's relocatable pkgconfig format. How this cmake file (toolchainfile.cmake.in) is used by a meson package ? Best regards, Romain > > Signed-off-by: James Hilliard <james.hilliard1@gmail.com> > --- > support/misc/toolchainfile.cmake.in | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in > index 5d2b8695b4..2c6adfd02d 100644 > --- a/support/misc/toolchainfile.cmake.in > +++ b/support/misc/toolchainfile.cmake.in > @@ -91,6 +91,12 @@ endif() > if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_INCLUDE) > set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) > endif() > +if(NOT DEFINED PKG_CONFIG_USE_CMAKE_PREFIX_PATH) > + set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON) > +endif() > +if(NOT DEFINED CMAKE_PREFIX_PATH) > + set(CMAKE_PREFIX_PATH "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@/usr") > +endif() > set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@") > > # This toolchain file can be used both inside and outside Buildroot. _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths 2023-01-11 15:19 ` [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths Romain Naour @ 2023-01-11 16:01 ` Nicolas Cavallari 2023-01-11 16:12 ` Romain Naour 2023-01-11 16:44 ` Yann E. MORIN 0 siblings, 2 replies; 12+ messages in thread From: Nicolas Cavallari @ 2023-01-11 16:01 UTC (permalink / raw) To: Romain Naour, James Hilliard, buildroot; +Cc: Eric Le Bihan, Samuel Martin On 11/01/2023 16:19, Romain Naour wrote: > Hello James, > > Le 28/07/2022 à 03:44, James Hilliard a écrit : >> These appear to not be getting set correctly and are needed when using >> meson's relocatable pkgconfig format. > > How this cmake file (toolchainfile.cmake.in) is used by a meson package ? I understand it as "a cmake package needs this to use a pkgconfig file generated by a meson package when meson is configured to generate relocatable pkgconfig files". _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths 2023-01-11 16:01 ` Nicolas Cavallari @ 2023-01-11 16:12 ` Romain Naour 2023-01-11 16:44 ` Yann E. MORIN 1 sibling, 0 replies; 12+ messages in thread From: Romain Naour @ 2023-01-11 16:12 UTC (permalink / raw) To: Nicolas Cavallari, James Hilliard, buildroot; +Cc: Eric Le Bihan, Samuel Martin Hi Nicolas, Le 11/01/2023 à 17:01, Nicolas Cavallari a écrit : > On 11/01/2023 16:19, Romain Naour wrote: >> Hello James, >> >> Le 28/07/2022 à 03:44, James Hilliard a écrit : >>> These appear to not be getting set correctly and are needed when using >>> meson's relocatable pkgconfig format. >> >> How this cmake file (toolchainfile.cmake.in) is used by a meson package ? > > I understand it as "a cmake package needs this to use a pkgconfig file generated > by a meson package when meson is configured to generate relocatable pkgconfig > files". Ok thanks, I misunderstood what James wrote... my bad. Best regards, Romain _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths 2023-01-11 16:01 ` Nicolas Cavallari 2023-01-11 16:12 ` Romain Naour @ 2023-01-11 16:44 ` Yann E. MORIN 2023-01-11 17:35 ` Nicolas Cavallari 1 sibling, 1 reply; 12+ messages in thread From: Yann E. MORIN @ 2023-01-11 16:44 UTC (permalink / raw) To: Nicolas Cavallari Cc: Eric Le Bihan, Romain Naour, Samuel Martin, James Hilliard, buildroot Nicolas, James, All, On 2023-01-11 17:01 +0100, Nicolas Cavallari spake thusly: > On 11/01/2023 16:19, Romain Naour wrote: > >Le 28/07/2022 à 03:44, James Hilliard a écrit : > >>These appear to not be getting set correctly and are needed when using > >>meson's relocatable pkgconfig format. > >How this cmake file (toolchainfile.cmake.in) is used by a meson package ? > I understand it as "a cmake package needs this to use a pkgconfig file > generated by a meson package when meson is configured to generate > relocatable pkgconfig files". OK, but then I have a few questions: - what are "relocatable pkgconfig files", and how do they fit in the pkgconfig spec? - how do they differ from standard pkgconfig files? By "standard", I mean all the pkgconfig files we currently install and use from the hundreds, if not thousands, of packages that provided them. - why is meson generating those pkgconfig files, rather than standard ones? - and finally, if the "relocatable pkgconfig files" generated by meson are incorrect wrt the pkgconfig spec, can we tell meson not to do that? This should be answered with explanations in the commit log, rather than providing reviewers with an elusive and confusing "appear to not be getting set correctly" without research and explanations... 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@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths 2023-01-11 16:44 ` Yann E. MORIN @ 2023-01-11 17:35 ` Nicolas Cavallari 2023-01-11 18:36 ` Yann E. MORIN 0 siblings, 1 reply; 12+ messages in thread From: Nicolas Cavallari @ 2023-01-11 17:35 UTC (permalink / raw) To: Yann E. MORIN Cc: Eric Le Bihan, Romain Naour, Samuel Martin, James Hilliard, buildroot On 11/01/2023 17:44, Yann E. MORIN wrote: > Nicolas, James, All, > > On 2023-01-11 17:01 +0100, Nicolas Cavallari spake thusly: >> On 11/01/2023 16:19, Romain Naour wrote: >>> Le 28/07/2022 à 03:44, James Hilliard a écrit : >>>> These appear to not be getting set correctly and are needed when using >>>> meson's relocatable pkgconfig format. >>> How this cmake file (toolchainfile.cmake.in) is used by a meson package ? >> I understand it as "a cmake package needs this to use a pkgconfig file >> generated by a meson package when meson is configured to generate >> relocatable pkgconfig files". > > OK, but then I have a few questions: > > - what are "relocatable pkgconfig files", and how do they fit in the > pkgconfig spec? > > - how do they differ from standard pkgconfig files? By "standard", I > mean all the pkgconfig files we currently install and use from the > hundreds, if not thousands, of packages that provided them. Reading the meson's source, they are merely standard pkgconfig files that use the ${pcfiledir} variable to define paths instead of hardcoding a prefix. These are not specific to meson and are supported by pkg-config. (It happen that some of our private packages uses that trick too, and they are not meson packages) > - why is meson generating those pkgconfig files, rather than standard > ones? Because patch 2/2 tells it to. > - and finally, if the "relocatable pkgconfig files" generated by meson > are incorrect wrt the pkgconfig spec, can we tell meson not to do > that? They are not incorrect. From experience, autotools and meson packages handles them fine. cmake however, according to the commit message, does not and needs some extra variables. _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths 2023-01-11 17:35 ` Nicolas Cavallari @ 2023-01-11 18:36 ` Yann E. MORIN 0 siblings, 0 replies; 12+ messages in thread From: Yann E. MORIN @ 2023-01-11 18:36 UTC (permalink / raw) To: Nicolas Cavallari Cc: Eric Le Bihan, Romain Naour, Samuel Martin, James Hilliard, buildroot Nicolas, James, All, On 2023-01-11 18:35 +0100, Nicolas Cavallari spake thusly: > On 11/01/2023 17:44, Yann E. MORIN wrote: > >On 2023-01-11 17:01 +0100, Nicolas Cavallari spake thusly: > >>On 11/01/2023 16:19, Romain Naour wrote: > >>>Le 28/07/2022 à 03:44, James Hilliard a écrit : > >>>>These appear to not be getting set correctly and are needed when using > >>>>meson's relocatable pkgconfig format. > >>>How this cmake file (toolchainfile.cmake.in) is used by a meson package ? > >>I understand it as "a cmake package needs this to use a pkgconfig file > >>generated by a meson package when meson is configured to generate > >>relocatable pkgconfig files". > > > >OK, but then I have a few questions: > > > > - what are "relocatable pkgconfig files", and how do they fit in the > > pkgconfig spec? > > > - how do they differ from standard pkgconfig files? By "standard", I > > mean all the pkgconfig files we currently install and use from the > > hundreds, if not thousands, of packages that provided them. > > Reading the meson's source, they are merely standard pkgconfig files that > use the ${pcfiledir} variable to define paths instead of hardcoding a > prefix. These are not specific to meson and are supported by pkg-config. (It > happen that some of our private packages uses that trick too, and they are > not meson packages) That. It has nothing meson specific, in fact. It just happens that meson is the only tool that generates .pc files with pcfiledir, and pcfiledir is not widely used either (we've never had a related issue so far, have we?) (and no, private tools and packages do not count! ;-] ) > > - why is meson generating those pkgconfig files, rather than standard > > ones? > Because patch 2/2 tells it to. Ah, yes, I just replied to that second patch too, now. If a change is needed in preparation of another one, then it should be mentioned (with an abridged explanation of the problem that will be fixed in that later change, if possible). And a cover letter that explains the whole picture is more than welcome, too. > > - and finally, if the "relocatable pkgconfig files" generated by meson > > are incorrect wrt the pkgconfig spec, can we tell meson not to do > > that? > They are not incorrect. From experience, autotools and meson packages > handles them fine. cmake however, according to the commit message, does not > and needs some extra variables. Yes, this makes so much more sense now: it is a cmake issue first and foremost, that is exposed by .pc files generated by meson. Thanks for the explanations! James, can you respin this one patch with all this discussion nicely aggregated and reformatted as a proper commit log, please? 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@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-01-28 1:02 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-07-28 1:44 [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths James Hilliard 2022-07-28 1:44 ` [Buildroot] [PATCH 2/2] package/pkg-meson: generate relocatable pkgconfigs James Hilliard 2023-01-11 15:30 ` Romain Naour 2023-01-28 0:35 ` James Hilliard 2023-01-11 18:15 ` Yann E. MORIN 2023-01-28 1:01 ` James Hilliard 2023-01-11 15:19 ` [Buildroot] [PATCH 1/2] support/misc/toolchainfile.cmake.in: set PKG_CONFIG/CMAKE prefix paths Romain Naour 2023-01-11 16:01 ` Nicolas Cavallari 2023-01-11 16:12 ` Romain Naour 2023-01-11 16:44 ` Yann E. MORIN 2023-01-11 17:35 ` Nicolas Cavallari 2023-01-11 18:36 ` Yann E. MORIN
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox