rv8 icon indicating copy to clipboard operation
rv8 copied to clipboard

Compilation Failure on `sudo make` Due to Missing `<limits>` Include in Specific Files

Open Carlos12001 opened this issue 3 months ago • 0 comments

Title:

Compilation Failure on sudo make Due to Missing <limits> Include in Specific Files

Description:

When attempting to compile the project using make with sudo, I encountered multiple compilation errors stating that 'numeric_limits' is not a member of 'std'. The errors occur in the files src/gen/gen-cc.cc and potentially others related to floating-point operations. It appears that the issue is due to the absence of the <limits> header in these files.

Steps to Reproduce:

  1. Navigate to the project root directory.
  2. Execute the command sudo make.

Expected Outcome:

The project compiles without any errors.

Actual Outcome:

Compilation fails with the following error messages:

src/gen/gen-cc.cc: In function ‘void typed_value_set(std::set<std::__cxx11::basic_string<char> >&, const rv_primitive_type*)’:
src/gen/gen-cc.cc:50:18: error: ‘numeric_limits’ is not a member of ‘std’
   50 |         if (std::numeric_limits<T>::is_signed) {
      |                  ^~~~~~~~~~~~~~
...

Proposed Solution:

Include <limits> in the affected files, specifically:

  • src/gen/gen-cc.cc
  • src/gen/gen-fpu-test.cc

Additional Information:

  • Operating System: Linux Mint 21.3 x86_64
  • Kernel: 6.5.0-21-generic
  • GCC Version: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Carlos12001 avatar Mar 06 '24 18:03 Carlos12001