gpujs / gpu.js

GPU Accelerated JavaScript
https://gpu.rocks
MIT License
15.12k stars 655 forks source link

When installing: error: 'numeric_limits' is not a member of 'std' (/angle/src/libANGLE/HandleAllocator.cpp) #753

Open KosRud opened 2 years ago

KosRud commented 2 years ago

When installing gpu.js on arch linux got following error:

../angle/src/libANGLE/HandleAllocator.cpp: In constructor 'gl::HandleAllocator::HandleAllocator()':
│ ../angle/src/libANGLE/HandleAllocator.cpp:27:52: error: 'numeric_limits' is not a member of 'std'
│    27 |     mUnallocatedList.push_back(HandleRange(1, std::numeric_limits<GLuint>::max()));

HandleAllocator.cpp - line 27

Fixed by adding #include <limits> to HandleAllocator.cpp.

Vectorrent commented 2 years ago

Same issue here. Also running on Arch. I'm not sure how to test this fix, but I'm also using Docker, so it doesn't affect me much. A PR would be appreciated though!

smallst commented 2 years ago

@LuciferianInk use export CXXFLAGS='-include /usr/include/c++/11.2.0/limits' for your Docker env

Vectorrent commented 1 year ago

@smallst, I've run into this issue in multiple environments, and your solution has worked every time. Thank you!

As a note to anyone who may not know; your C++ version and install location may vary, depending on distro. You may need to adjust the above path accordingly.