harphub / meteogrid

R package for working with gridded meteorological data
https://harphub.github.io/meteogrid/
Other
0 stars 6 forks source link

proj_api.h not made in newer proj versions #5

Closed khintz closed 3 years ago

khintz commented 3 years ago

When installing meteogrid it failed due to a missing include file "proj_api.h". I was installing meteogrid like so:

remotes::install_github(
  "harphub/harp",
  configure.args = c(
    meteogrid = "--with-proj=/path/to/proj"
  )
)

Checking /path/to/proj proj_api.h was not there. It seems to be related to newer proj version not making this include file (but one called proj.h). After downgrading my proj installation from v. 8.0.1 to v. 6.3.2 (https://proj.org/download.html), proj_api.h is made and meteogrid installs succesfully.

adeckmyn commented 3 years ago

Yes, proj 8 has dropped the old proj_api.h. My latest development version of meteogrid solves this (it checks and has compile options for both versions), but is not yet on github. I have been too occupied on other topics to test it enough. But I will update the code on harphub soon. This new version also replaces all C code to use Rcpp. It is already in the "rcpp" branch of my personal repository adeckmyn/meteogrid. To be honest, I had missed that proj 8 was already released. That is the first version that drops the old API.

adeckmyn commented 3 years ago

I just merged the Rcpp branch which also fixes for the new proj.h interface.