-
Notifications
You must be signed in to change notification settings - Fork 20
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
readme: add Python3 library dependency #69
Conversation
@@ -106,7 +106,7 @@ $ meson setup build-arm --cross-file meson/arm-linux-gnueabi-gcc.ini && meson co | |||
|
|||
#### Dependencies (Debian) | |||
``` | |||
apt install build-essential flex swig bison meson device-tree-compiler libyaml-dev | |||
apt install build-essential flex swig bison meson device-tree-compiler libyaml-dev libpython3-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, do we? 😅
I don't immediately recall why - is it libfdt python bindings?
Can you add a note in the commit message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
root@ubuntu-2gb-fsn1-1:~/culvert# meson compile -C build
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /root/culvert/build
ninja: Entering directory `/root/culvert/build'
[47/408] Generating subprojects/dtc/pylibfdt/pylibfdt with a custom command
FAILED: subprojects/dtc/pylibfdt/_libfdt.so
/root/culvert/subprojects/dtc/pylibfdt/../setup.py --quiet --top-builddir /root/culvert/build/subprojects/dtc build_ext
/root/culvert/subprojects/dtc/pylibfdt/../pylibfdt/libfdt_wrap.c:174:11: fatal error: Python.h: No such file or directory
174 | # include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[49/408] Linking target subprojects/dtc/dtc
ninja: build stopped: subcommand failed.
Hmm, yup. Looks like it.
Hm, the more elegant solution would probably to disable pylibfdt entirely (as I'm guessing we don't need it for anything anyway).
I'm not very familiar with meson, though...
dtc's meson file (subprojects/dtc/meson.build
) doesn't look like pylibfdt can be disabled (without hacks):
py = import('python')
py = py.find_installation(required: get_option('python'))
swig = find_program('swig', required: get_option('python'))
pylibfdt_enabled = not meson.is_cross_build() and py.found() and swig.found() ? true : false
I've updated the commit description anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meson setup -Ddtc:python=disabled ...
should might work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it does work and that's the better solution by far :)
I've opened #74 for this.
libfdt (subproject) requires Python3 development headers to compile its pylibfdt bindings. Signed-off-by: Manawyrm <[email protected]>
Better solution over in #74 |
libfdt (subproject) requires Python3 development headers to
compile its pylibfdt bindings.