diff options
| author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2018-01-03 17:24:04 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-04 12:57:43 +0000 |
| commit | 0d40074b7c29a812faaabf38d47a0ab549bd56c7 (patch) | |
| tree | 952ccd7b6cccf8c89d33b472fd7321e02e76c022 | |
| parent | a91b286291c7401c5788c45a68f13f690f1a6d15 (diff) | |
| download | poky-0d40074b7c29a812faaabf38d47a0ab549bd56c7.tar.gz | |
gobject-introspection: do not export LD_LIBRARY_PATH prior to running qemu
Latest g-i upstream adds target paths to this variable which breaks
qemu in various confusing ways.
Instead, the list of target library paths is exported to GIR_EXTRA_LIBS_PATH,
so that it can be picked up automatically by the qemu wrapper script
and given to qemu (manually setting this variable from various recipes
will be removed in a different patch).
Also, re-enable parts of g-i on mips64, as it is the same issue.
(From OE-Core rev: 58d31dddebbf7116e71bf45bd374a7a988f6016c)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
5 files changed, 75 insertions, 10 deletions
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch new file mode 100644 index 0000000000..e1776bc9b4 --- /dev/null +++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | From a02076fe916ade6c3f78f6d35072ec53482e9446 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 3 | Date: Wed, 3 Jan 2018 17:02:01 +0200 | ||
| 4 | Subject: [PATCH] giscanner: add a --lib-dirs-envvar option | ||
| 5 | |||
| 6 | By default LD_LIBRARY_PATH is set to the list of target library paths; | ||
| 7 | this breaks down in cross-compilation environment, as we need to run a | ||
| 8 | native emulation wrapper rather than the target binary itself. This patch | ||
| 9 | allows exporting those paths to a different environment variable | ||
| 10 | which can be picked up and used by the wrapper. | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 14 | --- | ||
| 15 | giscanner/ccompiler.py | 6 ++++-- | ||
| 16 | giscanner/dumper.py | 3 ++- | ||
| 17 | giscanner/scannermain.py | 3 +++ | ||
| 18 | 3 files changed, 9 insertions(+), 3 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py | ||
| 21 | index 29de0ee..e969337 100644 | ||
| 22 | --- a/giscanner/ccompiler.py | ||
| 23 | +++ b/giscanner/ccompiler.py | ||
| 24 | @@ -109,14 +109,16 @@ class CCompiler(object): | ||
| 25 | |||
| 26 | self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations" | ||
| 27 | |||
| 28 | - def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths): | ||
| 29 | + def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar): | ||
| 30 | # An "internal" link is where the library to be introspected | ||
| 31 | # is being built in the current directory. | ||
| 32 | |||
| 33 | runtime_path_envvar = [] | ||
| 34 | runtime_paths = [] | ||
| 35 | |||
| 36 | - if self.check_is_msvc(): | ||
| 37 | + if lib_dirs_envvar: | ||
| 38 | + runtime_path_envvar = [lib_dirs_envvar] | ||
| 39 | + elif self.check_is_msvc(): | ||
| 40 | runtime_path_envvar = ['LIB', 'PATH'] | ||
| 41 | else: | ||
| 42 | runtime_path_envvar = ['LD_LIBRARY_PATH'] | ||
| 43 | diff --git a/giscanner/dumper.py b/giscanner/dumper.py | ||
| 44 | index 7f77bd2..db96df6 100644 | ||
| 45 | --- a/giscanner/dumper.py | ||
| 46 | +++ b/giscanner/dumper.py | ||
| 47 | @@ -259,7 +259,8 @@ class DumpCompiler(object): | ||
| 48 | libtool, | ||
| 49 | self._options.libraries, | ||
| 50 | self._options.extra_libraries, | ||
| 51 | - self._options.library_paths) | ||
| 52 | + self._options.library_paths, | ||
| 53 | + self._options.lib_dirs_envvar) | ||
| 54 | args.extend(pkg_config_libs) | ||
| 55 | |||
| 56 | else: | ||
| 57 | diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py | ||
| 58 | index 38a45c1..b603850 100755 | ||
| 59 | --- a/giscanner/scannermain.py | ||
| 60 | +++ b/giscanner/scannermain.py | ||
| 61 | @@ -130,6 +130,9 @@ def _get_option_parser(): | ||
| 62 | parser.add_option("", "--use-ldd-wrapper", | ||
| 63 | action="store", dest="ldd_wrapper", default=None, | ||
| 64 | help="wrapper to use instead of ldd (useful when cross-compiling)") | ||
| 65 | + parser.add_option("", "--lib-dirs-envvar", | ||
| 66 | + action="store", dest="lib_dirs_envvar", default=None, | ||
| 67 | + help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH") | ||
| 68 | parser.add_option("", "--program-arg", | ||
| 69 | action="append", dest="program_args", default=[], | ||
| 70 | help="extra arguments to program") | ||
| 71 | -- | ||
| 72 | 2.15.1 | ||
| 73 | |||
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb index 156dac7ca7..85c8001dea 100644 --- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb +++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb | |||
| @@ -14,6 +14,7 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/1.54/${BPN}-${PV}.tar.xz \ | |||
| 14 | file://0003-giscanner-add-use-binary-wrapper-option.patch \ | 14 | file://0003-giscanner-add-use-binary-wrapper-option.patch \ |
| 15 | file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \ | 15 | file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \ |
| 16 | file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \ | 16 | file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \ |
| 17 | file://0001-giscanner-add-a-lib-dirs-envvar-option.patch \ | ||
| 17 | " | 18 | " |
| 18 | SRC_URI[md5sum] = "126c29e4d54adbed2ed4e2b04483de41" | 19 | SRC_URI[md5sum] = "126c29e4d54adbed2ed4e2b04483de41" |
| 19 | SRC_URI[sha256sum] = "b88ded5e5f064ab58a93aadecd6d58db2ec9d970648534c63807d4f9a7bb877e" | 20 | SRC_URI[sha256sum] = "b88ded5e5f064ab58a93aadecd6d58db2ec9d970648534c63807d4f9a7bb877e" |
| @@ -71,7 +72,7 @@ EOF | |||
| 71 | # This prevents g-ir-scanner from writing cache data to $HOME | 72 | # This prevents g-ir-scanner from writing cache data to $HOME |
| 72 | export GI_SCANNER_DISABLE_CACHE=1 | 73 | export GI_SCANNER_DISABLE_CACHE=1 |
| 73 | 74 | ||
| 74 | g-ir-scanner --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@" | 75 | g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@" |
| 75 | EOF | 76 | EOF |
| 76 | chmod +x ${B}/g-ir-scanner-wrapper | 77 | chmod +x ${B}/g-ir-scanner-wrapper |
| 77 | 78 | ||
diff --git a/meta/recipes-graphics/clutter/clutter-gst-3.0.inc b/meta/recipes-graphics/clutter/clutter-gst-3.0.inc index 26ae91c484..4c877982b7 100644 --- a/meta/recipes-graphics/clutter/clutter-gst-3.0.inc +++ b/meta/recipes-graphics/clutter/clutter-gst-3.0.inc | |||
| @@ -15,7 +15,3 @@ PACKAGES =+ "${PN}-examples" | |||
| 15 | FILES_${PN} += "${libdir}/gstreamer-1.0/lib*.so" | 15 | FILES_${PN} += "${libdir}/gstreamer-1.0/lib*.so" |
| 16 | FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" | 16 | FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" |
| 17 | FILES_${PN}-examples = "${bindir}/video-player ${bindir}/video-sink" | 17 | FILES_${PN}-examples = "${bindir}/video-player ${bindir}/video-sink" |
| 18 | |||
| 19 | # Needs to be disable due to a dependency on gstreamer-plugins introspection files | ||
| 20 | EXTRA_OECONF_append_mips64 = " --disable-introspection " | ||
| 21 | |||
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc index c40d398911..3f6d4c3703 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc | |||
| @@ -49,6 +49,3 @@ patch_gtk_doc_makefiles() { | |||
| 49 | do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles" | 49 | do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles" |
| 50 | 50 | ||
| 51 | PACKAGES_DYNAMIC = "^${PN}-.*" | 51 | PACKAGES_DYNAMIC = "^${PN}-.*" |
| 52 | |||
| 53 | # qemu-mips64: error while loading shared libraries: .../recipe-sysroot/usr/lib/libgthread-2.0.so.0: ELF file data encoding not little-endian | ||
| 54 | EXTRA_OECONF_append_mips64 = " --disable-introspection " | ||
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc index 68173ce7d9..7191f9892d 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc | |||
| @@ -36,5 +36,3 @@ patch_gtk_doc_makefiles() { | |||
| 36 | 36 | ||
| 37 | do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles" | 37 | do_configure[prefuncs] += " delete_pkg_m4_file patch_gtk_doc_makefiles" |
| 38 | 38 | ||
| 39 | # Needs to be disable due to a dependency on gstreamer-plugins introspection files | ||
| 40 | EXTRA_OECONF_append_mips64 = " --disable-introspection " | ||
