diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2018-10-10 15:35:44 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-12 16:57:21 +0100 |
commit | 6dd32df4b4cf2c07c8a0845ec300ce48d74ad5fe (patch) | |
tree | e28adf931559a659f0fe203465058fa081623ea6 /meta/classes/meson.bbclass | |
parent | 6ffcc26651a7c3318d558a57c7769687cdc28931 (diff) | |
download | poky-6dd32df4b4cf2c07c8a0845ec300ce48d74ad5fe.tar.gz |
meson.bbclass: Fix build issues with /tmp mounted with noexec
Since commit d297f7ebf3f6 [fribidi: use Meson instead of autotools]
build failures have been observed with this package. The immediate
issue was related to improperly named #defines per
https://github.com/fribidi/fribidi/commit/46f52d588ab5, however, the
root cause was FRIBIDI_SIZEOF_INT getting a value of "-1".
After searching the meson logs the following was found:
Could not run: /tmp/tmp2fxe6ha1/output.exe (error: [Errno 13] Permission denied)
Checking for size of "int": -1
Which pointed to the real root cause being /tmp mounted with noexec, a
common configuration on Redhat and other distros. This issues has been
raised in the meson community:
https://github.com/mesonbuild/meson/issues/2972 but is yet to be
addressed.
Using the discussion from issue#2972 and the fact that the underlying
code makes use of python 'tempfile' we can simply create a 'tmp'
directory and make use of TMPDIR to avoid this issue.
(From OE-Core rev: 9800daf59d2235bc492d1aeb600e46ad62303510)
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/meson.bbclass')
-rw-r--r-- | meta/classes/meson.bbclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass index ed08a4058c..7e63e12588 100644 --- a/meta/classes/meson.bbclass +++ b/meta/classes/meson.bbclass | |||
@@ -109,6 +109,9 @@ EOF | |||
109 | CONFIGURE_FILES = "meson.build" | 109 | CONFIGURE_FILES = "meson.build" |
110 | 110 | ||
111 | meson_do_configure() { | 111 | meson_do_configure() { |
112 | # Work around "Meson fails if /tmp is mounted with noexec #2972" | ||
113 | mkdir -p "${B}/meson-private/tmp" | ||
114 | export TMPDIR="${B}/meson-private/tmp" | ||
112 | bbnote Executing meson ${EXTRA_OEMESON}... | 115 | bbnote Executing meson ${EXTRA_OEMESON}... |
113 | if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then | 116 | if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then |
114 | bbfatal_log meson failed | 117 | bbfatal_log meson failed |