All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	Stefan Weil <sw@weilnetz.de>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] configure: Save PKG_CONFIG_LIBDIR and WINDRES in config.status
Date: Tue, 4 Sep 2018 11:43:33 +0100	[thread overview]
Message-ID: <20180904104333.GC22349@redhat.com> (raw)
In-Reply-To: <1536044538-22507-1-git-send-email-thuth@redhat.com>

On Tue, Sep 04, 2018 at 09:02:18AM +0200, Thomas Huth wrote:
> When cross-compiling QEMU for a target that significantly differs from
> the host, the current information in config.status is not enough to
> properly re-create the configuration. For example when I try to test
> my build with the mingw32 cross-compiler, I regularly get this error
> after the build system tried to re-create the configuration with the
> config.status file:
> 
> ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
>        You probably need to set PKG_CONFIG_LIBDIR
>        to point to the right pkg-config files for your
>        build target
> 
> A similar problem exists for the "windres" tool, where you have to
> set the WINDRES variable in case it has a different name.
> So let's fix these issues by storing the configuration for these
> variables in the config.status file, too.

Doh, I sent a patch to fix this problem more broadly years ago now:

  https://lists.nongnu.org/archive/html/qemu-devel/2015-11/msg04157.html

but it appears no maintainer ever merged it !

> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  configure | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/configure b/configure
> index 58862d2..4d8888f 100755
> --- a/configure
> +++ b/configure
> @@ -7534,6 +7534,12 @@ cat <<EOD >config.status
>  # Compiler output produced by configure, useful for debugging
>  # configure, is in config.log if it exists.
>  EOD
> +if [ -n "$PKG_CONFIG_LIBDIR" ]; then
> +    echo "export PKG_CONFIG_LIBDIR=\"$PKG_CONFIG_LIBDIR\"" >>config.status
> +fi
> +if [ -n "$WINDRES" ]; then
> +    echo "export WINDRES=\"$WINDRES\"" >>config.status
> +fi
>  printf "exec" >>config.status
>  printf " '%s'" "$0" "$@" >>config.status
>  echo ' "$@"' >>config.status

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


WARNING: multiple messages have this Message-ID (diff)
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	Stefan Weil <sw@weilnetz.de>
Subject: Re: [Qemu-devel] [PATCH] configure: Save PKG_CONFIG_LIBDIR and WINDRES in config.status
Date: Tue, 4 Sep 2018 11:43:33 +0100	[thread overview]
Message-ID: <20180904104333.GC22349@redhat.com> (raw)
In-Reply-To: <1536044538-22507-1-git-send-email-thuth@redhat.com>

On Tue, Sep 04, 2018 at 09:02:18AM +0200, Thomas Huth wrote:
> When cross-compiling QEMU for a target that significantly differs from
> the host, the current information in config.status is not enough to
> properly re-create the configuration. For example when I try to test
> my build with the mingw32 cross-compiler, I regularly get this error
> after the build system tried to re-create the configuration with the
> config.status file:
> 
> ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
>        You probably need to set PKG_CONFIG_LIBDIR
>        to point to the right pkg-config files for your
>        build target
> 
> A similar problem exists for the "windres" tool, where you have to
> set the WINDRES variable in case it has a different name.
> So let's fix these issues by storing the configuration for these
> variables in the config.status file, too.

Doh, I sent a patch to fix this problem more broadly years ago now:

  https://lists.nongnu.org/archive/html/qemu-devel/2015-11/msg04157.html

but it appears no maintainer ever merged it !

> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  configure | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/configure b/configure
> index 58862d2..4d8888f 100755
> --- a/configure
> +++ b/configure
> @@ -7534,6 +7534,12 @@ cat <<EOD >config.status
>  # Compiler output produced by configure, useful for debugging
>  # configure, is in config.log if it exists.
>  EOD
> +if [ -n "$PKG_CONFIG_LIBDIR" ]; then
> +    echo "export PKG_CONFIG_LIBDIR=\"$PKG_CONFIG_LIBDIR\"" >>config.status
> +fi
> +if [ -n "$WINDRES" ]; then
> +    echo "export WINDRES=\"$WINDRES\"" >>config.status
> +fi
>  printf "exec" >>config.status
>  printf " '%s'" "$0" "$@" >>config.status
>  echo ' "$@"' >>config.status

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

  parent reply	other threads:[~2018-09-04 10:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04  7:02 [Qemu-trivial] [PATCH] configure: Save PKG_CONFIG_LIBDIR and WINDRES in config.status Thomas Huth
2018-09-04  7:02 ` [Qemu-devel] " Thomas Huth
2018-09-04 10:35 ` [Qemu-trivial] " Peter Maydell
2018-09-04 10:35   ` Peter Maydell
2018-09-04 10:53   ` [Qemu-trivial] " Thomas Huth
2018-09-04 10:53     ` Thomas Huth
2018-09-04 12:12     ` [Qemu-trivial] " Peter Maydell
2018-09-04 12:12       ` Peter Maydell
2018-09-04 10:43 ` Daniel P. Berrangé [this message]
2018-09-04 10:43   ` Daniel P. Berrangé
2018-09-04 10:58   ` [Qemu-trivial] " Thomas Huth
2018-09-04 10:58     ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180904104333.GC22349@redhat.com \
    --to=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sw@weilnetz.de \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.