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

[Build] Error : missing lib #include <climits> #3543

Open
Kreyparion opened this issue Mar 13, 2024 · 0 comments
Open

[Build] Error : missing lib #include <climits> #3543

Kreyparion opened this issue Mar 13, 2024 · 0 comments
Labels

Comments

@Kreyparion
Copy link

Description

During the build with the command : make -j8 an error occurred which stopped the build process : a missing library import in reduce.hpp

Error Log

arrayfire/src/backend/opencl/kernel/reduce.hpp: In function ‘void arrayfire::opencl::kernel::reduceAllLauncher(arrayfire::opencl::Param, arrayfire::opencl::Param, arrayfire::opencl::uint, arrayfire::opencl::uint, arrayfire::opencl::uint, int, double)’:
arrayfire/src/backend/opencl/kernel/reduce.hpp:145:24: error: ‘UINT_MAX’ was not declared in this scope
  145 |     if (tmp_elements > UINT_MAX) {
      |                        ^~~~~~~~
arrayfire/src/backend/opencl/kernel/reduce.hpp:26:1: note: ‘UINT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
   25 | #include <kernel_headers/reduce_first.hpp>
  +++ |+#include <climits>
   26 | #include <math.hpp>
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unqualified-std-cast-call’ may have been intended to silence earlier diagnostics

I added #include <climits> in the reduce.hpp file and it fixed it.

Build Environment

Compiler version: gcc 11.4.0
Operating system: Ubuntu 22.04
Build environment: everything else installed successfully
CMake variables: cmake .. -DCMAKE_BUILD_TYPE=Release

@Kreyparion Kreyparion changed the title [Build] [Build] Error : missing lib #include <climits> Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant