Skip to content

Fix: expand ~ in CCACHE_CONFIGPATH to actual home directory#741

Open
b95702041 wants to merge 24 commits intoCytnx-dev:release_to_pypifrom
b95702041:release_to_pypi
Open

Fix: expand ~ in CCACHE_CONFIGPATH to actual home directory#741
b95702041 wants to merge 24 commits intoCytnx-dev:release_to_pypifrom
b95702041:release_to_pypi

Conversation

@b95702041
Copy link

  • Use os.path.expanduser() to properly expand ~ in ccache config path
  • Fixes FileNotFoundError on macOS builds in cibuildwheel
  • Resolves CI failure in PR Release to PyPI #711

- Use os.path.expanduser() to properly expand ~ in ccache config path
- Fixes FileNotFoundError on macOS builds in cibuildwheel
- Resolves CI failure in PR Cytnx-dev#711
@b95702041
Copy link
Author

b95702041 commented Jan 31, 2026

New error, failed on Building wheel steps but passed the Running before_build step.

https://github.com/b95702041/Cytnx/actions/runs/21540314619

working on fix it now.

- Create symlink from /usr/include/openblas/cblas.h to /usr/include/cblas.h
- Fixes compilation error: 'cblas.h: No such file or directory'
- Similar to existing lapacke.h, lapack.h symlinks
- cblas.h requires openblas_config.h
- Create symlink from /usr/include/openblas/openblas_config.h
- Add CPATH to environment to include /usr/include/openblas
- Create symlinks for all OpenBLAS headers
- Fixes openblas_config-x86_64.h not found error
- Install gcc-c++, glibc-devel, kernel-headers
- Fixes math.h not found error with gcc-toolset-14
- Add CFLAGS and CXXFLAGS with -I/usr/include for Linux builds
- Helps gcc-toolset-14 find standard headers like math.h
- macOS configuration unchanged
- Install gcc-c++, glibc-devel, kernel-headers
- Add cblas.h and openblas_config.h symlinks
- Use ln -sf to force overwrite
- Add verification steps
@b95702041
Copy link
Author

b95702041 commented Feb 2, 2026

Fix Linux wheel builds for PyPI release
Remove CFLAGS/CXXFLAGS from pyproject.toml that broke GCC 14 header search.
Use find_package(Boost REQUIRED) instead of CONFIG mode in CMakeLists.txt.
Update cibuildwheel_before_all.sh to install ccache and dependencies for manylinux/musllinux.
Add conditional compilation for execinfo.h in cytnx_error.hpp to support musl libc.

It is successfully built now.

https://github.com/b95702041/Cytnx/actions/runs/21587555177

Copy link
Collaborator

@IvanaGyro IvanaGyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I have some questions.

@@ -1,5 +1,5 @@
[build-system]
requires = ["scikit-build-core >=0.11", "pybind11 >=3.0"]
requires = ["scikit-build-core >=0.11", "pybind11 >=3.0", "setuptools"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why setuptools is needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distutils was deprecated in Python 3.10 and removed in Python 3.12.
Since the build uses Python 3.12, build 8 failed with:
ModuleNotFoundError: No module named 'distutils'
Adding setuptools resolves this because it provides a distutils compatibility layer.
Reference: https://github.com/b95702041/Cytnx/actions/runs/21543068253

# scikit-build uses Ninja as the default cmake generator. However, Ninja
# conflicts against the build process of HPTT.
"-G Unix Makefiles",
"-DBoost_NO_BOOST_CMAKE=ON",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is duplicated. And it may be better become the env for cibuildwheel because the section here is also used by manually installation.

ln -s /usr/include/openblas/lapacke.h /usr/include/lapacke.h
ln -s /usr/include/openblas/lapack.h /usr/include/lapack.h
ln -s /usr/include/openblas/lapacke_mangling.h /usr/include/lapacke_mangling.h
# Install ccache
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to install ccache by the package manager?

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.

2 participants