Skip to content

Does not build on GCC 4.9.2-10 / armv7l #13

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

Closed
notlion opened this issue Nov 19, 2015 · 4 comments
Closed

Does not build on GCC 4.9.2-10 / armv7l #13

notlion opened this issue Nov 19, 2015 · 4 comments

Comments

@notlion
Copy link

notlion commented Nov 19, 2015

I'm getting some errors when building the example with GCC 4.9 on linux. It looks like pybind::ssize_t is actually int on 32-bit, so overloading int_ with both on 32 bit architectures actually triggers an error.

Scanning dependencies of target example
[  7%] Building CXX object CMakeFiles/example.dir/example/example.cpp.o
In file included from /pybind11/include/pybind11/cast.h:13:0,
                 from /pybind11/include/pybind11/pybind11.h:26,
                 from /pybind11/example/example.h:1,
                 from /pybind11/example/example.cpp:10:
/pybind11/pytypes.h:276:5: error: 'pybind11::int_::int_(pybind11::ssize_t)' cannot be overloaded
     int_(ssize_t value) : object(PyLong_FromSsize_t(value), false) { }
     ^
/pybind11/include/pybind11/pytypes.h:273:5: error: with 'pybind11::int_::int_(int)'
     int_(int value) : object(PyLong_FromLong((long) value), false) { }
     ^
CMakeFiles/example.dir/build.make:54: recipe for target 'CMakeFiles/example.dir/example/example.cpp.o' failed
make[2]: *** [CMakeFiles/example.dir/example/example.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/example.dir/all' failed
make[1]: *** [CMakeFiles/example.dir/all] Error 2
Makefile:86: recipe for target 'all' failed
make: *** [all] Error 2
@wjakob
Copy link
Member

wjakob commented Nov 29, 2015

Hi,

can you please check if it works with the latest version?

Thanks,
Wenzel

@wjakob
Copy link
Member

wjakob commented Nov 30, 2015

Closing this ticket as the underlying code has been completely rewritten to avoid these sorts of issues.

Please reopen if you are still having problems with compilation on arm.

@wjakob wjakob closed this as completed Nov 30, 2015
@notlion
Copy link
Author

notlion commented Nov 30, 2015

Yup builds successfully on ARM now. Thanks very much for the fix!

@wjakob
Copy link
Member

wjakob commented Nov 30, 2015

great to hear -- thanks for checking!

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

No branches or pull requests

2 participants