Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] meson: add a backported patch to address vala cross-compilation errors
@ 2019-08-02 15:57 Alexander Kanavin
  2019-08-02 16:31 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2019-08-02 15:57 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 meta/recipes-devtools/meson/meson.inc         |  1 +
 .../meson/meson/vala-cross-compile.patch      | 50 +++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 meta/recipes-devtools/meson/meson/vala-cross-compile.patch

diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
index b9a05967f46..662368e2196 100644
--- a/meta/recipes-devtools/meson/meson.inc
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -15,6 +15,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
            file://0001-mesonbuild-environment.py-do-not-determine-whether-a.patch \
            file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \
            file://0001-modules-python.py-do-not-substitute-python-s-install.patch \
+           file://vala-cross-compile.patch \
            "
 SRC_URI[sha256sum] = "f27b7a60f339ba66fe4b8f81f0d1072e090a08eabbd6aa287683b2c2b9dd2d82"
 SRC_URI[md5sum] = "48787e391ec5c052799a3dd491f73909"
diff --git a/meta/recipes-devtools/meson/meson/vala-cross-compile.patch b/meta/recipes-devtools/meson/meson/vala-cross-compile.patch
new file mode 100644
index 00000000000..816f810c054
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/vala-cross-compile.patch
@@ -0,0 +1,50 @@
+From 77c3e6a4aaed07e626f4bf4deb7eb66e0f03a33d Mon Sep 17 00:00:00 2001
+From: James Westman <flyingpimonster@flyingpimonster.net>
+Date: Mon, 24 Jun 2019 12:04:12 -0500
+Subject: [PATCH] Fix two errors when cross-compiling with Vala
+
+- AttributeError: 'ValaCompiler' object has no attribute 'get_program_dirs'
+
+  Fixed by adding a `get_program_dirs()` function to the base Compiler
+  class, to match `get_library_dirs()`
+
+- KeyError: 'vala_COMPILER'
+
+  Fixed by creating the Vala compile rules for all machines, not just
+  the build machine.
+
+Upstream-Status: Backport [https://github.com/mesonbuild/meson/commit/77c3e6a4aaed07e626f4bf4deb7eb66e0f03a33d]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/backend/ninjabackend.py | 3 +--
+ mesonbuild/compilers/compilers.py  | 3 +++
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
+index a454e6ab5f..b830e377e4 100644
+--- a/mesonbuild/backend/ninjabackend.py
++++ b/mesonbuild/backend/ninjabackend.py
+@@ -1653,8 +1653,7 @@ def generate_compile_rule_for(self, langname, compiler):
+                 self.generate_cs_compile_rule(compiler)
+             return
+         if langname == 'vala':
+-            if self.environment.machines.matches_build_machine(compiler.for_machine):
+-                self.generate_vala_compile_rules(compiler)
++            self.generate_vala_compile_rules(compiler)
+             return
+         if langname == 'rust':
+             self.generate_rust_compile_rules(compiler)
+diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
+index 5855de71c8..86c1e33407 100644
+--- a/mesonbuild/compilers/compilers.py
++++ b/mesonbuild/compilers/compilers.py
+@@ -1117,6 +1117,9 @@ def find_library(self, *args, **kwargs):
+     def get_library_dirs(self, *args, **kwargs):
+         return ()
+ 
++    def get_program_dirs(self, *args, **kwargs):
++        return ()
++
+     def has_multi_arguments(self, args, env) -> Tuple[bool, bool]:
+         raise EnvironmentException(
+             'Language {} does not support has_multi_arguments.'.format(
-- 
2.17.1



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

* ✗ patchtest: failure for meson: add a backported patch to address vala cross-compilation errors
  2019-08-02 15:57 [PATCH] meson: add a backported patch to address vala cross-compilation errors Alexander Kanavin
@ 2019-08-02 16:31 ` Patchwork
  2019-08-02 16:36   ` Alexander Kanavin
  0 siblings, 1 reply; 3+ messages in thread
From: Patchwork @ 2019-08-02 16:31 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core

== Series Details ==

Series: meson: add a backported patch to address vala cross-compilation errors
Revision: 1
URL   : https://patchwork.openembedded.org/series/19056/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at fc634c41e4)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

* Re: ✗ patchtest: failure for meson: add a backported patch to address vala cross-compilation errors
  2019-08-02 16:31 ` ✗ patchtest: failure for " Patchwork
@ 2019-08-02 16:36   ` Alexander Kanavin
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Kanavin @ 2019-08-02 16:36 UTC (permalink / raw)
  To: OE-core

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

On Fri, 2 Aug 2019 at 18:31, Patchwork <patchwork@patchwork.openembedded.org>
wrote:

>
> * Issue             Series does not apply on top of target branch
> [test_series_merge_on_head]
>   Suggested fix    Rebase your series on top of targeted branch
>   Targeted branch  master (currently at fc634c41e4)
>

This is intended; the patch is sent on top of meson patches already in
master-next.

Alex

[-- Attachment #2: Type: text/html, Size: 746 bytes --]

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

end of thread, other threads:[~2019-08-02 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-02 15:57 [PATCH] meson: add a backported patch to address vala cross-compilation errors Alexander Kanavin
2019-08-02 16:31 ` ✗ patchtest: failure for " Patchwork
2019-08-02 16:36   ` Alexander Kanavin

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