-
Notifications
You must be signed in to change notification settings - Fork 293
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
installing sf from source with libraries in non-standard locations #335
Comments
maybe for starters, how do i figure out what the "given locations" are? |
How did you install GEOS, rpm or source build? If rpm, you are probably missing the geos-devel parts providing the headers, etc. |
I installed geos-3.6..1 from source. |
With which --prefix in ./configure? Does geos-config --includes say anything? |
I tried using both ./configure --prefix=/usr/bin/ and ./configure --prefix=/usr/local/ at different points. I'm having a hard time getting anything that helps me out of th geos-config file [root@mdrstudio01 geos-3.6.1]# cat /usr/bin/geos-config usage() |
As:
is very plain, find your lost header and library files with:
is saying that configure found geos-config, but that the headers are not where geos-config --includes says they should be. |
Hi, I seem to have the same problem here (R version 3.3.0): I pass the following config options:
but I get:
However:
gives me:
and:
So the include files are where they should be found however sf does not find them. What am I missing? Thanks, RD |
Please try again with this commit. |
Hello, thanks for the update. In fact the new version goes further than it did before but now is having problems with finding proj4 headers installed in non default locations. This is the error I get:
This is the command I have used to compile:
and the headers are where they should be:
Any suggestions? Thanks. |
A few more details I see from the config.log that:
however always from the config.log:
and:
the order in the latter seems to be wrong, however the problem is with the include files. |
Thanks -- please try again with this commit. |
Hello again, Unfortunately with the new commit the compilation terminates very soon. Here is the command I used:
and I get:
the config.log is as follows (look for error close to 3640 pattern):
What seems to be the problem? Thanks, RD |
So the problem still is with finding libraries in non default location, this test seems not to look in all the places where it should (in particular for proj4):
|
I tried in a container with custom gdal in /opt/gdal/ custom geos in /opt/geos and custom proj in /opt and was successful with the following install command: GDAL_DATA=/opt/gdal/share/gdal/ LD_LIBRARY_PATH=/opt/gdal/lib:/opt/geos/lib:/opt/lib R CMD INSTALL --configure-args="--with-gdal-config=/opt/gdal/bin/gdal-config --with-proj-include=/opt/include --with-proj-lib=/opt/lib --with-geos-config=/opt/geos/bin/geos-config " sf_0.5-0.tar.gz pls try it out. |
Please reopen this if there are still issues here. |
I came across this same issue, with homebrew macOS.
Resolved it by linking brew link proj |
I think I experience this issue with Centos 7.6.1810 and Anaconda3 installation. GDAL(2.4.1), GEOS (3.7.1) and PROJ.4 runtime: Rel. 6.0.0, March 1st, 2019 are installed with anaconda3. 1- I created a file names How can I overcome this issue? |
First of all, for support for anaconda-R is not given here. Second, the CRAN version of sf does not support PROJ >= 6.0.0, but the github version does (#988). |
Actually this was not directly related to anaconda but with libraries in non-standard locations. Sorry for inconvenience. |
Have you tried to install sf from github instead? |
Yes, I JUST tried but still getting same error. I issue all the required paths, I used following command:
|
Pls show the command you used + all the output it gave. How was |
I also set LD_LIBRARY_PATH env. var. for COMMAND:
OUTPUT:
|
Where did |
I downloaded master branch (master.zip file) from GitHub sf page, unzipped, and make tar.gz again to use for |
First time I hear someone trying that. R users would try |
Thanks for
|
This is what I get on a PROJ 6.0.0 system:
Your system seems to be missing |
I've set up environment variable as I don't see a line mentioning
But in the successful
Probably, I have a silly tiny detail in somewhere but I can't figure out. |
Look for
|
Yes, This is what I already did. I confirmed that |
There's not a mix of PROJ versions on your system, right? |
Edzer, First, run R with required environment variables,
Second, install
Again, excuse me for spending your time, I hope this post helps someone. |
attempting to install sf package and getting this error.
Please help!
mdrstudio01:2771> install.packages("sf")
Installing package into ‘/home/westinwg/R/x86_64-redhat-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/sf_0.4-2.tar.gz'
Content type 'unknown' length 3572824 bytes (3.4 MB)
downloaded 3.4 MB
** package ‘sf’ successfully unpacked and MD5 sums checked
configure: CC: gcc -m64 -std=gnu99
configure: CXX: g++ -m64
checking for gdal-config... /usr/local/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.1.3
checking GDAL version >= 2.0.0... yes
checking for gcc... gcc -m64 -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -m64 -std=gnu99 accepts -g... yes
checking for gcc -m64 -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -m64 -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking GDAL: linking with --libs only... yes
checking GDAL: /usr/local/bin/gdal-2.1.3/share/gdal/pcs.csv readable... yes
checking GDAL: checking whether PROJ.4 is available for linking:... yes
checking GDAL: checking whether PROJ.4 is available fur running:... yes
configure: pkg-config proj exists, will use it
checking proj_api.h usability... yes
checking proj_api.h presence... yes
checking for proj_api.h... yes
configure: PROJ: 4.8.0
checking for pj_init_plus in -lproj... yes
/home/westinwg/tmp/ccDjLsFh.o: In function
main': /home/westinwg/tmp/RtmpMhUink/R.INSTALL9ff852f1f18b/sf/proj_conf_test.c:20: undefined reference to
pj_ctx_fclose'collect2: error: ld returned 1 exit status
./configure: line 3789: ./proj_conf_test: No such file or directory
checking PROJ.4: epsg found and readable... yes
/home/westinwg/tmp/cclTfjmS.o: In function
main': /home/westinwg/tmp/RtmpMhUink/R.INSTALL9ff852f1f18b/sf/proj_conf_test.c:20: undefined reference to
pj_ctx_fclose'collect2: error: ld returned 1 exit status
./configure: line 3848: ./proj_conf_test: No such file or directory
checking PROJ.4: conus found and readable... yes
checking for geos-config... /usr/local/bin/geos-config
checking geos-config usability... yes
configure: GEOS: 3.6.1
checking GEOS version >= 3.3.0... yes
checking geos_c.h usability... no
checking geos_c.h presence... no
checking for geos_c.h... no
configure: error: geos_c.h not found in given locations.
ERROR: configuration failed for package ‘sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
The downloaded source packages are in
‘/home/westinwg/tmp/RtmpRHS50s/downloaded_packages’
mdrstudio01:2771>
The text was updated successfully, but these errors were encountered: