qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH qemu] configure/fdt: Use more strict test for libfdt version
@ 2018-11-15  3:56 Alexey Kardashevskiy
  2018-11-15 10:11 ` Daniel P. Berrangé
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Kardashevskiy @ 2018-11-15  3:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, David Gibson

The libfdt installed in the system is preferred to the dtc submodule by
default. The recent libfdt update added a new symbol - fdt_check_full -
and this breaks compile if there is an older libfdt installed in
the system.

This changes the test to force ./configure into using newer libfdt.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 74e313a..7e16a6c 100755
--- a/configure
+++ b/configure
@@ -3826,7 +3826,7 @@ if test "$fdt" != "no" ; then
   cat > $TMPC << EOF
 #include <libfdt.h>
 #include <libfdt_env.h>
-int main(void) { fdt_first_subnode(0, 0); return 0; }
+int main(void) { fdt_check_full(NULL, 0); return 0; }
 EOF
   if compile_prog "" "$fdt_libs" ; then
     # system DTC is good - use it
-- 
2.17.1

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

* Re: [Qemu-devel] [PATCH qemu] configure/fdt: Use more strict test for libfdt version
  2018-11-15  3:56 [Qemu-devel] [PATCH qemu] configure/fdt: Use more strict test for libfdt version Alexey Kardashevskiy
@ 2018-11-15 10:11 ` Daniel P. Berrangé
  2018-11-15 10:33   ` David Gibson
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel P. Berrangé @ 2018-11-15 10:11 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-devel, qemu-ppc, David Gibson

On Thu, Nov 15, 2018 at 02:56:59PM +1100, Alexey Kardashevskiy wrote:
> The libfdt installed in the system is preferred to the dtc submodule by
> default. The recent libfdt update added a new symbol - fdt_check_full -
> and this breaks compile if there is an older libfdt installed in
> the system.

Unless I'm missing something, QEMU doesn't use the fdt_check_full symbol,
so why would the lack of this symbol cause a compile failure. 

It should be fine if the dtc submodule contains a newer libfdt than the
host system. As long as QEMU doesn't actually need any of the APIs in
the newer libfdt we should be able to continue using the older system
version if it is present.

Could you elaborate on what build problems you are having.

> This changes the test to force ./configure into using newer libfdt.

I'm not convinced we want todo that.

> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 74e313a..7e16a6c 100755
> --- a/configure
> +++ b/configure
> @@ -3826,7 +3826,7 @@ if test "$fdt" != "no" ; then
>    cat > $TMPC << EOF
>  #include <libfdt.h>
>  #include <libfdt_env.h>
> -int main(void) { fdt_first_subnode(0, 0); return 0; }
> +int main(void) { fdt_check_full(NULL, 0); return 0; }
>  EOF
>    if compile_prog "" "$fdt_libs" ; then
>      # system DTC is good - use it

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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

* Re: [Qemu-devel] [PATCH qemu] configure/fdt: Use more strict test for libfdt version
  2018-11-15 10:11 ` Daniel P. Berrangé
@ 2018-11-15 10:33   ` David Gibson
  2018-11-15 10:39     ` Daniel P. Berrangé
  0 siblings, 1 reply; 4+ messages in thread
From: David Gibson @ 2018-11-15 10:33 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: Alexey Kardashevskiy, qemu-devel, qemu-ppc

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

On Thu, Nov 15, 2018 at 10:11:12AM +0000, Daniel P. Berrangé wrote:
> On Thu, Nov 15, 2018 at 02:56:59PM +1100, Alexey Kardashevskiy wrote:
> > The libfdt installed in the system is preferred to the dtc submodule by
> > default. The recent libfdt update added a new symbol - fdt_check_full -
> > and this breaks compile if there is an older libfdt installed in
> > the system.
> 
> Unless I'm missing something, QEMU doesn't use the fdt_check_full symbol,
> so why would the lack of this symbol cause a compile failure. 
> 
> It should be fine if the dtc submodule contains a newer libfdt than the
> host system. As long as QEMU doesn't actually need any of the APIs in
> the newer libfdt we should be able to continue using the older system
> version if it is present.
> 
> Could you elaborate on what build problems you are having.
> 
> > This changes the test to force ./configure into using newer libfdt.
> 
> I'm not convinced we want todo that.

So I think the point here is that Alexey has some other outstanding
patches that will use fdt_check_full().  The commit message needs to
make that clear though.  Or else include this patch in that series.

> 
> > 
> > Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> > ---
> >  configure | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/configure b/configure
> > index 74e313a..7e16a6c 100755
> > --- a/configure
> > +++ b/configure
> > @@ -3826,7 +3826,7 @@ if test "$fdt" != "no" ; then
> >    cat > $TMPC << EOF
> >  #include <libfdt.h>
> >  #include <libfdt_env.h>
> > -int main(void) { fdt_first_subnode(0, 0); return 0; }
> > +int main(void) { fdt_check_full(NULL, 0); return 0; }
> >  EOF
> >    if compile_prog "" "$fdt_libs" ; then
> >      # system DTC is good - use it
> 
> Regards,
> Daniel

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [Qemu-devel] [PATCH qemu] configure/fdt: Use more strict test for libfdt version
  2018-11-15 10:33   ` David Gibson
@ 2018-11-15 10:39     ` Daniel P. Berrangé
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2018-11-15 10:39 UTC (permalink / raw)
  To: David Gibson; +Cc: Alexey Kardashevskiy, qemu-devel, qemu-ppc

On Thu, Nov 15, 2018 at 09:33:08PM +1100, David Gibson wrote:
> On Thu, Nov 15, 2018 at 10:11:12AM +0000, Daniel P. Berrangé wrote:
> > On Thu, Nov 15, 2018 at 02:56:59PM +1100, Alexey Kardashevskiy wrote:
> > > The libfdt installed in the system is preferred to the dtc submodule by
> > > default. The recent libfdt update added a new symbol - fdt_check_full -
> > > and this breaks compile if there is an older libfdt installed in
> > > the system.
> > 
> > Unless I'm missing something, QEMU doesn't use the fdt_check_full symbol,
> > so why would the lack of this symbol cause a compile failure. 
> > 
> > It should be fine if the dtc submodule contains a newer libfdt than the
> > host system. As long as QEMU doesn't actually need any of the APIs in
> > the newer libfdt we should be able to continue using the older system
> > version if it is present.
> > 
> > Could you elaborate on what build problems you are having.
> > 
> > > This changes the test to force ./configure into using newer libfdt.
> > 
> > I'm not convinced we want todo that.
> 
> So I think the point here is that Alexey has some other outstanding
> patches that will use fdt_check_full().  The commit message needs to
> make that clear though.  Or else include this patch in that series.

If they're not merged yet, this patch should be squashed into whichever
of those patches first introduces the need for fdt_check_full(), so that
series remains fully  git bisectable.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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

end of thread, other threads:[~2018-11-15 10:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-15  3:56 [Qemu-devel] [PATCH qemu] configure/fdt: Use more strict test for libfdt version Alexey Kardashevskiy
2018-11-15 10:11 ` Daniel P. Berrangé
2018-11-15 10:33   ` David Gibson
2018-11-15 10:39     ` Daniel P. Berrangé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).