h3r icon indicating copy to clipboard operation
h3r copied to clipboard

fix h3 makefile bug

Open harryprince opened this issue 7 years ago • 7 comments
trafficstars

should be PKG_LIBS=-L/usr/local/lib -lh3

harryprince avatar Jun 08 '18 02:06 harryprince

if this bug doesn't fix, it will tell you:

/usr/bin/g++ -shared -L/usr/lib64/R/lib -Wl,-z,relro -o h3r.so RcppExports.o h3api.o -L/usr/local/lib -lh3.1 -L/usr/lib64/R/lib -lR
/usr/bin/ld: cannot find -lh3.1
collect2: error: ld returned 1 exit status
make: *** [h3r.so] Error 1
ERROR: compilation failed for package ‘h3r’

harryprince avatar Jun 08 '18 02:06 harryprince

Thanks for the contribution! I should probably set up CI for this, but I'll need to validate it locally.

I think I probably had an older version of h3 installed that wanted to be addressed by -lh3.1.

scottmmjackson avatar Jun 08 '18 14:06 scottmmjackson

Great appreciate your job to integrate H3 in R. previously, I was stuck by DGGS dggridR package with inconsistent shape problem (pentagon + hexagon ) like this:

image

Now, our large scale machine learning model can be normalized very well in shape and area all over the world.

harryprince avatar Jun 12 '18 00:06 harryprince

This is so cool! Thanks again for the contribution!

scottmmjackson avatar Jun 12 '18 01:06 scottmmjackson

I can confirm this is working for me

saurfang avatar Sep 26 '18 05:09 saurfang

@scottmmjackson could you merge this branch into master?

harryprince avatar Oct 08 '18 03:10 harryprince

You can install with devtools::install_github("harryprince/h3r", ref="bug-fix/Makefile") to get this PR version.

Also shameless plug, I built an H3 binding using V8 and h3.js, which imports all public JS APIs with examples. It can be installed much more easily if you are not running performance critical code since V8 has more overhead than Rcpp: https://github.com/saurfang/h3js

saurfang avatar Oct 08 '18 04:10 saurfang