Testing and documentation for new python build system: scikit-build-core
This issue is to document my test of the new python build system, and serve as a base for future documention.
MacOS, Apple Silicon
I use homebrew to install openblas. Default installation is keg-only, which means it was not symlinked into /opt/homebrew. One can force homebrew to create the symbolic link via
brew link --force openblas
(Let me skip the virtual entironment part for now.)
After that, I change to Cytnx's direction, set the gcc version, and perform pip install using default preset.
export CC=/opt/homebrew/bin/gcc-{version}
export CXX=/opt/homebrew/bin/g++-{version}
pip install . -vv
gcc-14, gcc-13
pip install . is successful if I use gcc-14 or gcc-13. But following warnings are observed (essential the same error message for gcc-14/13.)
First, something about FindBoost module in cmake:
CMake Warning (dev) at CMakeLists.txt:246 (find_package):
Policy CMP0167 is not set: The FindBoost module is removed. Run "cmake
--help-policy CMP0167" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.
Warning related to boost keep appearing
[ 4%] Building CXX object CMakeFiles/cytnx.dir/src/Network_base.cpp.o
In file included from /opt/homebrew/include/boost/config/header_deprecated.hpp:18,
from /opt/homebrew/include/boost/detail/atomic_count.hpp:8,
from /Users/pcchen/github/Cytnx-dev/Cytnx/include/intrusive_ptr_base.hpp:8,
from /Users/pcchen/github/Cytnx-dev/Cytnx/include/Network.hpp:10,
from /Users/pcchen/github/Cytnx-dev/Cytnx/src/Network_base.cpp:2:
/opt/homebrew/include/boost/detail/atomic_count.hpp:10:1: note: '#pragma message: This header is deprecated. Use <boost/smart_ptr/detail/atomic_count.hpp> instead.'
10 | BOOST_HEADER_DEPRECATED("<boost/smart_ptr/detail/atomic_count.hpp>")
| ^~~~~~~~~~~~~~~~~~~~~~~
[ 4%] Building CXX object CMakeFiles/cytnx.dir/src/Network.cpp.o
In file included from /opt/homebrew/include/boost/config/header_deprecated.hpp:18,
from /opt/homebrew/include/boost/detail/atomic_count.hpp:8,
from /Users/pcchen/github/Cytnx-dev/Cytnx/include/intrusive_ptr_base.hpp:8,
from /Users/pcchen/github/Cytnx-dev/Cytnx/include/Network.hpp:10,
from /Users/pcchen/github/Cytnx-dev/Cytnx/src/Network.cpp:2:
/opt/homebrew/include/boost/detail/atomic_count.hpp:10:1: note: '#pragma message: This header is deprecated. Use <boost/smart_ptr/detail/atomic_count.hpp> instead.'
10 | BOOST_HEADER_DEPRECATED("<boost/smart_ptr/detail/atomic_count.hpp>")
| ^~~~~~~~~~~~~~~~~~~~~~~
gcc-15
With gcc-15, pip install fails when building hptt
[ 4%] Performing build step for 'hptt'
[ 10%] Building CXX object CMakeFiles/hptt_static.dir/src/hptt.cpp.o
[ 20%] Building CXX object CMakeFiles/hptt_static.dir/src/plan.cpp.o
[ 30%] Building CXX object CMakeFiles/hptt_static.dir/src/transpose.cpp.o
during GIMPLE pass: vect
/var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmp3pntko70/build/hptt/src/hptt/src/transpose.cpp: In function 'void hptt::transpose_int(const floatType*, const floatType*, floatType*, const floatType*, floatType, floatType, const ComputeNode*) [with int blockingA = 2; int blockingB = 2; int betaIsZero = 1; floatType = std::complex<double>; bool useStreamingStores = false; bool conjA = true]':
/var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmp3pntko70/build/hptt/src/hptt/src/transpose.cpp:603:6: internal compiler error: Segmentation fault: 11
603 | void transpose_int( const floatType* __restrict__ A, const floatType* __restrict__ Anext,
| ^~~~~~~~~~~~~
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <https://github.com/Homebrew/homebrew-core/issues> for instructions.
make[5]: *** [CMakeFiles/hptt_static.dir/src/transpose.cpp.o] Error 1
make[4]: *** [CMakeFiles/hptt_static.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [hptt/src/hptt-stamp/hptt-build] Error 2
make[1]: *** [CMakeFiles/hptt.dir/all] Error 2
make: *** [all] Error 2
gcc-12
With gcc-12, pip install fails near the end
Building wheels for collected packages: cytnx
Created temporary directory: /private/var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/pip-wheel-n36jse2q
Destination directory: /private/var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/pip-wheel-n36jse2q
Building wheel for cytnx (pyproject.toml): started
Building wheel for cytnx (pyproject.toml): finished with status 'error'
Failed to build cytnx
Remote version of pip: 25.2
Local version of pip: 25.1.1
Was pip installed by pip? True
Exception information:
Traceback (most recent call last):
File "/Users/pcchen/.venv/scikit_gcc12/lib/python3.13/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
status = _inner_run()
File "/Users/pcchen/.venv/scikit_gcc12/lib/python3.13/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run
return self.run(options, args)
~~~~~~~~^^^^^^^^^^^^^^^
File "/Users/pcchen/.venv/scikit_gcc12/lib/python3.13/site-packages/pip/_internal/cli/req_command.py", line 68, in wrapper
return func(self, options, args)
File "/Users/pcchen/.venv/scikit_gcc12/lib/python3.13/site-packages/pip/_internal/commands/install.py", line 436, in run
raise InstallationError(
...<4 lines>...
)
pip._internal.exceptions.InstallationError: Failed to build installable wheels for some pyproject.toml based projects (cytnx)
Removed build tracker: '/private/var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/pip-build-tracker-acdxknpj'
(scikit_gcc11) pcchen@MBA13 Cytnx % tail -n 200 Err12.txt
/opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:402:36: error: expected primary-expression before 'int'
402 | void setbuffer(FILE *, char *, int);
| ^~~
/opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:403:21: error: 'FILE' was not declared in this scope
403 | int setlinebuf(FILE *);
| ^~~~
/opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:403:21: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:403:27: error: expected primary-expression before ')' token
403 | int setlinebuf(FILE *);
| ^
/opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:410:1: error: 'FILE' does not name a type
410 | FILE *funopen(const void *,
| ^~~~
/opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:410:1: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:100:16: error: 'FILE' was not declared in this scope
100 | wint_t fgetwc(FILE *);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:94:1: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
93 | #include <__wctype.h>
+++ |+#include <cstdio>
94 |
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:100:22: error: expected primary-expression before ')' token
100 | wint_t fgetwc(FILE *);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:103:17: error: 'FILE' has not been declared
103 | FILE * __restrict);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:104:25: error: 'FILE' has not been declared
104 | wint_t fputwc(wchar_t, FILE *);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:105:44: error: 'FILE' has not been declared
105 | int fputws(const wchar_t * __restrict, FILE * __restrict);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:106:15: error: 'FILE' was not declared in this scope
106 | int fwide(FILE *, int);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:106:15: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:106:21: error: expected primary-expression before ',' token
106 | int fwide(FILE *, int);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:106:23: error: expected primary-expression before 'int'
106 | int fwide(FILE *, int);
| ^~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:106:26: error: expression list treated as compound expression in initializer [-fpermissive]
106 | int fwide(FILE *, int);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:18: error: 'FILE' was not declared in this scope
107 | int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:18: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:35: error: expected primary-expression before ',' token
107 | int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:37: error: expected primary-expression before 'const'
107 | int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...);
| ^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:65: error: expected primary-expression before '...' token
107 | int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...);
| ^~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:68: error: expression list treated as compound expression in initializer [-fpermissive]
107 | int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:17: error: 'FILE' was not declared in this scope
108 | int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:17: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:34: error: expected primary-expression before ',' token
108 | int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:36: error: expected primary-expression before 'const'
108 | int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...);
| ^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:64: error: expected primary-expression before '...' token
108 | int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...);
| ^~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:67: error: expression list treated as compound expression in initializer [-fpermissive]
108 | int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:109:15: error: 'FILE' was not declared in this scope
109 | wint_t getwc(FILE *);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:109:15: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:109:21: error: expected primary-expression before ')' token
109 | wint_t getwc(FILE *);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:118:24: error: 'FILE' has not been declared
118 | wint_t putwc(wchar_t, FILE *);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:123:25: error: 'FILE' has not been declared
123 | wint_t ungetwc(wint_t, FILE *);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:124:19: error: 'FILE' was not declared in this scope
124 | int vfwprintf(FILE * __restrict, const wchar_t * __restrict,
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:124:19: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:124:36: error: expected primary-expression before ',' token
124 | int vfwprintf(FILE * __restrict, const wchar_t * __restrict,
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:124:38: error: expected primary-expression before 'const'
124 | int vfwprintf(FILE * __restrict, const wchar_t * __restrict,
| ^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:125:29: error: expected primary-expression before ')' token
125 | __darwin_va_list);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:125:29: error: expression list treated as compound expression in initializer [-fpermissive]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:195:18: error: 'FILE' was not declared in this scope
195 | int vfwscanf(FILE * __restrict, const wchar_t * __restrict,
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:195:18: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:195:35: error: expected primary-expression before ',' token
195 | int vfwscanf(FILE * __restrict, const wchar_t * __restrict,
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:195:37: error: expected primary-expression before 'const'
195 | int vfwscanf(FILE * __restrict, const wchar_t * __restrict,
| ^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:196:29: error: expected primary-expression before ')' token
196 | __darwin_va_list);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:196:29: error: expression list treated as compound expression in initializer [-fpermissive]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:240:1: error: 'FILE' does not name a type
240 | FILE *open_wmemstream(wchar_t *_LIBC_COUNT(*__sizep) * __bufp, size_t * __sizep) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:240:1: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:25: error: 'FILE' was not declared in this scope
251 | fgetwln(FILE * __restrict, size_t *__len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
| ^~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:25: note: 'FILE' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:42: error: expected primary-expression before ',' token
251 | fgetwln(FILE * __restrict, size_t *__len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:51: error: expected primary-expression before '*' token
251 | fgetwln(FILE * __restrict, size_t *__len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:52: error: '__len' was not declared in this scope
251 | fgetwln(FILE * __restrict, size_t *__len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
| ^~~~~
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/Availability.h:198,
from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:73:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:59: error: attributes after parenthesized initializer ignored [-fpermissive]
251 | fgetwln(FILE * __restrict, size_t *__len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:59: error: expression list treated as compound expression in initializer [-fpermissive]
In file included from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/ext/string_conversions.h:43,
from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/bits/basic_string.h:3972,
from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/string:53,
from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/bits/locale_classes.h:40,
from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/bits/ios_base.h:41,
from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/ios:42,
from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/istream:38,
from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/sstream:38,
from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/complex:45,
from /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpnxymx0ds/build/hptt/src/hptt/include/hptt_types.h:3,
from /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpnxymx0ds/build/hptt/src/hptt/include/transpose.h:13,
from /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpnxymx0ds/build/hptt/src/hptt/src/hptt.cpp:18:
/opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:98:11: error: 'FILE' has not been declared in '::'
98 | using ::FILE;
| ^~~~
/opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:99:11: error: 'fpos_t' has not been declared in '::'
99 | using ::fpos_t;
| ^~~~~~
/opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:101:11: error: 'clearerr' has not been declared in '::'
101 | using ::clearerr;
| ^~~~~~~~
/opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:109:11: error: 'fopen' has not been declared in '::'
109 | using ::fopen;
| ^~~~~
/opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:114:11: error: 'freopen' has not been declared in '::'
114 | using ::freopen;
| ^~~~~~~
/opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:133:11: error: 'rewind' has not been declared in '::'
133 | using ::rewind;
| ^~~~~~
/opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:135:11: error: 'setbuf' has not been declared in '::'
135 | using ::setbuf;
| ^~~~~~
/opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:139:11: error: 'tmpfile' has not been declared in '::'
139 | using ::tmpfile;
| ^~~~~~~
make[5]: *** [CMakeFiles/hptt_static.dir/src/hptt.cpp.o] Error 1
make[4]: *** [CMakeFiles/hptt_static.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [hptt/src/hptt-stamp/hptt-build] Error 2
make[1]: *** [CMakeFiles/hptt.dir/all] Error 2
make: *** [all] Error 2
*** CMake build failed
error: subprocess-exited-with-error
× Building wheel for cytnx (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /Users/pcchen/.venv/scikit_gcc12/bin/python3.13 /Users/pcchen/.venv/scikit_gcc12/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpfokxyrfd
cwd: /Users/pcchen/github/Cytnx-dev/Cytnx
ERROR: Failed building wheel for cytnx
[notice] A new release of pip is available: 25.1.1 -> 25.2
[notice] To update, run: pip install --upgrade pip
ERROR: Failed to build installable wheels for some pyproject.toml based projects (cytnx)
gcc-11
With gcc-11, pip install also fails. (kind of similar to gcc-12)
Which commit are you building the code from?
I will test again, using bc222ec17b08fb6ea4f35ceb2bbb682076f7a7da
On my ubuntu 24.04 notebook, using commit bc222ec17b08fb6ea4f35ceb2bbb682076f7a7da
pip install . -vv finish without error. But when I try to import cytnx from python, I got the runtime error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pcchen/myvenv/test/default/lib/python3.12/site-packages/cytnx/__init__.py", line 2, in <module>
from .cytnx import *
ImportError: /home/pcchen/myvenv/test/default/lib/python3.12/site-packages/cytnx/cytnx.cpython-312-x86_64-linux-gnu.so: undefined symbol: LAPACKE_dstev
From the installation log, it seem that it did find LAPACKE related stuff
-- Found LAPACK: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so
-- A cache variable, namely LAPACKE_DIR, has been set to specify the install directory of LAPACKE
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - not found
-- Looking for LAPACKE_dgeqrf
-- Looking for LAPACKE_dgeqrf - found
-- Found LAPACKE: /usr/lib/x86_64-linux-gnu/liblapacke.so
-- LAPACK found: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so
-- LAPACKE found: /usr/lib/x86_64-linux-gnu/include
-- BLAS and LAPACK Libraries: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so
Thisis to confirm that:
Using bc222ec , on macOS 15.6, pip install . is successful when I use
- Apple clang version 17.0.0
- Homebrew clang version 20.1.7
On my ubuntu 24.04 notebook, using commit bc222ec
pip install . -vvfinish without error. But when I try to import cytnx from python, I got the runtime error:Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/pcchen/myvenv/test/default/lib/python3.12/site-packages/cytnx/__init__.py", line 2, in <module> from .cytnx import * ImportError: /home/pcchen/myvenv/test/default/lib/python3.12/site-packages/cytnx/cytnx.cpython-312-x86_64-linux-gnu.so: undefined symbol: LAPACKE_dstevFrom the installation log, it seem that it did find LAPACKE related stuff
-- Found LAPACK: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so -- A cache variable, namely LAPACKE_DIR, has been set to specify the install directory of LAPACKE -- Looking for LAPACKE_dgeqrf -- Looking for LAPACKE_dgeqrf - not found -- Looking for LAPACKE_dgeqrf -- Looking for LAPACKE_dgeqrf - found -- Found LAPACKE: /usr/lib/x86_64-linux-gnu/liblapacke.so -- LAPACK found: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so -- LAPACKE found: /usr/lib/x86_64-linux-gnu/include -- BLAS and LAPACK Libraries: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/libopenblas.so
I thought openblas includes lapacke?
Can you show the output of ldd /home/pcchen/myvenv/test/default/lib/python3.12/site-packages/cytnx/cytnx.cpython-312-x86_64-linux-gnu.so?
It seems that lapacke on Ubuntu requires separate packages liblapacke and liblapacke-dev
https://bugs.launchpad.net/ubuntu/+source/openblas/+bug/1728068
I think we also need to link to liblapacke.so Debian variants. This is not required on conda.
Somehow it works on my Ubuntu 24.04
Linux lothlorien 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux****
ldd /home/pcchen/myvenv/test/default/lib/python3.12/site-packages/cytnx/cytnx.cpython-312-x86_64-linux-gnu.so
linux-vdso.so.1 (0x00007f18e6637000)
libpython3.12.so.1.0 => /lib/x86_64-linux-gnu/libpython3.12.so.1.0 (0x00007f18e4600000)
libopenblas.so.0 => /lib/x86_64-linux-gnu/libopenblas.so.0 (0x00007f18e2220000)
libgomp.so.1 => /lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f18e65c4000)
libarpack.so.2 => /lib/x86_64-linux-gnu/libarpack.so.2 (0x00007f18e657a000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f18e1e00000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f18e4f17000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f18e654a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f18e1a00000)
/lib64/ld-linux-x86-64.so.2 (0x00007f18e6639000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f18e652e000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f18e6502000)
libgfortran.so.5 => /lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007f18e1600000)
liblapack.so.3 => /lib/x86_64-linux-gnu/liblapack.so.3 (0x00007f18e0e00000)
libblas.so.3 => /lib/x86_64-linux-gnu/libblas.so.3 (0x00007f18e4eaa000)
I do have liblapacke* installed.
liblapacke-dev/noble-updates,now 3.12.0-3build1.1 amd64 [installed]
liblapacke/noble-updates,now 3.12.0-3build1.1 amd64 [installed,automatic]
This it to confirm that, with bc222ec17b08fb6ea4f35ceb2bbb682076f7a7da, on macOS, using homebrew
- gcc14, gcc13 works
- gcc15, gcc12, gcc11 fails.
For gcc15, it fails during build step for 'hptt'
-- Build files have been written to: /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpineoa8x1/build/hptt/src/hptt-build
[ 4%] Performing build step for 'hptt'
[ 10%] Building CXX object CMakeFiles/hptt_static.dir/src/hptt.cpp.o
[ 20%] Building CXX object CMakeFiles/hptt_static.dir/src/plan.cpp.o
[ 30%] Building CXX object CMakeFiles/hptt_static.dir/src/transpose.cpp.o
during GIMPLE pass: vect
/var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpineoa8x1/build/hptt/src/hptt/src/transpose.cpp: In function 'void hptt::transpose_int(const floatType*, const floatType*, floatType*, const floatType*, floatType, floatType, const ComputeNode*) [with int blockingA = 2; int blockingB = 2; int betaIsZero = 1; floatType = std::complex<double>; bool useStreamingStores = false; bool conjA = true]':
/var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpineoa8x1/build/hptt/src/hptt/src/transpose.cpp:603:6: internal compiler error: Segmentation fault: 11
603 | void transpose_int( const floatType* __restrict__ A, const floatType* __restrict__ Anext,
| ^~~~~~~~~~~~~
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <https://github.com/Homebrew/homebrew-core/issues> for instructions.
@IvanaGyro Can you help to provide some documentation for the scikit-build-core/pip install? Especially about how to pass configurations.
For example, if I do
pip install . -vv \
--config-settings skbuild.cmake.args=--preset=mkl-cpu
then it will not compile hptt, then fail.
If I do
pip install . -vv \
--config-settings skbuild.cmake.args=--preset=mkl-cpu \
--config-settings "skbuild.cmake.args=-G Unix Makefiles"
then it will compile hptt.
Also, it seems that you need some minima version of pip to support the --config-settings syntax.
Yes, we should update the document.
The reason that -G is needed is that ExternalProject seems not work well with Ninja multi-config which is used by scikit-build-core by default.
ldd /home/pcchen/myvenv/test/default/lib/python3.12/site-packages/cytnx/cytnx.cpython-312-x86_64-linux-gnu.so linux-vdso.so.1 (0x00007f18e6637000) libpython3.12.so.1.0 => /lib/x86_64-linux-gnu/libpython3.12.so.1.0 (0x00007f18e4600000) libopenblas.so.0 => /lib/x86_64-linux-gnu/libopenblas.so.0 (0x00007f18e2220000) libgomp.so.1 => /lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f18e65c4000) libarpack.so.2 => /lib/x86_64-linux-gnu/libarpack.so.2 (0x00007f18e657a000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f18e1e00000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f18e4f17000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f18e654a000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f18e1a00000) /lib64/ld-linux-x86-64.so.2 (0x00007f18e6639000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f18e652e000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f18e6502000) libgfortran.so.5 => /lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007f18e1600000) liblapack.so.3 => /lib/x86_64-linux-gnu/liblapack.so.3 (0x00007f18e0e00000) libblas.so.3 => /lib/x86_64-linux-gnu/libblas.so.3 (0x00007f18e4eaa000)I do have liblapacke* installed.
liblapacke-dev/noble-updates,now 3.12.0-3build1.1 amd64 [installed] liblapacke/noble-updates,now 3.12.0-3build1.1 amd64 [installed,automatic]
This looks the same as on my machine
ldd ~/miniforge3/lib/python3.12/site-packages/cytnx/cytnx.cpython-312-x86_64-linux-gnu.so
linux-vdso.so.1 (0x00007ffe03d9b000)
libpython3.12.so.1.0 => /lib/x86_64-linux-gnu/libpython3.12.so.1.0 (0x000073d7b7200000)
libopenblas.so.0 => /lib/x86_64-linux-gnu/libopenblas.so.0 (0x000073d7b4e20000)
libgomp.so.1 => /lib/x86_64-linux-gnu/libgomp.so.1 (0x000073d7b8f77000)
libarpack.so.2 => /lib/x86_64-linux-gnu/libarpack.so.2 (0x000073d7b7bb6000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x000073d7b4a00000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000073d7b7acd000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000073d7b4df2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000073d7b4600000)
/lib64/ld-linux-x86-64.so.2 (0x000073d7b8fe9000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x000073d7b7ab1000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x000073d7b4dc6000)
libgfortran.so.5 => /lib/x86_64-linux-gnu/libgfortran.so.5 (0x000073d7b4200000)
liblapack.so.3 => /lib/x86_64-linux-gnu/liblapack.so.3 (0x000073d7b3a00000)
libblas.so.3 => /lib/x86_64-linux-gnu/libblas.so.3 (0x000073d7b4d59000)
Now I remember.
In my Ubuntu 24.04, libopenblas.so does NOT contain LAPACKE_*. There is a separate liblapacke.so which do contain LAPACKE_*.
nm -gD /lib/x86_64-linux-gnu/libopenblas.so |grep LAPACKE
nm -gD /lib/x86_64-linux-gnu/liblapacke.so |grep LAPACKE_dstev
00000000000fcbc0 T LAPACKE_dstev
00000000000fcfb0 T LAPACKE_dstevd
00000000000fcd40 T LAPACKE_dstevd_work
00000000000fd530 T LAPACKE_dstevr
00000000000fd190 T LAPACKE_dstevr_work
00000000000fc9a0 T LAPACKE_dstev_work
00000000000fdba0 T LAPACKE_dstevx
00000000000fd870 T LAPACKE_dstevx_work
If I compile the the openblas from source, then the libopenblas.so do contain LAPACKE_*.
nm -gD /home/pcchen/OpenBLAS/libopenblas.so |grep LAPACKE_dstev
0000000000d1c6c0 T LAPACKE_dstev
0000000000d1ca70 T LAPACKE_dstevd
0000000000d1cc60 T LAPACKE_dstevd_work
0000000000d1cf10 T LAPACKE_dstevr
0000000000d1d260 T LAPACKE_dstevr_work
0000000000d1c830 T LAPACKE_dstev_work
0000000000d1d6a0 T LAPACKE_dstevx
0000000000d1d910 T LAPACKE_dstevx_work
On macOS, with Homebrew, libopenblas.0.dylib do contain LAPACKE_* and there is no LAPACKE formula in Homebrew.
nm -l /opt/homebrew/opt/openblas/lib/libopenblas.0.dylib |grep LAPACKE_dstev
0000000000e10e34 T _LAPACKE_dstev
0000000000e10f7c T _LAPACKE_dstev_work
0000000000e11110 T _LAPACKE_dstevd
0000000000e112bc T _LAPACKE_dstevd_work
0000000000e114c8 T _LAPACKE_dstevr
0000000000e11740 T _LAPACKE_dstevr_work
0000000000e11a3c T _LAPACKE_dstevx
0000000000e11c3c T _LAPACKE_dstevx_work
I will add liblapacke.so as dependency.
@pcchen can you post your homebrew configuration on your Apple silicon built? I still get segmentation fault using pip scikit-build using conda libraries.
brew config
HOMEBREW_VERSION: 4.6.9
ORIGIN: https://github.com/Homebrew/brew
HEAD: 1c959c22cee9eb333130633b30d380766e2dd09b
Last commit: 29 hours ago
Branch: stable
Core tap JSON: 04 Sep 15:11 UTC
Core cask tap JSON: 04 Sep 15:12 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.TtMMeuvhu5/org.xquartz:0
HOMEBREW_FORBID_PACKAGES_FROM_PATHS: set
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.4.5 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/bin/ruby
CPU: octa-core 64-bit arm_blizzard_avalanche
Clang: 17.0.0 build 1700
Git: 2.46.0 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.6-arm64
CLT: 16.4.0.0.1.1747106510
Xcode: 16.4
Rosetta 2: false
@yingjerkao What is your Xcode version?
@yingjerkao What is your Xcode version?
Xcode: 16.4
Now I removed all the homebrew libraries and trying to do a pip install from conda libraries, such as pybind11, cmake and openblas. Now cmake can not find the openblas through FindBlas.
I need to define the environment variable: export CMAKE_PREFIX_PATH=${CONDA_PREFIX}, and the configuration works.
The module is built but I still get a segmentation fault when import cytnx.
This might be due to the fact that openblas can not be found.
otool -L /Users/yjkao/miniconda3/envs/cytnx/lib/python3.13/site-packages/cytnx/cytnx.cpython-313-darwin.so
/Users/yjkao/miniconda3/envs/cytnx/lib/python3.13/site-packages/cytnx/cytnx.cpython-313-darwin.so:
@rpath/cytnx.cpython-313-darwin.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/libpython3.13.dylib (compatibility version 3.13.0, current version 3.13.0)
@rpath/libopenblas.0.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libomp.dylib (compatibility version 5.0.0, current version 5.0.0)
@rpath/libarpack.2.dylib (compatibility version 2.0.0, current version 2.1.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1900.180.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1351.0.0)
@pcchen Can you show the same thing for your Homebrew build?
I find that FindBlas may find the libopenblas.so and (if necessary) liblapacke.so and link it properly, but at the same time the path for Header files might be wrong.
On my Ubuntu24 notebook. cmake or pip install reports that
LAPACKE Header found: /usr/lib/x86_64-linux-gnu/include
but the directory actually does not exist. In this case, cmake and pip still works because lapacke.h is in /usr/include.
On Scopion cluster running Rocky Linux 9. cmake or pip install reports that
LAPACKE Header found: /usr/include
but all the header files are actually in the /usr/include/openblas. When you make it cannot find lapacke.h etc and fails.
Rightnow I create symbolic link in /usr/include as a work around.
This is compiled using default Apple clang version 17.0.0 (clang-1700.0.13.5)
otool -L /Users/pcchen/.venv/apple/lib/python3.13/site-packages/cytnx/cytnx.cpython-313-darwin.so /Users/pcchen/.venv/apple/lib/python3.13/site-packages/cytnx/cytnx.cpython-313-darwin.so: @rpath/cytnx.cpython-313-darwin.so (compatibility version 0.0.0, current version 0.0.0) /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.13/Python (compatibility version 3.13.0, current version 3.13.0) /opt/homebrew/opt/openblas/lib/libopenblas.0.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/homebrew/opt/llvm/lib/libomp.dylib (compatibility version 5.0.0, current version 5.0.0) /opt/homebrew/opt/arpack/lib/libarpack.2.dylib (compatibility version 4.0.0, current version 4.0.0) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1900.180.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1351.0.0)
This it to confirm that, with bc222ec, on macOS, using homebrew
* gcc14, gcc13 works * gcc15, gcc12, gcc11 fails.For gcc15, it fails during build step for 'hptt'
-- Build files have been written to: /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpineoa8x1/build/hptt/src/hptt-build [ 4%] Performing build step for 'hptt' [ 10%] Building CXX object CMakeFiles/hptt_static.dir/src/hptt.cpp.o [ 20%] Building CXX object CMakeFiles/hptt_static.dir/src/plan.cpp.o [ 30%] Building CXX object CMakeFiles/hptt_static.dir/src/transpose.cpp.o during GIMPLE pass: vect /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpineoa8x1/build/hptt/src/hptt/src/transpose.cpp: In function 'void hptt::transpose_int(const floatType*, const floatType*, floatType*, const floatType*, floatType, floatType, const ComputeNode*) [with int blockingA = 2; int blockingB = 2; int betaIsZero = 1; floatType = std::complex<double>; bool useStreamingStores = false; bool conjA = true]': /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpineoa8x1/build/hptt/src/hptt/src/transpose.cpp:603:6: internal compiler error: Segmentation fault: 11 603 | void transpose_int( const floatType* __restrict__ A, const floatType* __restrict__ Anext, | ^~~~~~~~~~~~~ Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://github.com/Homebrew/homebrew-core/issues> for instructions.
This is an internal compiler error for gcc15. Please file a bug report.
gcc-12
With gcc-12,
pip installfails near the endBuilding wheels for collected packages: cytnx Created temporary directory: /private/var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/pip-wheel-n36jse2q Destination directory: /private/var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/pip-wheel-n36jse2q Building wheel for cytnx (pyproject.toml): started Building wheel for cytnx (pyproject.toml): finished with status 'error' Failed to build cytnx Remote version of pip: 25.2 Local version of pip: 25.1.1 Was pip installed by pip? True Exception information: Traceback (most recent call last): File "/Users/pcchen/.venv/scikit_gcc12/lib/python3.13/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper status = _inner_run() File "/Users/pcchen/.venv/scikit_gcc12/lib/python3.13/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run return self.run(options, args) ~~~~~~~~^^^^^^^^^^^^^^^ File "/Users/pcchen/.venv/scikit_gcc12/lib/python3.13/site-packages/pip/_internal/cli/req_command.py", line 68, in wrapper return func(self, options, args) File "/Users/pcchen/.venv/scikit_gcc12/lib/python3.13/site-packages/pip/_internal/commands/install.py", line 436, in run raise InstallationError( ...<4 lines>... ) pip._internal.exceptions.InstallationError: Failed to build installable wheels for some pyproject.toml based projects (cytnx) Removed build tracker: '/private/var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/pip-build-tracker-acdxknpj' (scikit_gcc11) pcchen@MBA13 Cytnx % tail -n 200 Err12.txt /opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:402:36: error: expected primary-expression before 'int' 402 | void setbuffer(FILE *, char *, int); | ^~~ /opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:403:21: error: 'FILE' was not declared in this scope 403 | int setlinebuf(FILE *); | ^~~~ /opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:403:21: note: 'FILE' is defined in header '
'; did you forget to '#include '? /opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:403:27: error: expected primary-expression before ')' token 403 | int setlinebuf(FILE *); | ^ /opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:410:1: error: 'FILE' does not name a type 410 | FILE *funopen(const void *, | ^~~~ /opt/homebrew/Cellar/gcc@12/12.4.0/lib/gcc/12/gcc/aarch64-apple-darwin23/12/include-fixed/stdio.h:410:1: note: 'FILE' is defined in header ' '; did you forget to '#include '? /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:100:16: error: 'FILE' was not declared in this scope 100 | wint_t fgetwc(FILE *); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:94:1: note: 'FILE' is defined in header ' '; did you forget to '#include '? 93 | #include <__wctype.h> +++ |+#include 94 | /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:100:22: error: expected primary-expression before ')' token 100 | wint_t fgetwc(FILE *); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:103:17: error: 'FILE' has not been declared 103 | FILE * __restrict); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:104:25: error: 'FILE' has not been declared 104 | wint_t fputwc(wchar_t, FILE *); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:105:44: error: 'FILE' has not been declared 105 | int fputws(const wchar_t * __restrict, FILE * __restrict); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:106:15: error: 'FILE' was not declared in this scope 106 | int fwide(FILE *, int); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:106:15: note: 'FILE' is defined in header ' '; did you forget to '#include '? /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:106:21: error: expected primary-expression before ',' token 106 | int fwide(FILE *, int); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:106:23: error: expected primary-expression before 'int' 106 | int fwide(FILE *, int); | ^~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:106:26: error: expression list treated as compound expression in initializer [-fpermissive] 106 | int fwide(FILE *, int); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:18: error: 'FILE' was not declared in this scope 107 | int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:18: note: 'FILE' is defined in header ' '; did you forget to '#include '? /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:35: error: expected primary-expression before ',' token 107 | int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:37: error: expected primary-expression before 'const' 107 | int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); | ^~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:65: error: expected primary-expression before '...' token 107 | int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); | ^~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:107:68: error: expression list treated as compound expression in initializer [-fpermissive] 107 | int fwprintf(FILE * __restrict, const wchar_t * __restrict, ...); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:17: error: 'FILE' was not declared in this scope 108 | int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:17: note: 'FILE' is defined in header ' '; did you forget to '#include '? /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:34: error: expected primary-expression before ',' token 108 | int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:36: error: expected primary-expression before 'const' 108 | int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); | ^~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:64: error: expected primary-expression before '...' token 108 | int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); | ^~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:108:67: error: expression list treated as compound expression in initializer [-fpermissive] 108 | int fwscanf(FILE * __restrict, const wchar_t * __restrict, ...); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:109:15: error: 'FILE' was not declared in this scope 109 | wint_t getwc(FILE *); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:109:15: note: 'FILE' is defined in header ' '; did you forget to '#include '? /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:109:21: error: expected primary-expression before ')' token 109 | wint_t getwc(FILE *); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:118:24: error: 'FILE' has not been declared 118 | wint_t putwc(wchar_t, FILE *); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:123:25: error: 'FILE' has not been declared 123 | wint_t ungetwc(wint_t, FILE *); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:124:19: error: 'FILE' was not declared in this scope 124 | int vfwprintf(FILE * __restrict, const wchar_t * __restrict, | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:124:19: note: 'FILE' is defined in header ' '; did you forget to '#include '? /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:124:36: error: expected primary-expression before ',' token 124 | int vfwprintf(FILE * __restrict, const wchar_t * __restrict, | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:124:38: error: expected primary-expression before 'const' 124 | int vfwprintf(FILE * __restrict, const wchar_t * __restrict, | ^~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:125:29: error: expected primary-expression before ')' token 125 | __darwin_va_list); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:125:29: error: expression list treated as compound expression in initializer [-fpermissive] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:195:18: error: 'FILE' was not declared in this scope 195 | int vfwscanf(FILE * __restrict, const wchar_t * __restrict, | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:195:18: note: 'FILE' is defined in header ' '; did you forget to '#include '? /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:195:35: error: expected primary-expression before ',' token 195 | int vfwscanf(FILE * __restrict, const wchar_t * __restrict, | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:195:37: error: expected primary-expression before 'const' 195 | int vfwscanf(FILE * __restrict, const wchar_t * __restrict, | ^~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:196:29: error: expected primary-expression before ')' token 196 | __darwin_va_list); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:196:29: error: expression list treated as compound expression in initializer [-fpermissive] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:240:1: error: 'FILE' does not name a type 240 | FILE *open_wmemstream(wchar_t _LIBC_COUNT(__sizep) * __bufp, size_t * __sizep) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:240:1: note: 'FILE' is defined in header ' '; did you forget to '#include '? /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:25: error: 'FILE' was not declared in this scope 251 | fgetwln(FILE * __restrict, size_t *__len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ^~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:25: note: 'FILE' is defined in header ' '; did you forget to '#include '? /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:42: error: expected primary-expression before ',' token 251 | fgetwln(FILE * __restrict, size_t __len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:51: error: expected primary-expression before '' token 251 | fgetwln(FILE * __restrict, size_t *__len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:52: error: '__len' was not declared in this scope 251 | fgetwln(FILE * __restrict, size_t *__len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ^~~~~ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/Availability.h:198, from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:73: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:59: error: attributes after parenthesized initializer ignored [-fpermissive] 251 | fgetwln(FILE * __restrict, size_t *__len) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ^~~~~~~~~~~~~~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_wchar.h:251:59: error: expression list treated as compound expression in initializer [-fpermissive] In file included from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/ext/string_conversions.h:43, from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/bits/basic_string.h:3972, from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/string:53, from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/bits/locale_classes.h:40, from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/bits/ios_base.h:41, from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/ios:42, from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/istream:38, from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/sstream:38, from /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/complex:45, from /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpnxymx0ds/build/hptt/src/hptt/include/hptt_types.h:3, from /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpnxymx0ds/build/hptt/src/hptt/include/transpose.h:13, from /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpnxymx0ds/build/hptt/src/hptt/src/hptt.cpp:18: /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:98:11: error: 'FILE' has not been declared in '::' 98 | using ::FILE; | ^~~~ /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:99:11: error: 'fpos_t' has not been declared in '::' 99 | using ::fpos_t; | ^~~~~~ /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:101:11: error: 'clearerr' has not been declared in '::' 101 | using ::clearerr; | ^~~~~~~~ /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:109:11: error: 'fopen' has not been declared in '::' 109 | using ::fopen; | ^~~~~ /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:114:11: error: 'freopen' has not been declared in '::' 114 | using ::freopen; | ^~~~~~~ /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:133:11: error: 'rewind' has not been declared in '::' 133 | using ::rewind; | ^~~~~~ /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:135:11: error: 'setbuf' has not been declared in '::' 135 | using ::setbuf; | ^~~~~~ /opt/homebrew/Cellar/gcc@12/12.4.0/include/c++/12/cstdio:139:11: error: 'tmpfile' has not been declared in '::' 139 | using ::tmpfile; | ^~~~~~~ make[5]: *** [CMakeFiles/hptt_static.dir/src/hptt.cpp.o] Error 1 make[4]: *** [CMakeFiles/hptt_static.dir/all] Error 2 make[3]: *** [all] Error 2 make[2]: *** [hptt/src/hptt-stamp/hptt-build] Error 2 make[1]: *** [CMakeFiles/hptt.dir/all] Error 2 make: *** [all] Error 2 *** CMake build failed error: subprocess-exited-with-error
× Building wheel for cytnx (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip. full command: /Users/pcchen/.venv/scikit_gcc12/bin/python3.13 /Users/pcchen/.venv/scikit_gcc12/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /var/folders/vx/2rtqxt1j1xq1b3b7ltbg_ch00000gn/T/tmpfokxyrfd cwd: /Users/pcchen/github/Cytnx-dev/Cytnx ERROR: Failed building wheel for cytnx
[notice] A new release of pip is available: 25.1.1 -> 25.2 [notice] To update, run: pip install --upgrade pip ERROR: Failed to build installable wheels for some pyproject.toml based projects (cytnx)
I think there is a conflict between MacOSX SDK and gcc12 in stdio.h. I assume you are using the latest MacOSX SDK?
I think I am using the lastest MacOS SDK.
pcchen@MBA13 ~ % xcrun --show-sdk-version
15.5
pcchen@MBA13 ~ % xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
I found that there is no BuildandTest for Mac builds. It seems there is only CD for Mac builds?
Yes. The tests only run on ubuntu. Because the build processes in .github/workflow/ci-cmake*.yml are not conda build. I haven't integrate them together. I hope the build for testing only uses pip install, no conda, however, I don't know what is the best way to maintain BLAS and LAPACK runtime library dependency when only using pip.
Since I have been getting segmentation fault or import errors on my local conda builds, I suspect those builds might have similar issues for Apple silicon, in particular the dependency to openblas.