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

Fails to build with Python 3.12 #2301

Closed
sebastic opened this issue Dec 7, 2023 · 4 comments
Closed

Fails to build with Python 3.12 #2301

sebastic opened this issue Dec 7, 2023 · 4 comments

Comments

@sebastic
Copy link

sebastic commented Dec 7, 2023

Description

The Debian package failed to build with Python 3.12:

aarch64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -g -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -g -fwrapv -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/python3/dist-packages/numpy/core/include -I/usr/include/python3.12 -c lib/cartopy/trace.cpp -o build/temp.linux-aarch64-cpython-312/lib/cartopy/trace.o
lib/cartopy/trace.cpp: In function ‘bool __pyx_f_7cartopy_5trace_degenerate_line(const __pyx_t_7cartopy_5trace_Line&)’:
lib/cartopy/trace.cpp:1623:34: error: ‘_PyCFrame’ {aka ‘struct _PyCFrame’} has no member named ‘use_tracing’
 1623 |      (unlikely((tstate)->cframe->use_tracing) &&\
      |                                  ^~~~~~~~~~~

Full buildlog

Operating system

Debian unstable

Cartopy version

0.22.0

@dopplershift
Copy link
Contributor

use_tracing isn't anywhere in the Cartopy code base, so I'm guessing it's coming from Cython. Looks like that build is using Cython 0.29.36:

Selecting previously unselected package cython3.
Preparing to unpack .../040-cython3_0.29.36-3+b1_arm64.deb ...
Unpacking cython3 (0.29.36-3+b1) ...

I'd wonder if the build would work with Cython 3.

@QuLogic
Copy link
Member

QuLogic commented Dec 7, 2023

The build is fine on Fedora; I think you do need a newer Cython.

@QuLogic
Copy link
Member

QuLogic commented Dec 7, 2023

See cython/cython#5285 if you really want to use 0.29, but 3.0 works.

@sebastic
Copy link
Author

sebastic commented Dec 8, 2023

Confirmed fixed with cython 3.0.6 from Debian experimental.

@sebastic sebastic closed this as completed Dec 8, 2023
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

No branches or pull requests

3 participants