Magpie charm's fails to build with PyYaml 6.0

Bug #2015736 reported by DUFOUR Olivier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charm-magpie
Fix Committed
Undecided
DUFOUR Olivier

Bug Description

When attempting to build the charm, it currently fails with an error related to PyYAML 6.0 from charm-tools failing to build its own dependencies and missing python3-dev:
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/root/snap/charmcraft/common/tmpddys584m/include -I/usr/include/python3.10 -c /root/snap/charmcraft/common/pip-install-4i_jyovl/cython_8a47748d26544271ac73eea65c57945c/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-cpython-310/root/snap/charmcraft/common/pip-install-4i_jyovl/cython_8a47748d26544271ac73eea65c57945c/Cython/Plex/Scanners.o
:: /root/snap/charmcraft/common/pip-install-4i_jyovl/cython_8a47748d26544271ac73eea65c57945c/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]

This can be seen currently from the CI when trying to build the charm on master branch here : https://review.opendev.org/c/openstack/charm-magpie/+/879937 .

From testing, as a quick workaround, modifying charmcraft.yaml to add the content below seems to fix the issue :
    build-packages:
      - python3-dev

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-magpie (master)
Changed in charm-magpie:
status: New → In Progress
Changed in charm-magpie:
assignee: nobody → DUFOUR Olivier (odufourc)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-magpie (master)

Reviewed: https://review.opendev.org/c/openstack/charm-magpie/+/879945
Committed: https://opendev.org/openstack/charm-magpie/commit/9a2ea39bf4a13dfa274f8209493c6a6b1d148077
Submitter: "Zuul (22348)"
Branch: master

commit 9a2ea39bf4a13dfa274f8209493c6a6b1d148077
Author: Olivier Dufour-Cuvillier <email address hidden>
Date: Mon Apr 10 18:13:11 2023 +0900

    Add libpython3-dev to allow the charm to be built

    Fixes a missing dependency with Cython.

    Closes-bug: #2015736
    Change-Id: I64be31b093089e662d67f3ce7e96de0812e4ce68

Changed in charm-magpie:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.