Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] vala: add vala/valac wrapper
Date: Sun, 21 Feb 2016 22:28:16 +0100	[thread overview]
Message-ID: <20160221222816.4e53e921@free-electrons.com> (raw)
In-Reply-To: <1454428908-7183-1-git-send-email-gustavo@zacarias.com.ar>

Gustavo,

On Tue,  2 Feb 2016 13:01:46 -0300, Gustavo Zacarias wrote:

> +# We wrap vala & valac to point to the proper gir and vapi data dirs
> +# Otherwise we'll get host directory data which isn't enough
> +define HOST_VALA_INSTALL_WRAPPER
> +	$(INSTALL) -D -m 0755 package/vala/vala-wrapper \
> +		$(HOST_DIR)/usr/bin/vala
> +	$(INSTALL) -D -m 0755 package/vala/vala-wrapper \
> +		$(HOST_DIR)/usr/bin/valac
> +	$(SED) 's, at VALA_VERSION@,$(VALA_VERSION_MAJOR),' \
> +		$(HOST_DIR)/usr/bin/vala
> +	$(SED) 's, at STAGING_DIR@,$(STAGING_DIR),g' \
> +		$(HOST_DIR)/usr/bin/vala
> +	$(SED) 's, at VALA_VERSION@,$(VALA_VERSION_MAJOR),' \
> +		$(HOST_DIR)/usr/bin/valac
> +	$(SED) 's, at STAGING_DIR@,$(STAGING_DIR),g' \
> +		$(HOST_DIR)/usr/bin/valac
> +endef
> +HOST_VALA_POST_INSTALL_HOOKS += HOST_VALA_INSTALL_WRAPPER

So if I understand correctly, the idea is to replace the vala ->
vala-3.0 and valac -> valac-3.0 symbolic links by wrappers.

So I did a test, first without your patch, with a stupid vala hello
world program:

thomas at skate:~/projets/buildroot (next)$ cat > pouet.vala
class Demo.HelloWorld : GLib.Object {

    public static int main(string[] args) {

        stdout.printf("Hello, World\n");

        return 0;
    }
}
thomas at skate:~/projets/buildroot (next)$ ./output/host/usr/bin/vala pouet.vala 
Hello, World
thomas at skate:~/projets/buildroot (next)$ ./output/host/usr/bin/valac pouet.vala 
thomas at skate:~/projets/buildroot (next)$ file pouet
pouet: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d13ab11a4b8d24623f8ead3e8e3c1c9e73d16df0, not stripped

So, the program runs fine on the host with "vala", and compiles to a
x86-64 executable. Not really surprising since it's a host-vala
installation not tuned for cross-compilation.

Then, I apply your patch, rebuild host-vala, and do the same test:

thomas at skate:~/projets/buildroot (next)$ ./output/host/usr/bin/vala pouet.vala 
error: --girdir=/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/share/gir-1.0 not found

What package is supposed to install gir-1.0 in staging ?

thomas at skate:~/projets/buildroot (next)$ ./output/host/usr/bin/valac pouet.vala 
thomas at skate:~/projets/buildroot (next)$ file pouet
pouet: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d13ab11a4b8d24623f8ead3e8e3c1c9e73d16df0, not stripped

But it still compiles to a host binary. Am I missing something ?

Could you improve the commit log with more explanations for people
(like me) who don't know vala, and don't understand what your patch is
fixing exactly ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2016-02-21 21:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 16:01 [Buildroot] [PATCH 1/3] vala: add vala/valac wrapper Gustavo Zacarias
2016-02-02 16:01 ` [Buildroot] [PATCH 2/3] libgee: new package Gustavo Zacarias
2016-02-02 16:01 ` [Buildroot] [PATCH 3/3] granite: " Gustavo Zacarias
2016-02-21 21:28 ` Thomas Petazzoni [this message]
2016-02-22  1:22   ` [Buildroot] [PATCH 1/3] vala: add vala/valac wrapper Gustavo Zacarias
2016-02-22 23:47     ` Arnout Vandecappelle
2016-02-23  0:18       ` Gustavo Zacarias
2016-02-23  0:40         ` Arnout Vandecappelle
2016-02-23  1:06           ` Gustavo Zacarias
2016-02-23  9:42             ` Arnout Vandecappelle
2016-02-23  9:48               ` Thomas Petazzoni
2016-02-23 15:19                 ` Peter Korsgaard
2016-02-23 19:43                 ` Arnout Vandecappelle
2016-02-23 20:58                   ` Thomas Petazzoni
2016-02-23  9:10         ` Thomas Petazzoni
2016-02-22 23:48 ` Arnout Vandecappelle
2016-02-23  0:27   ` Gustavo Zacarias
2016-02-23  0:30     ` Arnout Vandecappelle

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=20160221222816.4e53e921@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox