isaacbrodsky / h3-duckdb

Bindings for H3 to DuckDB
Apache License 2.0
159 stars 8 forks source link

Building extension in windows 64 bit #32

Closed lebuu-eu closed 11 months ago

lebuu-eu commented 1 year ago

I am getting this error when I am trying to build the bindings in my Windows operating system. When I tried to build the extension, I got this error. I am not an expert on building extensions, but I couldn’t find any solution. I am running on Windows 64-bit operating system. Thanks. build_tpch_issue

Joaquin-Urruti commented 1 year ago

God! I'm getting the same error... tryed infinite solutions and nothing seems to work...

isaacbrodsky commented 1 year ago

In CI, this is tested on PowerShell, not cmd. You may need to use PowerShell or Bash (usually installed when you install Git) to build h3-duckdb. (I haven't had a chance to test building on a real Windows machine yet)

Joaquin-Urruti commented 1 year ago

I'll try it out, thanks!

Joaquin-Urruti commented 1 year ago

In Powershell didn't work either...

Joaquin-Urruti commented 1 year ago

tryed WSL couldn't make it work either...

isaacbrodsky commented 1 year ago

I tried this today and was not able to get it to work on main. After updating the build system to match sqlite_scanner again, it seems to be building on Windows. I also had to upgrade duckdb in order to use the new build code. Code is in #66.

I sued VS2019 and also installed the following:

choco install cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"'
choco install make

(Note: You may need to reopen any shells after running the above.)

Then, to build, from Git Bash:

make debug

Test:

./build/debug/Debug/duckdb.exe -unsigned -interactive
load 'build\debug\extension\h3ext\h3ext.duckdb_extension';
select h3_h3_to_string(h3_latlng_to_cell(0,0,0));
isaacbrodsky commented 11 months ago

The latest version of the extension should build on Windows, using the following command:

CMAKE_BUILD_PARALLEL_LEVEL=8 make release