Skip to content
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

[BUG] Build failure on 32-bit architecture (at least i386) #140

Closed
2 tasks done
sunpoet opened this issue Jun 6, 2024 · 1 comment · Fixed by #141
Closed
2 tasks done

[BUG] Build failure on 32-bit architecture (at least i386) #140

sunpoet opened this issue Jun 6, 2024 · 1 comment · Fixed by #141
Assignees
Labels
bug Something isn't working cxx Something related to the CXX source code

Comments

@sunpoet
Copy link

sunpoet commented Jun 6, 2024

Required prerequisites

What version of OpTree are you using?

0.11.0

System information

The library was built from ports via

Problem description

It fails to build on i386 due to same size of different types.
It causes error of redefinition of functions.
Therefore, the build fails.

The full build log is here.

Reproducible example code

The build failure is as follows:

-- Build files have been written to: /wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/build/temp.freebsd-13.2-RELEASE-p11-i386-cpython-39
/usr/local/bin/cmake --build . --config Release --target _C --
[ 12%] Building CXX object src/CMakeFiles/_C.dir/optree.cpp.o
In file included from /wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/src/optree.cpp:25:
In file included from /wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/registry.h:29:
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:229:19: error: redefinition of 'GET_ITEM_HANDLE<pybind11::tuple, int>'
inline py::handle GET_ITEM_HANDLE<py::tuple>(const py::handle& container, const int& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:221:19: note: previous definition is here
inline py::handle GET_ITEM_HANDLE<py::tuple>(const py::handle& container, const py::ssize_t& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:241:19: error: redefinition of 'GET_ITEM_HANDLE<pybind11::list, int>'
inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const int& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:233:19: note: previous definition is here
inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const py::ssize_t& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:259:19: error: redefinition of 'GET_ITEM_BORROW<pybind11::tuple, int>'
inline py::object GET_ITEM_BORROW<py::tuple>(const py::handle& container, const int& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:250:19: note: previous definition is here
inline py::object GET_ITEM_BORROW<py::tuple>(const py::handle& container, const py::ssize_t& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:273:19: error: redefinition of 'GET_ITEM_BORROW<pybind11::list, int>'
inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const int& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:264:19: note: previous definition is here
inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const py::ssize_t& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:292:19: error: redefinition of 'GET_ITEM_STEAL<pybind11::tuple, int>'
inline py::object GET_ITEM_STEAL<py::tuple>(const py::handle& container, const int& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:283:19: note: previous definition is here
inline py::object GET_ITEM_STEAL<py::tuple>(const py::handle& container, const py::ssize_t& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:306:19: error: redefinition of 'GET_ITEM_STEAL<pybind11::list, int>'
inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const int& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:297:19: note: previous definition is here
inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const py::ssize_t& item) {
                  ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:328:13: error: redefinition of 'SET_ITEM<pybind11::tuple, int>'
inline void SET_ITEM<py::tuple>(const py::handle& container,
            ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:316:13: note: previous definition is here
inline void SET_ITEM<py::tuple>(const py::handle& container,
            ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:346:13: error: redefinition of 'SET_ITEM<pybind11::list, int>'
inline void SET_ITEM<py::list>(const py::handle& container,
            ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:334:13: note: previous definition is here
inline void SET_ITEM<py::list>(const py::handle& container,
            ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:578:9: error: no matching function for call to 'SET_ITEM'
        SET_ITEM<py::tuple>(fields, i, py::str(members[i].name));
        ^~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:312:13: note: candidate template ignored: substitution failure [with Container = pybind11::tuple, Item = int]
inline void SET_ITEM(const py::handle& container, const Item& item, const py::handle& value) {
            ^
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:672:26: error: no matching function for call to 'GET_ITEM_BORROW'
        py::object key = GET_ITEM_BORROW<py::list>(keys, i);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/devel/py-optree/work-py39/optree-0.11.0/include/utils.h:246:19: note: candidate template ignored: substitution failure [with Container = pybind11::list, Item = int]
inline py::object GET_ITEM_BORROW(const py::handle& container, const Item& item) {
                  ^
10 errors generated.
*** Error code 1

Traceback

No response

Expected behavior

No response

Additional context

No response

@sunpoet sunpoet added the bug Something isn't working label Jun 6, 2024
@XuehaiPan XuehaiPan added the cxx Something related to the CXX source code label Jun 6, 2024
@sunpoet
Copy link
Author

sunpoet commented Jun 10, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cxx Something related to the CXX source code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants