Skip to contentSkip to conversation

pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

PATCH New Jeroen Roovers 6 participants 11 messages Feb 29, 2016 – Mar 18, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

Lots of packages start to call pkg-config "properly" and run into failures like this:

*
* System Logging Utilities
*
syslogd (SYSLOGD) [N/y/?] n
klogd (KLOGD) [N/y/?] n
logger (LOGGER) [Y/n/?] y
make[2]: .../output/host/usr/bin/arm-buildroot-linux-gnueabihf-pkg-config: Command not found make[2]: .../output/host/usr/bin/arm-buildroot-linux-gnueabihf-pkg-config: Command not found make[1]: Leaving directory '.../output/build/busybox-1.24.1'

By setting a symlink to the expected target we might even solve some real problems.

---
 package/pkgconf/pkgconf.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkgconf/pkgconf.mk +1 -0
index c8b0cba..a183a1c 100644
@@ -22,6 +22,7 @@ define HOST_PKGCONF_INSTALL_WRAPPER
 	$(SED) 's, at PKG_CONFIG_LIBDIR@,$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig,' \
 		-e 's, at STAGING_DIR@,$(STAGING_DIR),' \
 		$(HOST_DIR)/usr/bin/pkg-config
+	ln -sf $(HOST_DIR)/usr/bin/pkg-config $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-pkg-config
 endef
 
 define HOST_PKGCONF_STATIC
Signature · 1 line
2.4.10
#1 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

Am Mon, 29 Feb 2016 19:22:50 +0100 schrieb Jeroen Roovers:

Quoted 2 lines

By setting a symlink to the expected target we might even solve some real problems.

Hi,

two years ago I proposed a similar patch, which was rejected:
http://patchwork.ozlabs.org/patch/312273/

Regards, Bernd

#2 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

Hello,

Quoted 5 lines · Bernd Kuhls
Quoted 2 lines

By setting a symlink to the expected target we might even solve some real problems.

two years ago I proposed a similar patch, which was rejected:
http://patchwork.ozlabs.org/patch/312273/

If we were to do this, then I would prefer to completely remove $(HOST_DIR)/usr/bin/pkg-config, and only have $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-pkg-config.

What I dislike with the current setup is that if you add $(HOST_DIR)/usr/bin to your PATH, then any call to pkg-config returns values that are valid only when cross-compiling, which is not necessarily what one would expect.

However, doing this change means that any configure script or Makefile that calls pkg-config directly would no longer find our pkg-config.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hello,

Quoted 5 lines · Bernd Kuhls
Quoted 2 lines

By setting a symlink to the expected target we might even solve some real problems.

two years ago I proposed a similar patch, which was rejected:
http://patchwork.ozlabs.org/patch/312273/

Quoted 8 lines

If we were to do this, then I would prefer to completely remove $(HOST_DIR)/usr/bin/pkg-config, and only have $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-pkg-config.

What I dislike with the current setup is that if you add $(HOST_DIR)/usr/bin to your PATH, then any call to pkg-config returns values that are valid only when cross-compiling, which is not necessarily what one would expect.

On the other hand, the situations where you add it to the path are often where you _DO_ want to cross compile.

Quoted 2 lines

However, doing this change means that any configure script or Makefile that calls pkg-config directly would no longer find our pkg-config.

Indeed, that would afaik require quite some patching to fix.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

Peter,

Quoted 7 lines · Peter Korsgaard
Quoted 4 lines

What I dislike with the current setup is that if you add $(HOST_DIR)/usr/bin to your PATH, then any call to pkg-config returns values that are valid only when cross-compiling, which is not necessarily what one would expect.

On the other hand, the situations where you add it to the path are often where you _DO_ want to cross compile.

Indeed, but you often end up doing both cross-compilation and native compilation, and it's pretty easy to get confused by a pkg-config returning absurd values.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hi,

Quoted 6 lines
Quoted 2 lines

On the other hand, the situations where you add it to the path are often where you _DO_ want to cross compile.

Indeed, but you often end up doing both cross-compilation and native compilation, and it's pretty easy to get confused by a pkg-config returning absurd values.

Sure, but you would get similary confused if you ended up using the host pkg-config when cross compiling.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard 
#6 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

In reply to Thomas Petazzoni

On 02/29/16 21:35, Thomas Petazzoni wrote:
[snip]

Quoted 4 lines

What I dislike with the current setup is that if you add $(HOST_DIR)/usr/bin to your PATH, then any call to pkg-config returns values that are valid only when cross-compiling, which is not necessarily what one would expect.

For exactly this reason I would like to introduce a config-script directory,
e.g. $(HOST_DIR)/usr/cross-bin. In this directory we would put the cross-pkg-config and the fixed up config scripts we now search for in $(STAGING_DIR)/usr/bin.

Regards,
Arnout

Quoted 8 lines

However, doing this change means that any configure script or Makefile that calls pkg-config directly would no longer find our pkg-config.

Best regards,

Thomas

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#7 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

Arnout, All,

On 2016-03-01 22:12 +0100, Arnout Vandecappelle spake thusly:

Quoted 11 lines · Thomas Petazzoni

[snip]

Quoted 4 lines

What I dislike with the current setup is that if you add $(HOST_DIR)/usr/bin to your PATH, then any call to pkg-config returns values that are valid only when cross-compiling, which is not necessarily what one would expect.

For exactly this reason I would like to introduce a config-script directory,
e.g. $(HOST_DIR)/usr/cross-bin. In this directory we would put the cross-pkg-config and the fixed up config scripts we now search for in $(STAGING_DIR)/usr/bin.

Like this:
https://git.buildroot.org/~ymorin/git/buildroot/log/?h=yem/foo-config-in-PATH

Last I sent this series, Thomas was not fond of it, IIRC...

    http://lists.busybox.net/pipermail/buildroot/2015-December/thread.html#147891
    http://lists.busybox.net/pipermail/buildroot/2015-December/147927.html
    and ensuing mails...

BTW, you were in Cc for that series. ;-)

Regards,
Yann E. MORIN.

Quoted 24 lines

Regards,
Arnout

Quoted 8 lines

However, doing this change means that any configure script or Makefile that calls pkg-config directly would no longer find our pkg-config.

Best regards,

Thomas

Signature · 10 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

Quoted 15 lines · Yann E. MORIN

Arnout, All,

On 2016-03-01 22:12 +0100, Arnout Vandecappelle spake thusly:

Quoted 11 lines · Thomas Petazzoni

[snip]

Quoted 4 lines

What I dislike with the current setup is that if you add $(HOST_DIR)/usr/bin to your PATH, then any call to pkg-config returns values that are valid only when cross-compiling, which is not necessarily what one would expect.

For exactly this reason I would like to introduce a config-script directory,
e.g. $(HOST_DIR)/usr/cross-bin. In this directory we would put the cross-pkg-config and the fixed up config scripts we now search for in $(STAGING_DIR)/usr/bin.

Quoted 4 lines

Like this:
https://git.buildroot.org/~ymorin/git/buildroot/log/?h=yem/foo-config-in-PATH

Last I sent this series, Thomas was not fond of it, IIRC...

I re-read the thread and couldn't find a real argument from Thomas :-)

Quoted 6 lines
     http://lists.busybox.net/pipermail/buildroot/2015-December/thread.html#147891
     http://lists.busybox.net/pipermail/buildroot/2015-December/147927.html
     and ensuing mails...

BTW, you were in Cc for that series. ;-)

Yes, it is still in my list of 500 mails marked "I really should reply to
this, but it's going to take a bit of time so let's first do the easy stuff". Thomas DS can explain you all about that :-P

Regards,
Arnout

Quoted 29 lines

Regards,
Yann E. MORIN.

Quoted 24 lines

Regards,
Arnout

Quoted 8 lines

However, doing this change means that any configure script or Makefile that calls pkg-config directly would no longer find our pkg-config.

Best regards,

Thomas

--

Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#9 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

In reply to Jeroen Roovers

Dear Jeroen Roovers,

Quoted 12 lines · Jeroen Roovers

Lots of packages start to call pkg-config "properly" and run into failures like this:

*
* System Logging Utilities
*
syslogd (SYSLOGD) [N/y/?] n
klogd (KLOGD) [N/y/?] n
logger (LOGGER) [Y/n/?] y
make[2]: .../output/host/usr/bin/arm-buildroot-linux-gnueabihf-pkg-config: Command not found make[2]: .../output/host/usr/bin/arm-buildroot-linux-gnueabihf-pkg-config: Command not found make[1]: Leaving directory '.../output/build/busybox-1.24.1'

I think we should solve this specific problem by passing the PKG_CONFIG in the Busybox environment.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#10 lore raw

PATCH 1/1 pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config

Thomas, All,

On 2016-03-02 21:25 +0100, Thomas Petazzoni spake thusly:

Quoted 14 lines · Jeroen Roovers
Quoted 12 lines

Lots of packages start to call pkg-config "properly" and run into failures like this:

*
* System Logging Utilities
*
syslogd (SYSLOGD) [N/y/?] n
klogd (KLOGD) [N/y/?] n
logger (LOGGER) [Y/n/?] y
make[2]: .../output/host/usr/bin/arm-buildroot-linux-gnueabihf-pkg-config: Command not found make[2]: .../output/host/usr/bin/arm-buildroot-linux-gnueabihf-pkg-config: Command not found make[1]: Leaving directory '.../output/build/busybox-1.24.1'

Quoted 2 lines

I think we should solve this specific problem by passing the PKG_CONFIG in the Busybox environment.

Should we not always pass PKG_CONFIG in the target environment, instead of per-package?

Regards,
Yann E. MORIN.

Quoted 11 lines

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'