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

<limits> std::numeric_limits include error. #47

Closed
rerdavies opened this issue Feb 15, 2022 · 4 comments · Fixed by #49
Closed

<limits> std::numeric_limits include error. #47

rerdavies opened this issue Feb 15, 2022 · 4 comments · Fixed by #49

Comments

@rerdavies
Copy link

rerdavies commented Feb 15, 2022

Edit:

Not such a trivia fix. The issue is in xsimd include files. xsimd has a fix for the issue. You need to update the github submodule reference to -- I'm not sure what.


An include error on g++-11 ARM AARCH64 builds.

You need to add #include <limits> somewhere appropriate. fwiw, this seems to be a recurrent problem on this platform. There has been some change to implicit std c++ includes on this platform that avoids needlessly including somewhere.

The obvious completely trivial workaround: add #include <limits> before including RTNeural/RTNeural.h.

Apologies in advance for not pushing a trivial fix myself, but I have the project checked out as a git submodule, and I'm not sure I can push the change safely.

/bin/g++-11 -DRTNEURAL_DEFAULT_ALIGNMENT=16 -DRTNEURAL_USE_XSIMD=1 -I../modules/RTNeural/RTNeural/../modules/json -I../modules/RTNeural/modules/xsimd/include -g -fPIC -std=c++17 -std=gnu++14 -MD -MT modules/RTNeural/RTNeural/CMakeFiles/RTNeural.dir/RTNeural.cpp.o -MF modules/RTNeural/RTNeural/CMakeFiles/RTNeural.dir/RTNeural.cpp.o.d -o modules/RTNeural/RTNeural/CMakeFiles/RTNeural.dir/RTNeural.cpp.o -c ../modules/RTNeural/RTNeural/RTNeural.cpp
[build] In file included from ../modules/RTNeural/modules/xsimd/include/xsimd/types/xsimd_neon_complex.hpp:25,
[build]                  from ../modules/RTNeural/modules/xsimd/include/xsimd/types/xsimd_types_include.hpp:69,
[build]                  from ../modules/RTNeural/modules/xsimd/include/xsimd/types/xsimd_traits.hpp:17,
[build]                  from ../modules/RTNeural/modules/xsimd/include/xsimd/xsimd.hpp:16,
[build]                  from ../modules/RTNeural/RTNeural/activation/../common.h:69,
[build]                  from ../modules/RTNeural/RTNeural/activation/activation_xsimd.h:4,
[build]                  from ../modules/RTNeural/RTNeural/activation/activation.h:44,
[build]                  from ../modules/RTNeural/RTNeural/Model.h:8,
[build]                  from ../modules/RTNeural/RTNeural/RTNeural.h:5,
[build]                  from ../modules/RTNeural/RTNeural/RTNeural.cpp:1:
[build] ../modules/RTNeural/modules/xsimd/include/xsimd/types/xsimd_complex_base.hpp:102:45: error: ‘numeric_limits’ is not a member of ‘std’
[build]   102 |         : std::integral_constant<bool, std::numeric_limits<std::complex<T>>::is_iec559>
[build]       |                                             ^~~~~~~~~~~~~~
@jatinchowdhury18
Copy link
Owner

Ah, thanks for catching this! I don't think I've tested with that compiler/platform combination yet.

I've been meaning to upgrade xsimd at some point, but I've been putting it off a little bit, since they made some changes to the API that will take some time to get familiar with.

I wonder if it might work to #include <limits> in an RTNeural header before including xsimd? I've made a test branch with that change if you'd like to test it out.

@rerdavies
Copy link
Author

rerdavies commented Feb 16, 2022 via email

@jatinchowdhury18
Copy link
Owner

Ah, good call! I had tried to do that at first, but was getting an error. Must have spelled it wrong or something silly. I'll get that merged shortly.

Thanks,
Jatin

@rerdavies
Copy link
Author

rerdavies commented Feb 16, 2022 via email

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

Successfully merging a pull request may close this issue.

2 participants