Skip to content
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

Fix cython build in charmcraft build #117

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

samuelallan72
Copy link
Contributor

libpython3-dev is required to build cython.
See canonical/layer-basic#214

This problem is only evident now since we switched to charm 3.x in charmcraft builds in #115

ref. https://review.opendev.org/c/openstack/charm-keystone-ldap/+/880084

libpython3-dev is required to build cython.
See canonical/layer-basic#214

This problem is only evident now since we switched to charm 3.x
in charmcraft builds in #115

ref. https://review.opendev.org/c/openstack/charm-keystone-ldap/+/880084
@samuelallan72
Copy link
Contributor Author

samuelallan72 commented Jul 25, 2024

This should fix this error from the builders:

::             creating build/temp.linux-x86_64-cpython-38/tmp/pip-install-w6m3c7en/cython_085091ebd754430b946e6159dc3c61cb/Cython/Plex
::             x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/tmpno_35jwp/include -I/usr/include/python3.8 -c /tmp/pip-install-w6m3c7en/cython_085091ebd754430b946e6159dc3c61cb/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-cpython-38/tmp/pip-install-w6m3c7en/cython_085091ebd754430b946e6159dc3c61cb/Cython/Plex/Scanners.o
::             /tmp/pip-install-w6m3c7en/cython_085091ebd754430b946e6159dc3c61cb/Cython/Plex/Scanners.c:21:10: fatal error: Python.h: No such file or directory
::                21 | #include "Python.h"
::                   |          ^~~~~~~~~~
::             compilation terminated.
::             error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
::             [end of output]

Note: I don't know why it built successfully for me locally but failed on the launchpad builders. I was using charmcraft 2.6 or 2.7.1 (charmcraft snap updated through the day and I'm not sure when).

@samuelallan72 samuelallan72 merged commit 8e8e984 into master Jul 26, 2024
1 check failed
@samuelallan72 samuelallan72 deleted the fix-cython-build branch July 26, 2024 07:28
@samuelallan72
Copy link
Contributor Author

Thanks for the reviews! Merging without CI passing, because there are no tests yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants