New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install Error: proj_conf_test.c:4:28: error: expected ')' before 'const' FILE *pj_open_lib(projCtx, const char *, const char *); #678
Comments
You need to install development versions of the GEOS library. I also think that sf will want you to use proj 4.8.0 or later. Look at the README for instructions for various platforms; you didn't reveal yours. |
Note that your declared 4.7.1 is not in https://download.osgeo.org/proj/, and although it is nine years ago, I remember a numbering snafu. The sf error looks odd, because configure.in doesn't use Ctx for versions <= 4.8.0. Do you have two versions of proj sorting in different order at build time and run time? |
Hi folks, sorry for the long delay. I feel a bit silly for not loading the geos 3.6 module. When I prepared this issue report I forgot to load it which does change the error so thanks for pointing that out! Nevertheless, problem with Ctx that we're seeing is:
Regarding Roger's suggestion that there may be two versions of proj we only have the one version, 4.7.1. Lastly, the reason we're using an older version of proj4 is due to an rgdal 1.2-13 dependency that makes a reference to #include <projects.h> although project.h was removed in proj 4.8.0 as explained here. |
System requirement of sf is: Proj.4 >= 4.8.0 and GDAL >= 2.0.0 (although, erroneously, 0.6-1 CRAN release requires 2.1,but this has been corrected in the dev version. |
See also #689. |
I thank you for kindly looking into this issue and your suggestions however I wish you had not marked this issue as closed. I've done as you've said and successfully built sf with Proj.4 = 4.8.0 but, as I said before, this causes rgdal to fail to install. I should point out that rgdal requires proj >= 4.4.9, not >=4.8.0 so right away one can see how incompatibilities can creep in (due to different version dependencies) for those folks like us who need to run sf and rgdal in the same environment. As discussed here, projects.h is no longer included with Proj.4 and so how does one run sf which requires proj.4 >= 4.8.0 with rgdal which makes a call to projects.h which is no longer found in proj.4 >= 4.8.0? Note that rgdal installs just fine with proj.4/4.7 because projects.h is included therein.
|
This continues to be your problem. My guess is that PROJ.4 was installed from a package, not source. You have certainly omitted the NAD grids, and probably other subsidiary packages. You have not stated your platform (output of sessionInfo()). I guess a very old Centos or RHEL, but it could be an equally neglected Ubuntu or Debian. You should always keep GEOS, GDAL and PROJ as up to date as possible, as newer versions include not only bug fixes, but also security fixes where appropriate. The only valid reason for using older versions where possible is for reproducing old results, you should ensure that your OS and underlying software are appropriate. For rgdal, you can still use older external dependencies because it has been around for a long time. <projects.h> is needed to check for the absence of inverse projections, but was introduced relatively recently. |
Thank you for your patience and quick reply. All software for users that is installed on our CentOS 6.7 cluster is installed from source. I think we may be talking across one another so allow me to simplify and hopefully refocus. Our users require
I can install 1 and 2 or install 3 but that requires me to switch versions on Proj.4, otherwise one gets the sorts of errors that I've been enumerating. I'm simply trying to find the means to run all three packages simultaneously that doesn't require us to load environment modules for Proj.4 4.7.1 (as required by rgdal) and Proj.4 4.8.0 (as required by sf and lwgeom). If, for example, you say there is no other way around it and we have to maintain both versions of Proj.4 to support sf and rgdal then so be it. However, what I'm asking you is there a more nuanced way to install and run these packages that doesn't require multiple versions of Proj.4 which can lead to conflicts such as including both dynamic library versions in LD_LIBRARY_PATH, for example or the install errors I've been hitting? The software stack we are running, including version numbers, is: Thanks again for your attention to this issue. For reference, the output of sessionInfo() is given below.
|
Can't install sf -- the error looks like:
DEPS SATISFIED ARE:
SETUP:
INSTALL & ERROR:
Any idea how to resolve this issue?
The text was updated successfully, but these errors were encountered: