Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
@ 2016-02-29 18:22 Jeroen Roovers
  2016-02-29 19:19 ` Bernd Kuhls
  2016-03-02 20:25 ` Thomas Petazzoni
  0 siblings, 2 replies; 11+ messages in thread
From: Jeroen Roovers @ 2016-02-29 18:22 UTC (permalink / raw)
  To: buildroot

 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(+)

diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk
index c8b0cba..a183a1c 100644
--- a/package/pkgconf/pkgconf.mk
+++ b/package/pkgconf/pkgconf.mk
@@ -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
-- 
2.4.10

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

* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
  2016-02-29 18:22 [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config Jeroen Roovers
@ 2016-02-29 19:19 ` Bernd Kuhls
  2016-02-29 20:35   ` Thomas Petazzoni
  2016-03-02 20:25 ` Thomas Petazzoni
  1 sibling, 1 reply; 11+ messages in thread
From: Bernd Kuhls @ 2016-02-29 19:19 UTC (permalink / raw)
  To: buildroot

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

>  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

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

* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
  2016-02-29 19:19 ` Bernd Kuhls
@ 2016-02-29 20:35   ` Thomas Petazzoni
  2016-02-29 23:09     ` Peter Korsgaard
  2016-03-01 21:12     ` Arnout Vandecappelle
  0 siblings, 2 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2016-02-29 20:35 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 29 Feb 2016 20:19:58 +0100, Bernd Kuhls wrote:

> >  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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
  2016-02-29 20:35   ` Thomas Petazzoni
@ 2016-02-29 23:09     ` Peter Korsgaard
  2016-03-01  8:14       ` Thomas Petazzoni
  2016-03-01 21:12     ` Arnout Vandecappelle
  1 sibling, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2016-02-29 23:09 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > On Mon, 29 Feb 2016 20:19:58 +0100, Bernd Kuhls wrote:

 >> >  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.

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

 > 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.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
  2016-02-29 23:09     ` Peter Korsgaard
@ 2016-03-01  8:14       ` Thomas Petazzoni
  2016-03-01  8:15         ` Peter Korsgaard
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2016-03-01  8:14 UTC (permalink / raw)
  To: buildroot

Peter,

On Tue, 01 Mar 2016 00:09:34 +0100, Peter Korsgaard wrote:

>  > 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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
  2016-03-01  8:14       ` Thomas Petazzoni
@ 2016-03-01  8:15         ` Peter Korsgaard
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2016-03-01  8:15 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 >> 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.

-- 
Venlig hilsen,
Peter Korsgaard 

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

* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
  2016-02-29 20:35   ` Thomas Petazzoni
  2016-02-29 23:09     ` Peter Korsgaard
@ 2016-03-01 21:12     ` Arnout Vandecappelle
  2016-03-18 17:24       ` Yann E. MORIN
  1 sibling, 1 reply; 11+ messages in thread
From: Arnout Vandecappelle @ 2016-03-01 21:12 UTC (permalink / raw)
  To: buildroot

On 02/29/16 21:35, Thomas Petazzoni wrote:
[snip]
> 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

> 
> 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

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

* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
  2016-02-29 18:22 [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config Jeroen Roovers
  2016-02-29 19:19 ` Bernd Kuhls
@ 2016-03-02 20:25 ` Thomas Petazzoni
  2016-03-18 17:25   ` Yann E. MORIN
  1 sibling, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2016-03-02 20:25 UTC (permalink / raw)
  To: buildroot

Dear Jeroen Roovers,

On Mon, 29 Feb 2016 19:22:50 +0100, Jeroen Roovers wrote:
>  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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
  2016-03-01 21:12     ` Arnout Vandecappelle
@ 2016-03-18 17:24       ` Yann E. MORIN
  2016-03-18 21:14         ` Arnout Vandecappelle
  0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2016-03-18 17:24 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2016-03-01 22:12 +0100, Arnout Vandecappelle spake thusly:
> On 02/29/16 21:35, Thomas Petazzoni wrote:
> [snip]
> > 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.

>  Regards,
>  Arnout
> 
> > 
> > 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

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
  2016-03-02 20:25 ` Thomas Petazzoni
@ 2016-03-18 17:25   ` Yann E. MORIN
  0 siblings, 0 replies; 11+ messages in thread
From: Yann E. MORIN @ 2016-03-18 17:25 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2016-03-02 21:25 +0100, Thomas Petazzoni spake thusly:
> On Mon, 29 Feb 2016 19:22:50 +0100, Jeroen Roovers wrote:
> >  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.

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

Regards,
Yann E. MORIN.

> Best regards,
> 
> Thomas
> -- 
> 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

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config
  2016-03-18 17:24       ` Yann E. MORIN
@ 2016-03-18 21:14         ` Arnout Vandecappelle
  0 siblings, 0 replies; 11+ messages in thread
From: Arnout Vandecappelle @ 2016-03-18 21:14 UTC (permalink / raw)
  To: buildroot

On 03/18/16 18:24, Yann E. MORIN wrote:
> Arnout, All,
>
> On 2016-03-01 22:12 +0100, Arnout Vandecappelle spake thusly:
>> On 02/29/16 21:35, Thomas Petazzoni wrote:
>> [snip]
>>> 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...

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

>
>      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


>
> Regards,
> Yann E. MORIN.
>
>>   Regards,
>>   Arnout
>>
>>>
>>> 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
>


-- 
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

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

end of thread, other threads:[~2016-03-18 21:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 18:22 [Buildroot] [PATCH] pkgconf: Add a symlink to the GNU_TARGET_NAME-pkg-config Jeroen Roovers
2016-02-29 19:19 ` Bernd Kuhls
2016-02-29 20:35   ` Thomas Petazzoni
2016-02-29 23:09     ` Peter Korsgaard
2016-03-01  8:14       ` Thomas Petazzoni
2016-03-01  8:15         ` Peter Korsgaard
2016-03-01 21:12     ` Arnout Vandecappelle
2016-03-18 17:24       ` Yann E. MORIN
2016-03-18 21:14         ` Arnout Vandecappelle
2016-03-02 20:25 ` Thomas Petazzoni
2016-03-18 17:25   ` 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