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

Error with "pip install ./uv_unwrapper/" on Ubuntu #70

Open
ropry opened this issue Jan 10, 2025 · 0 comments
Open

Error with "pip install ./uv_unwrapper/" on Ubuntu #70

ropry opened this issue Jan 10, 2025 · 0 comments

Comments

@ropry
Copy link

ropry commented Jan 10, 2025

When installing dependencies for ./uv_unwrapper/ using pip, the file uv_unwrapper/csrc/bvh.cpp is compiled:

x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/mnt/c/Users/User/Documents/Utils/stable-fast-3d/.venv/lib/python3.12/site-packages/torch/include -I/mnt/c/Users/User/Documents/Utils/stable-fast-3d/.venv/lib/python3.12/site-packages/torch/include/torch/csrc/api/include -I/mnt/c/Users/User/Documents/Utils/stable-fast-3d/.venv/lib/python3.12/site-packages/torch/include/TH -I/mnt/c/Users/User/Documents/Utils/stable-fast-3d/.venv/lib/python3.12/site-packages/torch/include/THC -I/mnt/c/Users/User/Documents/Utils/stable-fast-3d/.venv/include -I/usr/include/python3.12 -c uv_unwrapper/csrc/bvh.cpp -o build/temp.linux-x86_64-cpython-312/uv_unwrapper/csrc/bvh.o -O3 -fdiagnostics-color=always -fopenmp -march=native -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17

On Ubuntu 24.04, the default compiler is gcc-13, which produces the following error:

uv_unwrapper/csrc/bvh.cpp:45:19: error: ‘exchange’ is not a member of ‘std’
   45 |     : triIdx(std::exchange(other.triIdx, nullptr)),

gcc-12 generates a similar error, so it's necessary to downgrade the compiler to gcc-11.

The compiler suggests resolving this issue by modifying the code as follows:

uv_unwrapper/csrc/bvh.cpp:8:1: note: ‘std::exchange’ is defined in header ‘<utility>’; did you forget to ‘#include <utility>’?
    7 | #include <queue>
  +++ |+#include <utility>
    8 | #include <tuple>

Maybe it would be better to add #include <utility> to uv_unwrapper/csrc/bvh.cpp to avoid downgrading the compiler version?

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

1 participant