Comments (2)
Thanks for your help!
As you suggested, I successfully run the code after modifying the requirements file (>= 1.5.2 to == 1.5.2).
from strand_integration.
Hello @bearprin !
Thanks for your report.
Short answer: Which version of nanobind are you using? If you use 1.6, try 1.5.2 instead.
I did not anticipate this error when I first committed this code. At that time, 1.5.2 was the latest version. So, I tried the build again with nanobind==1.6.2 and got a similar error message as yours. From both messages, the error seems to be caused by nanobind.
I need to fix this error fundamentally, but I think a temporary solution would be to drop the version of nanobind.
Below is the entire error message on my env (MacOS M1 Max, Python==3.10.8, nanobind==1.6.2).
Processing /Users/s19021/workspace/strand_integration/cpp_ext
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: strandtools
Building wheel for strandtools (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for strandtools (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [43 lines of output]
*** scikit-build-core 0.5.1 using CMake 3.25.0 (wheel)
2023-10-12 20:38:19,715 - scikit_build_core - WARNING - No license files found, set wheel.license-files to [] to suppress this warning
*** Configuring CMake...
2023-10-12 20:38:19,730 - scikit_build_core - WARNING - libdir/ldlibrary: /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.10/lib/Python.framework/Versions/3.10/Python is not a real file!
loading initial cache file build/cp310-cp310-macosx_12_0_arm64/CMakeInit.txt
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/s19021/workspace/strand_integration/cpp_ext/build/cp310-cp310-macosx_12_0_arm64
*** Building project with Ninja...
[1/13] Building CXX object CMakeFiles/nanobind-static.dir/opt/homebrew/lib/python3.10/site-packages/nanobind/src/nb_static_property.cpp.o
[2/13] Building CXX object CMakeFiles/nanobind-static.dir/opt/homebrew/lib/python3.10/site-packages/nanobind/src/trampoline.cpp.o
[3/13] Building CXX object CMakeFiles/nanobind-static.dir/opt/homebrew/lib/python3.10/site-packages/nanobind/src/implicit.cpp.o
[4/13] Building CXX object CMakeFiles/nanobind-static.dir/opt/homebrew/lib/python3.10/site-packages/nanobind/src/nb_enum.cpp.o
[5/13] Building CXX object CMakeFiles/nanobind-static.dir/opt/homebrew/lib/python3.10/site-packages/nanobind/src/nb_internals.cpp.o
[6/13] Building CXX object CMakeFiles/nanobind-static.dir/opt/homebrew/lib/python3.10/site-packages/nanobind/src/error.cpp.o
[7/13] Building CXX object CMakeFiles/nanobind-static.dir/opt/homebrew/lib/python3.10/site-packages/nanobind/src/nb_ndarray.cpp.o
[8/13] Building CXX object CMakeFiles/nanobind-static.dir/opt/homebrew/lib/python3.10/site-packages/nanobind/src/common.cpp.o
[9/13] Building CXX object CMakeFiles/nanobind-static.dir/opt/homebrew/lib/python3.10/site-packages/nanobind/src/nb_func.cpp.o
[10/13] Building CXX object CMakeFiles/nanobind-static.dir/opt/homebrew/lib/python3.10/site-packages/nanobind/src/nb_type.cpp.o
[11/13] Linking CXX static library libnanobind-static.a
[12/13] Building CXX object CMakeFiles/_strandtools_impl.dir/src/strandtools.cpp.o
FAILED: CMakeFiles/strandtools_impl.dir/src/strandtools.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -D_strandtools_impl_EXPORTS -I/Users/s19021/workspace/strand_integration/cpp_ext/src/include -I/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/include/python3.10 -I/opt/homebrew/lib/python3.10/site-packages/nanobind/include -isystem /opt/homebrew/Cellar/opencv/4.7.0_1/include/opencv4 -isystem /opt/homebrew/include -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -fPIC -fvisibility=hidden -fno-stack-protector -Os -Xclang -fopenmp -std=gnu++17 -MD -MT CMakeFiles/strandtools_impl.dir/src/strandtools.cpp.o -MF CMakeFiles/strandtools_impl.dir/src/strandtools.cpp.o.d -o CMakeFiles/strandtools_impl.dir/src/strandtools.cpp.o -c /Users/s19021/workspace/strand_integration/cpp_ext/src/strandtools.cpp
In file included from /Users/s19021/workspace/strand_integration/cpp_ext/src/strandtools.cpp:2:
In file included from /opt/homebrew/lib/python3.10/site-packages/nanobind/include/nanobind/nanobind.h:52:
/opt/homebrew/lib/python3.10/site-packages/nanobind/include/nanobind/nb_class.h:363:5: error: static_assert failed due to requirement 'detail::is_base_caster_v<nanobind::detail::type_caster<std::shared_ptr, int>>' "You attempted to bind a type that is already intercepted by a type caster. Having both at the same time is not allowed. Are you perhaps binding an STL type, while at the same time including a matching type caster from <nanobind/stl/*>? Or did you perhaps forget to declare NB_MAKE_OPAQUE(..) to specifically disable the type caster catch-all for a specific type? Please review the documentation to learn about the difference between bindings and type casters."
static_assert(
^
/Users/s19021/workspace/strand_integration/cpp_ext/src/strandtools.cpp:180:5: note: in instantiation of template class 'nanobind::class<std::shared_ptr>' requested here
nb::class<std::shared_ptr>(m, "SingleViewDataPtr");
^
In file included from /Users/s19021/workspace/strand_integration/cpp_ext/src/strandtools.cpp:2:
In file included from /opt/homebrew/lib/python3.10/site-packages/nanobind/include/nanobind/nanobind.h:52:
/opt/homebrew/lib/python3.10/site-packages/nanobind/include/nanobind/nb_class.h:363:5: error: static_assert failed due to requirement 'detail::is_base_caster_v<nanobind::detail::type_caster<std::vector<std::shared_ptr, std::allocator<std::shared_ptr>>, int>>' "You attempted to bind a type that is already intercepted by a type caster. Having both at the same time is not allowed. Are you perhaps binding an STL type, while at the same time including a matching type caster from <nanobind/stl/*>? Or did you perhaps forget to declare NB_MAKE_OPAQUE(..) to specifically disable the type caster catch-all for a specific type? Please review the documentation to learn about the difference between bindings and type casters."
static_assert(
^
/Users/s19021/workspace/strand_integration/cpp_ext/src/strandtools.cpp:182:5: note: in instantiation of template class 'nanobind::class<std::vector<std::shared_ptr>>' requested here
nb::class<std::vector<std::shared_ptr>>(m, "MultiViewDataBase");
^
2 errors generated.
ninja: build stopped: subcommand failed.
*** CMake build failed
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for strandtools
Failed to build strandtools
ERROR: Could not build wheels for strandtools, which is required to install pyproject.toml-based projects
from strand_integration.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strand_integration.