Closed singhkpratham closed 4 years ago
I followed h3 installation steps from uber/h3 page. Finished succesfully, but now I am getting this
error:
/usr/bin/ld: /usr/local/lib/libh3.a(algos.c.o): relocation R_X86_64_PC32 against symbol `baseCellNeighbors' can not be used when making a shared object; recompile with -fPIC
@singhkpratham It is important that you build it as shared lib as declared in the error message. For example you can do this:
cmake -DENABLE_FORMAT=OFF -DBUILD_SHARED_LIBS=ON .
or build it with the -fPIC
flag
./install-h3c.sh
does compile and install h3 without errors?
R then searches for the lib in /usr/local/lib
Thanks a lot @crazycapivara . The cmake command worked, and then devtools::install_github("crazycapivara/h3-r")
also worked.
And no, I checked later to find that ./install-h3c.sh
also didn't complete without error.
@singhkpratham It is important that you build it as shared lib as declared in the error message. For example you can do this:
cmake -DENABLE_FORMAT=OFF -DBUILD_SHARED_LIBS=ON .
or build it with the
-fPIC
flag
Followed instructions to build h3, and it works till
./install-h3c.sh
But then
R -q -e 'devtools::install()'
gives following error. The same error is thrown if I directly trydevtools::install_github("crazycapivara/h3-r")
from within R.