Skip to content
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

Can not install sf in Fastr #36

Open
ismailsunni opened this issue Nov 20, 2019 · 4 comments
Open

Can not install sf in Fastr #36

ismailsunni opened this issue Nov 20, 2019 · 4 comments

Comments

@ismailsunni
Copy link
Owner

* installing *source* package ?sf? ...
** package ?sf? successfully unpacked and MD5 sums checked
configure: CC: gcc
configure: CXX: g++
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.4.3
checking GDAL version >= 2.0.0... yes
checking for gcc... gcc
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 accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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/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... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: proj_api.h not found in standard or given locations.
ERROR: configuration failed for package ?sf?
* removing ?/fastr/library/sf?


The downloaded source packages are in
	?/tmp/Rtmp1Dcnc6/downloaded_packages?
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("sf") :
  installation of package ?sf? had non-zero exit status

It seems it couldn't find proj_api.h

@ismailsunni
Copy link
Owner Author

Checked the file, it's in the expected location:

root@62b92254f4e4:/fastr# ls /usr/include/ | grep proj
org_proj4_PJ.h
proj
proj.h
proj_api.h
proj_constants.h
proj_experimental.h
proj_json_streaming_writer.hpp
proj_symbol_rename.h
root@62b92254f4e4:/fastr#

In my computer:

ismailsunni@konrosoup:~/dev/docker/dockeRs/fastr-3.4.0-debian-geospatial$ ls /usr/include/ | grep proj
org_proj4_PJ.h
proj_api.h
projects.h
proj.h

@ismailsunni
Copy link
Owner Author

I tried to explicitly say the path, by doing like this:

install.packages("sf", configure.args=c('--with-proj-include=/usr/include')

Since I checked, my proj_api.h is inside this /usr/include

root@62b92254f4e4:/fastr# ls /usr/include | grep proj    
org_proj4_PJ.h
proj
proj.h
proj_api.h
proj_constants.h
proj_experimental.h
proj_json_streaming_writer.hpp
proj_symbol_rename.h

But it still gives me the same problem.

@ismailsunni
Copy link
Owner Author

Perhaps changing to use Ubuntu-based image can solve the problem see #28

@ismailsunni
Copy link
Owner Author

To replicate the problem for FastR in Debian

# Open FastR on the docker container
docker run  -it --rm ismailsunni/fastr-3.6.1-debian-geospatial R

or

# Run shell in the docker container
docker run -it --rm ismailsunni/fastr-3.6.1-debian-geospatial /bin/bash
# Open FastR session
R

The second way is better to explore the docker container.

Then install sf

install.packages('sf')

It will git the error like this:

> install.packages('sf')
Content type 'application/octet-stream' length 8330773 bytes (7.9 MB)
Warning: untar(compressed=) is deprecated
* installing *source* package ?sf? ...
** package ?sf? successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: /fastr/bin/llvm-cc
configure: CXX: g++ -std=gnu++11
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.4.3
checking GDAL version >= 2.0.0... yes
checking for gcc... /fastr/bin/llvm-cc
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 /fastr/bin/llvm-cc accepts -g... yes
checking for /fastr/bin/llvm-cc option to accept ISO C89... none needed
checking how to run the C preprocessor... /fastr/bin/llvm-cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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/share/gdal/pcs.csv readable... yes
checking GDAL: checking whether PROJ is available for linking:... yes
checking GDAL: checking whether PROJ is available fur running:... yes
configure: pkg-config proj exists, will use it
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: proj_api.h not found in standard or given locations.
ERROR: configuration failed for package ?sf?
* removing ?/fastr/library/sf?


The downloaded source packages are in
	?/tmp/Rtmp1Y0LT2/downloaded_packages?
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("sf") :
  installation of package ?sf? had non-zero exit status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant