uber / h3

Hexagonal hierarchical geospatial indexing system
https://h3geo.org
Apache License 2.0
4.8k stars 457 forks source link

can't use the h3 gem in ruby using windows #853

Closed hussain-alsayedali closed 1 month ago

hussain-alsayedali commented 1 month ago

it gives me the error below, am using windows and downloaded all the pre-req build tools

PS C:\Users\Hussain\Desktop\projects\mrsool back> gem install h3 Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing h3: ERROR: Failed to build gem native extension.

current directory: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/h3-3.7.2/ext/h3

C:/Ruby27-x64/bin/ruby.exe -I C:/Ruby27-x64/lib/ruby/2.7.0 -r ./siteconf20240713-6248-akl2m3.rb extconf.rb

current directory: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/h3-3.7.2/ext/h3 make "DESTDIR=" clean : # do nothing, cleanup happens when gem uninstalled

current directory: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/h3-3.7.2/ext/h3 make "DESTDIR=" cd src; cmake . -DBUILD_SHARED_LIBS=true -DBUILD_FILTERS=OFF -DBUILD_BENCHMARKS=OFF; make -- Building for: Visual Studio 17 2022 CMake Deprecation Warning at CMakeLists.txt:15 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045. -- The C compiler identification is MSVC 19.40.33812.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done CMake Warning at CMakeLists.txt:278 (message): clang-format was not detected, so automatic source code reformatting is disabled

CMake Warning at CMakeLists.txt:290 (message): clang-tidy was not detected, so source code linting is disabled

-- Found Doxygen: C:/msys64/usr/bin/doxygen.exe (found version "1.11.0") found components: doxygen missing components: dot
-- Configuring done (3.0s) -- Generating done (2.1s) -- Build files have been written to: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/h3-3.7.2/ext/h3/src make[1]: Entering directory '/c/Ruby27-x64/lib/ruby/gems/2.7.0/gems/h3-3.7.2/ext/h3/src' make[1]: No targets specified and no makefile found. Stop. make[1]: Leaving directory '/c/Ruby27-x64/lib/ruby/gems/2.7.0/gems/h3-3.7.2/ext/h3/src' make: [Makefile:2: make] Error 2

make failed, exit code 2

Gem files will remain installed in C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/h3-3.7.2 for inspection. Results logged to C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/h3-3.7.2/gem_make.out

isaacbrodsky commented 1 month ago

You may get better responses by posting on seanhandley/h3_ruby, as the Ruby bindings are not maintained in this repo.

hussain-alsayedali commented 1 month ago

The problem was resolved by using WSL and Ubuntu