-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libgpiod_1.3 fails when building Python bindings (cannot find Python.h) #140
Comments
@HarryManderTait do have |
@kraj Yes: under |
OK I think this could be a missing pkgconfing file or something, lets see if we can reproduce it |
The issue seems to be from the conditional
Removing the conditional inherit and just inheriting --- a/meta-oe/recipes-support/libgpiod/libgpiod_1.3.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.3.bb
@@ -9,7 +9,7 @@ PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx"
PACKAGECONFIG[tests] = "--enable-tests --enable-install-tests,--disable-tests --disable-install-tests,kmod udev"
PACKAGECONFIG[python3] = "--enable-bindings-python,--disable-bindings-python,python3"
-inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}
+inherit python3native
PACKAGES =+ "${PN}-python"
FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" |
Not sure if this is the best way since
|
what you are doing is okay. We need to check if we can disable python during build or do we have to always build it and then maybe package it up separately. |
@HarryManderTait The problem surfaces when your bbappend is doing I have posted a fix here [1], which should help address this issue, please try it in your case and then request a backport of it to warrior |
this recipe inherits python3native class conditionally, this condition depends on a given packageconfig, however inherit ${VAR} syntax requires VAR to be evaluated before inheriting it, therefore if someone appends python3 to packageconfig via a bbappend, then the packageconfig will become effective and add --enable-bindings-python to configure but inherit wont evaluate correctly since the expression adding to packageconfig PACKAGECONFIG_append = " python3" will be coming _after_ the inherit, and the builds will fail e.g. | ../../../libgpiod-1.3/bindings/python/gpiodmodule.c:8:10: fatal error: Python.h: No such file or directory | #include <Python.h> This patch inverts the logic, meaning if someone has to disable python3 bindings should write a bbappend e.g. PACKAGECONFIG_remove = "python3" This will still mean that python3native will be inherited but the effective configure option will be --disable-bindings-python and that will do the right thing See. #140 Signed-off-by: Khem Raj <raj.khem@gmail.com>
@kraj according to your patch |
I think its fine to change defaults since the bindings go into the package of their own anyway, |
Patch works fine! Thanks. |
this recipe inherits python3native class conditionally, this condition depends on a given packageconfig, however inherit ${VAR} syntax requires VAR to be evaluated before inheriting it, therefore if someone appends python3 to packageconfig via a bbappend, then the packageconfig will become effective and add --enable-bindings-python to configure but inherit wont evaluate correctly since the expression adding to packageconfig PACKAGECONFIG_append = " python3" will be coming _after_ the inherit, and the builds will fail e.g. | ../../../libgpiod-1.3/bindings/python/gpiodmodule.c:8:10: fatal error: Python.h: No such file or directory | #include <Python.h> This will still mean that python3native is always inherited but the effective configure option will be --disable-bindings-python and that will do the right thing See. openembedded#140 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Source: meta-openembedded MR: 00000 Type: Integration Disposition: Merged from meta-openembedded ChangeID: 98625eb Description: this recipe inherits python3native class conditionally, this condition depends on a given packageconfig, however inherit ${VAR} syntax requires VAR to be evaluated before inheriting it, therefore if someone appends python3 to packageconfig via a bbappend, then the packageconfig will become effective and add --enable-bindings-python to configure but inherit wont evaluate correctly since the expression adding to packageconfig PACKAGECONFIG_append = " python3" will be coming _after_ the inherit, and the builds will fail e.g. | ../../../libgpiod-1.3/bindings/python/gpiodmodule.c:8:10: fatal error: Python.h: No such file or directory | #include <Python.h> This will still mean that python3native is always inherited but the effective configure option will be --disable-bindings-python and that will do the right thing See. openembedded#140 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
- Change branch name master -> main according to upstream repository. - Update 2.0.15 -> 2.0.16. Changelog: 1df82b9 Add param traits for CL_DEVICE_SUPPORTED_REGISTER_ALLOCATIONS_ARM (openembedded#165) 814e7b2 update the C++ bindings code example (openembedded#151) 6d833a5 Update opencl.hpp: Add CL_DEVICE_BOARD_NAME_AMD (openembedded#160) 25ad589 Added missing definitions for deprecated prefixes and suffixes for version 2.2 (openembedded#159) 21a34b0 Test two additional defines and update descriptions in header (openembedded#147) ff7318c Fix cl::enqueueMapSVM for cl::vector and cl::pointer (openembedded#145) 30d4219 Test most of the possible defines (openembedded#140) 63d9e41 Fix unreasonable error handling in opencl.hpp (openembedded#139) 0198c41 Add support for cl_khr_integer_dot_product v2 (openembedded#141) 8df6c8f Transition CI to Github Actions (openembedded#142) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
- Change branch name master -> main according to upstream repository. - Update 2.0.15 -> 2.0.16. Changelog: 1df82b9 Add param traits for CL_DEVICE_SUPPORTED_REGISTER_ALLOCATIONS_ARM (openembedded#165) 814e7b2 update the C++ bindings code example (openembedded#151) 6d833a5 Update opencl.hpp: Add CL_DEVICE_BOARD_NAME_AMD (openembedded#160) 25ad589 Added missing definitions for deprecated prefixes and suffixes for version 2.2 (openembedded#159) 21a34b0 Test two additional defines and update descriptions in header (openembedded#147) ff7318c Fix cl::enqueueMapSVM for cl::vector and cl::pointer (openembedded#145) 30d4219 Test most of the possible defines (openembedded#140) 63d9e41 Fix unreasonable error handling in opencl.hpp (openembedded#139) 0198c41 Add support for cl_khr_integer_dot_product v2 (openembedded#141) 8df6c8f Transition CI to Github Actions (openembedded#142) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
- Change branch name master -> main according to upstream repository. - Update 2.0.15 -> 2.0.16. Changelog: 1df82b9 Add param traits for CL_DEVICE_SUPPORTED_REGISTER_ALLOCATIONS_ARM (openembedded#165) 814e7b2 update the C++ bindings code example (openembedded#151) 6d833a5 Update opencl.hpp: Add CL_DEVICE_BOARD_NAME_AMD (openembedded#160) 25ad589 Added missing definitions for deprecated prefixes and suffixes for version 2.2 (openembedded#159) 21a34b0 Test two additional defines and update descriptions in header (openembedded#147) ff7318c Fix cl::enqueueMapSVM for cl::vector and cl::pointer (openembedded#145) 30d4219 Test most of the possible defines (openembedded#140) 63d9e41 Fix unreasonable error handling in opencl.hpp (openembedded#139) 0198c41 Add support for cl_khr_integer_dot_product v2 (openembedded#141) 8df6c8f Transition CI to Github Actions (openembedded#142) Signed-off-by: Daniel Gomez <daniel@qtec.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Changelog: ========= add support for Python 3.11 PR openembedded#142 do not install tests PR openembedded#143 fix packaging for latest setuptools PR openembedded#140 Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Changelog: ========= add support for Python 3.11 PR openembedded#142 do not install tests PR openembedded#143 fix packaging for latest setuptools PR openembedded#140 Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Changelog: ========= add support for Python 3.11 PR openembedded#142 do not install tests PR openembedded#143 fix packaging for latest setuptools PR openembedded#140 Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Changelog: ========= add support for Python 3.11 PR openembedded#142 do not install tests PR openembedded#143 fix packaging for latest setuptools PR openembedded#140 Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Changelog: ========= add support for Python 3.11 PR openembedded#142 do not install tests PR openembedded#143 fix packaging for latest setuptools PR openembedded#140 Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Changelog: ========= add support for Python 3.11 PR openembedded#142 do not install tests PR openembedded#143 fix packaging for latest setuptools PR openembedded#140 Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
this recipe inherits python3native class conditionally, this condition depends on a given packageconfig, however inherit ${VAR} syntax requires VAR to be evaluated before inheriting it, therefore if someone appends python3 to packageconfig via a bbappend, then the packageconfig will become effective and add --enable-bindings-python to configure but inherit wont evaluate correctly since the expression adding to packageconfig PACKAGECONFIG_append = " python3" will be coming _after_ the inherit, and the builds will fail e.g. | ../../../libgpiod-1.3/bindings/python/gpiodmodule.c:8:10: fatal error: Python.h: No such file or directory | #include <Python.h> This will still mean that python3native is always inherited but the effective configure option will be --disable-bindings-python and that will do the right thing See. openembedded/meta-openembedded#140 Signed-off-by: Khem Raj <raj.khem@gmail.com>
this recipe inherits python3native class conditionally, this condition depends on a given packageconfig, however inherit ${VAR} syntax requires VAR to be evaluated before inheriting it, therefore if someone appends python3 to packageconfig via a bbappend, then the packageconfig will become effective and add --enable-bindings-python to configure but inherit wont evaluate correctly since the expression adding to packageconfig PACKAGECONFIG_append = " python3" will be coming _after_ the inherit, and the builds will fail e.g. | ../../../libgpiod-1.3/bindings/python/gpiodmodule.c:8:10: fatal error: Python.h: No such file or directory | #include <Python.h> This will still mean that python3native is always inherited but the effective configure option will be --disable-bindings-python and that will do the right thing See. openembedded/meta-openembedded#140 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Building libgpiod 1.3 with the Python bindings enabled on
warrior
.do_compile
fails with this error:The text was updated successfully, but these errors were encountered: