Build fails to pass `-std=c99` flag: `blosc2.h: error: ‘for’ loop initial declaration used outside C99 mode`
- Ngôn ngữ chính
- Python
- Star
- 211
- Fork
- 58
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 6
Mô tả
`blosc2` itself sets `-std=gnu99` in its own CMakeLists, however those are not used by `py-blosc2` when external `blosc2` is linked against. So the flag is not passed, but it is required:
```
In file included from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_python_py-blosc2/py311-blosc2/work/blosc2-2.5.1/_skbuild/macosx-10.6-ppc-3.11/cmake-build/blosc2/blosc2_ext.c:1253:
/opt/local/include/blosc2.h: In function ‘blosc2_meta_exists’:
/opt/local/include/blosc2.h:2162: error: ‘for’ loop initial declaration used outside C99 mode
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Kiểm tra cấu hình CMake được py-blosc2 sử dụng khi liên kết một blosc2 bên ngoài, sau đó tái hiện lỗi trong blosc2_ext.c bằng blosc2.h bên ngoài. Hoàn thành khi cấu hình đó cung cấp chế độ C99 cần thiết và bản build external-blosc2 hoàn tất mà không gặp lỗi được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- c, cmake, python
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100