Openembedded Core Discussions
 help / color / mirror / Atom feed
* Re: [oe-commits] Cristian Iorga : qemu: fix qemu-native pkg-config paths
       [not found] <20140703164708.452165036A@opal.openembedded.org>
@ 2014-07-18 20:50 ` Martin Jansa
  2014-07-24 22:04   ` Martin Jansa
  2014-07-30  9:32   ` Martin Jansa
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Jansa @ 2014-07-18 20:50 UTC (permalink / raw)
  To: openembedded-core, Cristian Iorga; +Cc: openembedded-commits

[-- Attachment #1: Type: text/plain, Size: 2831 bytes --]

On Thu, Jul 03, 2014 at 04:47:08PM +0000, git@git.openembedded.org wrote:
> Module: openembedded-core.git
> Branch: master
> Commit: 68a5ed337f8f7ee8e5bf55542ec82d786eb754db
> URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=68a5ed337f8f7ee8e5bf55542ec82d786eb754db
> 
> Author: Cristian Iorga <cristian.iorga@intel.com>
> Date:   Thu Jul  3 15:57:32 2014 +0300
> 
> qemu: fix qemu-native pkg-config paths
> 
> For qemu-native, the pkg-config paths do not
> include build host paths.

This breaks qemu-native builds on hosts without pkg-config.

pkg-config isn't in sanity.bbclass's SANITY_REQUIRED_UTILITIES
and this is first recipe which cannot use pkgconfig-native.

Please add test that it exists before forcing recipe to use it.

> This is an issue for libsdl for example, where SDL is
> used by qemu, but for qemu-native libsdl-native is not
> built, but assumed to be provided by the build host.
> Because pkg-config do not search for libsdl config files
> on the build host sysroot, the configure stage of qemu-native
> will fail because it will not find SDL as being installed.
> Usually, the isssue is masked by a functional sdl-config that
> will be interogated instead of pkg-config. However, on Build
> Appliance, sdl-config is deliberately made non-functional,
> so the issue manifests itself.
> 
> The fix will create an extended PKG_CONFIG_PATH, which does
> include the build host sysroot paths for pkg-config.
> 
> Fix for [YOCTO #6495].
> 
> Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> ---
> 
>  meta/recipes-devtools/qemu/qemu.inc | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
> index 076e8ad..611ee61 100644
> --- a/meta/recipes-devtools/qemu/qemu.inc
> +++ b/meta/recipes-devtools/qemu/qemu.inc
> @@ -33,6 +33,10 @@ EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disa
>  export LIBTOOL="${HOST_SYS}-libtool"
>  
>  do_configure_prepend_class-native() {
> +	# Append build host pkg-config paths for native target since the host may provide sdl
> +	BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config)
> +	export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
> +
>  	# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
>  	sed -i 's/-lX11//g' Makefile.target
>  }
> 
> -- 
> _______________________________________________
> Openembedded-commits mailing list
> Openembedded-commits@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-commits

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [oe-commits] Cristian Iorga : qemu: fix qemu-native pkg-config paths
  2014-07-18 20:50 ` [oe-commits] Cristian Iorga : qemu: fix qemu-native pkg-config paths Martin Jansa
@ 2014-07-24 22:04   ` Martin Jansa
  2014-07-30  9:32   ` Martin Jansa
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2014-07-24 22:04 UTC (permalink / raw)
  To: openembedded-core, Cristian Iorga; +Cc: openembedded-commits

[-- Attachment #1: Type: text/plain, Size: 3105 bytes --]

On Fri, Jul 18, 2014 at 10:50:12PM +0200, Martin Jansa wrote:
> On Thu, Jul 03, 2014 at 04:47:08PM +0000, git@git.openembedded.org wrote:
> > Module: openembedded-core.git
> > Branch: master
> > Commit: 68a5ed337f8f7ee8e5bf55542ec82d786eb754db
> > URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=68a5ed337f8f7ee8e5bf55542ec82d786eb754db
> > 
> > Author: Cristian Iorga <cristian.iorga@intel.com>
> > Date:   Thu Jul  3 15:57:32 2014 +0300
> > 
> > qemu: fix qemu-native pkg-config paths
> > 
> > For qemu-native, the pkg-config paths do not
> > include build host paths.
> 
> This breaks qemu-native builds on hosts without pkg-config.
> 
> pkg-config isn't in sanity.bbclass's SANITY_REQUIRED_UTILITIES
> and this is first recipe which cannot use pkgconfig-native.
> 
> Please add test that it exists before forcing recipe to use it.

ping

> > This is an issue for libsdl for example, where SDL is
> > used by qemu, but for qemu-native libsdl-native is not
> > built, but assumed to be provided by the build host.
> > Because pkg-config do not search for libsdl config files
> > on the build host sysroot, the configure stage of qemu-native
> > will fail because it will not find SDL as being installed.
> > Usually, the isssue is masked by a functional sdl-config that
> > will be interogated instead of pkg-config. However, on Build
> > Appliance, sdl-config is deliberately made non-functional,
> > so the issue manifests itself.
> > 
> > The fix will create an extended PKG_CONFIG_PATH, which does
> > include the build host sysroot paths for pkg-config.
> > 
> > Fix for [YOCTO #6495].
> > 
> > Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > 
> > ---
> > 
> >  meta/recipes-devtools/qemu/qemu.inc | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
> > index 076e8ad..611ee61 100644
> > --- a/meta/recipes-devtools/qemu/qemu.inc
> > +++ b/meta/recipes-devtools/qemu/qemu.inc
> > @@ -33,6 +33,10 @@ EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disa
> >  export LIBTOOL="${HOST_SYS}-libtool"
> >  
> >  do_configure_prepend_class-native() {
> > +	# Append build host pkg-config paths for native target since the host may provide sdl
> > +	BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config)
> > +	export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
> > +
> >  	# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
> >  	sed -i 's/-lX11//g' Makefile.target
> >  }
> > 
> > -- 
> > _______________________________________________
> > Openembedded-commits mailing list
> > Openembedded-commits@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-commits
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [oe-commits] Cristian Iorga : qemu: fix qemu-native pkg-config paths
  2014-07-18 20:50 ` [oe-commits] Cristian Iorga : qemu: fix qemu-native pkg-config paths Martin Jansa
  2014-07-24 22:04   ` Martin Jansa
@ 2014-07-30  9:32   ` Martin Jansa
  2014-07-30 13:28     ` Richard Purdie
  1 sibling, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2014-07-30  9:32 UTC (permalink / raw)
  To: openembedded-core, Cristian Iorga; +Cc: openembedded-commits

[-- Attachment #1: Type: text/plain, Size: 3198 bytes --]

On Fri, Jul 18, 2014 at 10:50:12PM +0200, Martin Jansa wrote:
> On Thu, Jul 03, 2014 at 04:47:08PM +0000, git@git.openembedded.org wrote:
> > Module: openembedded-core.git
> > Branch: master
> > Commit: 68a5ed337f8f7ee8e5bf55542ec82d786eb754db
> > URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=68a5ed337f8f7ee8e5bf55542ec82d786eb754db
> > 
> > Author: Cristian Iorga <cristian.iorga@intel.com>
> > Date:   Thu Jul  3 15:57:32 2014 +0300
> > 
> > qemu: fix qemu-native pkg-config paths
> > 
> > For qemu-native, the pkg-config paths do not
> > include build host paths.
> 
> This breaks qemu-native builds on hosts without pkg-config.
> 
> pkg-config isn't in sanity.bbclass's SANITY_REQUIRED_UTILITIES
> and this is first recipe which cannot use pkgconfig-native.
> 
> Please add test that it exists before forcing recipe to use it.

PING

This is broken for almost a month, please at least revert it until it's
fixed correctly.

> > This is an issue for libsdl for example, where SDL is
> > used by qemu, but for qemu-native libsdl-native is not
> > built, but assumed to be provided by the build host.
> > Because pkg-config do not search for libsdl config files
> > on the build host sysroot, the configure stage of qemu-native
> > will fail because it will not find SDL as being installed.
> > Usually, the isssue is masked by a functional sdl-config that
> > will be interogated instead of pkg-config. However, on Build
> > Appliance, sdl-config is deliberately made non-functional,
> > so the issue manifests itself.
> > 
> > The fix will create an extended PKG_CONFIG_PATH, which does
> > include the build host sysroot paths for pkg-config.
> > 
> > Fix for [YOCTO #6495].
> > 
> > Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > 
> > ---
> > 
> >  meta/recipes-devtools/qemu/qemu.inc | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
> > index 076e8ad..611ee61 100644
> > --- a/meta/recipes-devtools/qemu/qemu.inc
> > +++ b/meta/recipes-devtools/qemu/qemu.inc
> > @@ -33,6 +33,10 @@ EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disa
> >  export LIBTOOL="${HOST_SYS}-libtool"
> >  
> >  do_configure_prepend_class-native() {
> > +	# Append build host pkg-config paths for native target since the host may provide sdl
> > +	BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config)
> > +	export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
> > +
> >  	# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
> >  	sed -i 's/-lX11//g' Makefile.target
> >  }
> > 
> > -- 
> > _______________________________________________
> > Openembedded-commits mailing list
> > Openembedded-commits@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-commits
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com



-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [oe-commits] Cristian Iorga : qemu: fix qemu-native pkg-config paths
  2014-07-30  9:32   ` Martin Jansa
@ 2014-07-30 13:28     ` Richard Purdie
  2014-07-30 14:05       ` Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2014-07-30 13:28 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-commits, openembedded-core

On Wed, 2014-07-30 at 11:32 +0200, Martin Jansa wrote:
> On Fri, Jul 18, 2014 at 10:50:12PM +0200, Martin Jansa wrote:
> > On Thu, Jul 03, 2014 at 04:47:08PM +0000, git@git.openembedded.org wrote:
> > > Module: openembedded-core.git
> > > Branch: master
> > > Commit: 68a5ed337f8f7ee8e5bf55542ec82d786eb754db
> > > URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=68a5ed337f8f7ee8e5bf55542ec82d786eb754db
> > > 
> > > Author: Cristian Iorga <cristian.iorga@intel.com>
> > > Date:   Thu Jul  3 15:57:32 2014 +0300
> > > 
> > > qemu: fix qemu-native pkg-config paths
> > > 
> > > For qemu-native, the pkg-config paths do not
> > > include build host paths.
> > 
> > This breaks qemu-native builds on hosts without pkg-config.
> > 
> > pkg-config isn't in sanity.bbclass's SANITY_REQUIRED_UTILITIES
> > and this is first recipe which cannot use pkgconfig-native.
> > 
> > Please add test that it exists before forcing recipe to use it.
> 
> PING
> 
> This is broken for almost a month, please at least revert it until it's
> fixed correctly.

Well, if I revert this, I'd then need to revert other things and it
turns into a dependency chain nightmare. So the reality is this needs to
get fixed.

I'm assuming in your case, you probably either don't have or care about
SDL at all, or you have sdl-config available?

So what really needs to happen here is that running the command needs to
become non-fatal as far as I can tell?

Cheers,

Richard



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

* Re: [oe-commits] Cristian Iorga : qemu: fix qemu-native pkg-config paths
  2014-07-30 13:28     ` Richard Purdie
@ 2014-07-30 14:05       ` Martin Jansa
  2014-07-30 14:11         ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2014-07-30 14:05 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-commits, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2347 bytes --]

On Wed, Jul 30, 2014 at 02:28:28PM +0100, Richard Purdie wrote:
> On Wed, 2014-07-30 at 11:32 +0200, Martin Jansa wrote:
> > On Fri, Jul 18, 2014 at 10:50:12PM +0200, Martin Jansa wrote:
> > > On Thu, Jul 03, 2014 at 04:47:08PM +0000, git@git.openembedded.org wrote:
> > > > Module: openembedded-core.git
> > > > Branch: master
> > > > Commit: 68a5ed337f8f7ee8e5bf55542ec82d786eb754db
> > > > URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=68a5ed337f8f7ee8e5bf55542ec82d786eb754db
> > > > 
> > > > Author: Cristian Iorga <cristian.iorga@intel.com>
> > > > Date:   Thu Jul  3 15:57:32 2014 +0300
> > > > 
> > > > qemu: fix qemu-native pkg-config paths
> > > > 
> > > > For qemu-native, the pkg-config paths do not
> > > > include build host paths.
> > > 
> > > This breaks qemu-native builds on hosts without pkg-config.
> > > 
> > > pkg-config isn't in sanity.bbclass's SANITY_REQUIRED_UTILITIES
> > > and this is first recipe which cannot use pkgconfig-native.
> > > 
> > > Please add test that it exists before forcing recipe to use it.
> > 
> > PING
> > 
> > This is broken for almost a month, please at least revert it until it's
> > fixed correctly.
> 
> Well, if I revert this, I'd then need to revert other things and it
> turns into a dependency chain nightmare. So the reality is this needs to
> get fixed.
> 
> I'm assuming in your case, you probably either don't have or care about
> SDL at all, or you have sdl-config available?

Correct, it's just build server where I'll never use runqemu to run the
image, but I need to build usable qemu-native to generate read-only
images (e.g. for fontcache.bbclass).

> So what really needs to happen here is that running the command needs to
> become non-fatal as far as I can tell?

Yes, non-fatal and if possible deterministic (AFAIK this whole block could be
included in PACKAGECONFIG contains "sdl" conditional and applied only
when /bin/pkg-config or /usr/bin/pkg-config exists)

There was also request to provide libsdl-native
http://patchwork.openembedded.org/patch/63477/

then qemu-native could just build this libsdl-native as dependency for
PACKAGECONFIG sdl instead of assuming that the host system has
undeclared libsdl-native dependency. 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [oe-commits] Cristian Iorga : qemu: fix qemu-native pkg-config paths
  2014-07-30 14:05       ` Martin Jansa
@ 2014-07-30 14:11         ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2014-07-30 14:11 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-commits, openembedded-core

On Wed, 2014-07-30 at 16:05 +0200, Martin Jansa wrote:
> On Wed, Jul 30, 2014 at 02:28:28PM +0100, Richard Purdie wrote:
> > On Wed, 2014-07-30 at 11:32 +0200, Martin Jansa wrote:
> > 
> > I'm assuming in your case, you probably either don't have or care about
> > SDL at all, or you have sdl-config available?
> 
> Correct, it's just build server where I'll never use runqemu to run the
> image, but I need to build usable qemu-native to generate read-only
> images (e.g. for fontcache.bbclass).

Ok, fair enough. We should be able to make this work then.

> > So what really needs to happen here is that running the command needs to
> > become non-fatal as far as I can tell?
> 
> Yes, non-fatal and if possible deterministic (AFAIK this whole block could be
> included in PACKAGECONFIG contains "sdl" conditional and applied only
> when /bin/pkg-config or /usr/bin/pkg-config exists)

That is a step beyond the patch I've sent, it would be a nice
improvement though.

> There was also request to provide libsdl-native
> http://patchwork.openembedded.org/patch/63477/
> 
> then qemu-native could just build this libsdl-native as dependency for
> PACKAGECONFIG sdl instead of assuming that the host system has
> undeclared libsdl-native dependency. 

Its very hard to make a libsdl-native work properly when you consider
things like GL which is why I'd really prefer to ignore libsdl-native if
we can. I certainly do not want the bugs about GL support being broken
in it which are where this leads :(

Cheers,

Richard



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

end of thread, other threads:[~2014-07-30 14:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20140703164708.452165036A@opal.openembedded.org>
2014-07-18 20:50 ` [oe-commits] Cristian Iorga : qemu: fix qemu-native pkg-config paths Martin Jansa
2014-07-24 22:04   ` Martin Jansa
2014-07-30  9:32   ` Martin Jansa
2014-07-30 13:28     ` Richard Purdie
2014-07-30 14:05       ` Martin Jansa
2014-07-30 14:11         ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox