-
Notifications
You must be signed in to change notification settings - Fork 7
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing to build python bindings #37
Comments
Thanks! I tried debugging here #38 but unfortunately the CI works fine on Linux GCC 11.3.0. This makes it a bit harder to understand what is bugging the compiler and to solve it. It seems that the compiler has a hard time deciding between template <class T, typename std::enable_if_t<xt::get_rank<T>::value != 1, int> = 0>
std::vector<std::string> rgb2hex(const T& arg);
template <class T, typename std::enable_if_t<xt::get_rank<T>::value == 1, int> = 0>
std::string rgb2hex(const T& arg); Could you tried by adding the template explicitly to m.def(
"rgb2hex",
static_cast<std::string (*)(const xt::pytensor<double, 1>&)>(&cppcolormap::rgb2hex<xt::pytensor<double, 1>>),
DOC("rgb2hex")
);
m.def(
"rgb2hex",
static_cast<std::vector<std::string> (*)(const xt::pytensor<double, 2>&)>(
&cppcolormap::rgb2hex<xt::pytensor<double, 2>>
),
DOC("rgb2hex")
); ? |
Quick update: still getting the same error at the first overload, i.e. one that returns TODO: I should compare xtensor and pybind11 versions, and maybe set up a separate gh action to reproduce the failures more easily |
Thanks for the update. That help to narrow it down. If I read better it seems that the compiler converts the |
No, that doesn't help yet, and I don't think it's got anything to do with cxx11 abi: the vector of strings seems to be fine.
|
Just to be sure, are you on xtensor-python >=0.25.2 ? |
|
Then problem solved. cppcolormap/include/cppcolormap.h Line 245 in 2fe9454
|
For future reference 2fe9454 |
Perfect, thanks! Maybe also a EDIT: I'll test with a newer xtensor and close the issue if that works out |
Sounds great, a PR is welcome |
Frankly though, maybe |
xtensor*'s versioning is a mystery to me ;) |
Hi! Built the tests fine, but gcc doesn't seem to like the signatures in the python bindings
Logs: https://gist.github.com/SomeoneSerge/2507244e5bc3b11982948ff0ed86a681
Getting the same error with gcc11 and gcc12.
Pybind11 version: pybind11-2.10.3/include (found version "2.10.3")
Built with: SomeoneSerge/pkgs@b0274d7
The text was updated successfully, but these errors were encountered: