BobBuildTool/basement

glib-dev pkgconfig

Closed this issue · 5 comments

glib recipe doesn't work for compat toolchain correctly. glib-tools is there to provide the tools, but for compat a bindir is set. so the tools provided by glib-tools package will not selected.

/bin/bash: line 1: /home/superq/ws/fdt.v2/dev/dist/libs/glib-dev/x86_64-bob_compat-linux-gnu/2/workspace/usr/bin/glib-mkenums: No such file or directory

compat:

bindir=${prefix}/bin
glib_genmarshal=${bindir}/glib-genmarshal
gobject_query=${bindir}/gobject-query
glib_mkenums=${bindir}/glib-mkenums

for cross-toolchain, the pkgconfig file looks like this, this would work in combination with glib-tools:

cross:

glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

maybe we should not make an explicit package for tools, but install the tools in dev package?!

mesonPackageDev "$1" "/usr/lib/glib-2.0/***" "/usr/bin/***"

or both? :)

I'm afraid I do not fully understand the problem. Could you provide some minimal recipe example that show the issue?

yep.

feature-branch for graphviz:
#75

add it e.g. here:

diff --git a/tests/cross-platform/recipes/cmake/greeter.yaml b/tests/cross-platform/recipes/cmake/greeter.yaml
index 2bf4086..d130d31 100644
--- a/tests/cross-platform/recipes/cmake/greeter.yaml
+++ b/tests/cross-platform/recipes/cmake/greeter.yaml
@@ -1,5 +1,8 @@
 inherit: [ "basement::rootrecipe", cmake ]

+depends:
+    - devel::graphviz
+
 checkoutSCM:
     scm: import
     url: src/greeter/

bob dev cmake::greeter-cross/ -vv

error:

+ touch .configure.stamp
+ makeParallel
+ [[ -n '' ]]
++ nproc
+ make -j 24
make  all-recursive
make[1]: Entering directory '/home/superq/ws/basement/tests/cross-platform/dev/build/libs/pango-dev/x86_64-bob_compat-linux-gnu/1/workspace/build'
Making all in pango
make[2]: Entering directory '/home/superq/ws/basement/tests/cross-platform/dev/build/libs/pango-dev/x86_64-bob_compat-linux-gnu/1/workspace/build/pango'
  GEN      s-enum-types-h
  GEN      s-enum-types-c
/bin/bash: line 1: /home/superq/ws/basement/tests/cross-platform/dev/dist/libs/glib-dev/x86_64-bob_compat-linux-gnu/1/workspace/usr/bin/glib-mkenums: No such file or directory
/bin/bash: line 1: /home/superq/ws/basement/tests/cross-platform/dev/dist/libs/glib-dev/x86_64-bob_compat-linux-gnu/1/workspace/usr/bin/glib-mkenums: No such file or directory
make[2]: *** [Makefile:1587: s-enum-types-h] Error 127
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1595: s-enum-types-c] Error 127
make[2]: Leaving directory '/home/superq/ws/basement/tests/cross-platform/dev/build/libs/pango-dev/x86_64-bob_compat-linux-gnu/1/workspace/build/pango'
make[1]: *** [Makefile:580: all-recursive] Error 1
make[1]: Leaving directory '/home/superq/ws/basement/tests/cross-platform/dev/build/libs/pango-dev/x86_64-bob_compat-linux-gnu/1/workspace/build'
make: *** [Makefile:469: all] Error 2
++ bob_handle_error 2
++ set +x
Step failed with return status 2; Command: make -j "${MAKE_JOBS-$(nproc)}" "$@"

Ok, I now see the problem. I'm not sure yet who to blame here. But installing the tools in the -dev package is not the solution. If we cross compile the tools won't run...

I did not found any official interface to handle this problem e.g. by configuration.
So i would recommend to do this to fix the *.pc files in dev-package:

for i in $(find . -iname "*.pc") ; do
    sed -i 's/\${bindir}\///g' $i
done

Looks like buildroot does the same. I would also recommend to do it only for the glib-2.0.pc and gio-2.0.pc files specifically without the find call. We already know the files that need patching.