Commit graph

8 commits

Author SHA1 Message Date
Peter Korsgaard c94a212390 package/gobject-introspection: disable for riscv32
Fixes:
http://autobuild.buildroot.net/results/e32/e323f43952b3863cedfdae765b3fb10ec6b8d889/
http://autobuild.buildroot.net/results/53e/53e7b82baa9edb342cd110717d6b8ac82d5d933c/

And many more.

qemu-user 5.0.0 for riscv32 segfaults when running the g-i qemu wrapper, so
disable gobject-introspection.  There are no autobuilder failures for next,
so it looks to be fixed in qemu 5.1.0.

As python-gobject and gst1-python select gobject-introspection, add a
BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS symbol they can depend on
rather than having to propagate the dependencies.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2020-09-01 21:23:54 +02:00
Adam Duskett 5e774faa48 package/gobject-introspection: bump to version 2.64.1
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-12 11:57:38 +02:00
Adam Duskett 3ff152386a package/gobject-introspection: export variables in g-ir-scanner
When building .gir .typelib files, the g-ir-scanner wrapper calls the host
g-ir-scanner. g-ir-scanner calls ccompiler.py, which searches for the following
environment variables:
    CPP, CC, CXX, CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS

These environment variables are empty by default, and as such ccompiler.py
defaults to either using the system tools (CC, CXX, and CPP) or leaving
the variables blank (LDFLAGS, CFLAGS, and CPPFLAGS.)

For autotools packages, this issue does not occur because autotools uses
Makefile.introspection found on the staging directory in
usr/share/gobject-introspection-1.0/ which automatically exports the above
variables.

However, for meson, the above variables are not exported when meson calls
g-ir-scanner to build .gir and .typelib files, which results in linking errors.

Exporting these variables in the g-ir-scanner wrapper fixes these issues and
ensures all build systems can generate .gir and .typelib files properly.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-03-15 17:37:31 +01:00
Adam Duskett 8270fca228 package/gobject-introspection: fix host-linking
When building, gobject-introspection uses tools/g-ir-scanner to build
several .gir and .typelib files. To that goal, it internally builds and
runs a few small executables linked to libglib2. However, it does not
pass them any LDFLAGS that we could pass the buildsystem. So, it either
ends up trying to link with the system's libglib2, which may not be
instaleld (build breaks), or is installed to an other version (build may
break); in either cases, this is not good...

g-ir-scanner can use the argument --lib-dirs-envvar to pass a list of
library directories to search for. However, during the build process,
this is not possible due to the build process calling g-ir-scanner
directly without letting the user (us) pass any option.

When discussing with upstream, they explained that the only solution in
that case was to set and export LD_LIBRARY_PATH to point to the location
where the correct libglib2 was installed.

Ergo, that's what we do.

This fix has the added benefit of allowing the host gobject-introspection
to build the host .gir, .rnc, and .typelib files, which some packages
may require.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-03-15 17:37:09 +01:00
Adam Duskett 3bcb374d2a package/gobject-introspection: bump version to 2.64.0
Other changes:
  - Remove upstream patches.
  - Change cross-compile options to upstream equivilants
  - Add -Ddoctool=disabled to GOBJECT_INTROSPECTION_CONF_OPTS
  - Change -Dcairo from a bool to a feature.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
[yann.morin.1998@free.fr: keep patches ordering]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-03-12 22:10:15 +01:00
Yann E. MORIN 4a81bc26c9 package/gobject-introspection: add missing newline at end of wrappers
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-02-23 21:22:52 +01:00
Adam Duskett 6da6cb2c31 package/gobject-introspection: depend on python3
Currently, the Config.in file has the line:
select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON

This line is incorrect as gobject-introspection does not support python2.
Instead, remove the select line and make python3 a dependency with a new
message that explains that gobject-introspection requires python3.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
[yann.morin.1998@free.fr:
  - move the explanations from the commit log to the code
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-02-22 22:40:32 +01:00
Adam Duskett 7687a396e8 package/gobject-introspection: new package
GObject introspection is a middleware layer between C
libraries (using GObject) and language bindings. The C library
can be scanned at compile time and generate a metadata file,
in addition to the actual native C library. Then at runtime,
language bindings can read this metadata and automatically
provide bindings to call into the C library.

There's an XML format called GIR used by GObject-Introspection.
The purpose of it is to provide a standard structure to access the complete
available API that a library or other unit of code exports. It's
language-agnostic using namespaces to separate core, language, or
library-specific functionality.

Cross-compiling gobject-introspection is not an easy task. The main issue is
that in the process of creating the XML files, gobject-introspection must first
run and scan the binary, which, if the binary is cross-compiled, would not
typically be possible from the host system.

Because of this limitation, we use several wrappers to call instead first out
qemu, which runs the native scanner to create the binaries.

There are seven total patches and four different wrapper files needed to
successfully cross-compile and run this package, many of them are from
open-embedded, but one of them is of my own doing.

1) Revert a previous, incomplete attempt at adding cross-compiling support.

2) Add support for cross-compiling with meson.

3) Disable tests.

4) Add an option to use a binary wrapper; this patch will force giscanner to
   use a wrapper executable to run binaries it's producing, instead of
   attempting to run them from the host.

5) Add an option to use an LDD wrapper, again, useful for cross-compiled
   environments.

6) Add a --lib-dirs-envar option to pass to giscanner. (See patch for details.)

7) Add rpath-links to ccompiler: when passing the PACKAGE_GIR_EXTRA_LIBS_PATH
   to the ccompiler.py script, ccompiler.py needs to add -Wl,-rpath-link to the
   environment for the package to correctly link against the passed on paths.

8) Ignore error return codes from ldd-wrapper because prelink-rtld returns 127
   when it can't find a library, which breaks subprocess.check_output().

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
Tested-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[yann.morin.1998@free.fr:
  - host-prelink-cross has no Kconfig entry
  - reorder dependencies for arch deps first
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-02-20 22:16:30 +01:00