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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building from source #389

Open
rcomer opened this issue Nov 14, 2023 · 2 comments
Open

Error building from source #389

rcomer opened this issue Nov 14, 2023 · 2 comments
Assignees
Labels
New: Issue Highlight a new community raised "generic" issue Type: Bug

Comments

@rcomer
Copy link
Member

rcomer commented Nov 14, 2023

馃悰 Bug Report

Cannot currently build cf-units from source on Met Office machine with python 3.12. Everything is fine if I pin python=3.11.

How to Reproduce

Steps to reproduce the behaviour:

  1. Create conda environment from requirements/cf-units.yml
  2. python -m pip install -v .

Error:

  In file included from cf_units/_udunits2.c:20448:0:
  /.../conda_envs/cf-units-dev/include/python3.12/internal/pycore_frame.h: In function '_PyFrame_Initialize':
  /.../conda_envs/cf-units-dev/include/python3.12/internal/pycore_frame.h:132:5: error: 'for' loop initial declarations are only allowed in C99 mode
       for (int i = null_locals_from; i < code->co_nlocalsplus; i++) {
       ^
  /.../conda_envs/cf-units-dev/include/python3.12/internal/pycore_frame.h:132:5: note: use option -std=c99 or -std=gnu99 to compile your code
  error: command '/usr/bin/gcc' failed with exit code 1
  error: subprocess-exited-with-error

Expected Behaviour

cf-units builds without error

Environment

  • OS & Version: RHEL7
  • cf-units Version: main

Additional Context

Click to expand this section...
Please add additional verbose information in this section e.g., code, output, tracebacks, screenshots etc
@rcomer rcomer added Type: Bug New: Issue Highlight a new community raised "generic" issue labels Nov 14, 2023
@bjlittle bjlittle self-assigned this Nov 14, 2023
@bjlittle
Copy link
Member

@rcomer Thanks for raising this issue.

I suspect that we need to make some minor tweaks to cf-units to use cython 3.x and build correctly for py312.

I'm keen to make a fix for this and force a release of cf-units soon.

@rcomer
Copy link
Member Author

rcomer commented Nov 14, 2023

I cannot reproduce the problem on Ubuntu 22.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New: Issue Highlight a new community raised "generic" issue Type: Bug
Projects
Status: No status
Development

No branches or pull requests

2 participants