zxing_cpp.rb icon indicating copy to clipboard operation
zxing_cpp.rb copied to clipboard

cmake warning blocks gem install

Open chiperific opened this issue 1 year ago • 0 comments

Installing zxing_cpp 0.1.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/chipkragt/.rvm/gems/ruby-3.3.4/gems/zxing_cpp-0.1.1/ext/zxing
/Users/chipkragt/.rvm/rubies/ruby-3.3.4/bin/ruby extconf.rb
CMake Warning (dev) at CMakeLists.txt:5 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Deprecation Warning at CMakeLists.txt:6 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


CMake Warning at CMakeLists.txt:88 (message):
  Not building testrunner, because CppUnit is missing


/Users/chipkragt/.rvm/gems/ruby-3.3.4/gems/zxing_cpp-0.1.1/ext/zxing/zxing-cpp/cli/src/jpgd.cpp:568:50:
warning: shifting a negative signed value is undefined [-Wshift-negative-value]
568 | static const int s_extend_offset[16] = { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1,
((-1)<<4) + 1, ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, ((-1)<<9) + 1,
((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 };
      |                                              ~~~~^

I tried running combinations of CPPFLAGS=-Wno-shift-negative-value and CFLAGS=-Wno-warnings without luck.

It's just a warning, so I feel like I could skip it, but I'm a Rubyist, not a C dev, so I'm a bit lost here.

chiperific avatar Mar 06 '25 04:03 chiperific