[R-sig-Geo] install rgdal from source macOS
Dominik Schneider
do@c3612 @end|ng |rom co|or@do@edu
Fri Jun 21 05:00:36 CEST 2019
I finally got back to this. Unfortunately this did not work.
It still doesn't like PKG_CONFIG_PATH and now pcs.csv was not readable. It
did not exist in 'share/gdal' but I found it in miniconda3/pkgs/libgdal* so
I copied it to share/gdal.
> Sys.getenv('PKG_CONFIG_PATH')
[1] "/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib/pkgconfig"
> grep('proj.pc',dir(Sys.getenv('PKG_CONFIG_PATH')))
I'm not sure why it can't find the pkg config
> install.packages('rgdal', repo = 'https://r-forge.r-project.org', type =
"source",
configure.args=c('--with-proj-include=/Users/dosc3612/Applications/miniconda3/envs/rgdal/include',
'--with-proj-lib=/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib',
'--with-gdal-config=/Users/dosc3612/Applications/miniconda3/envs/rgdal/bin/gdal-config','--with-proj-share=/Users/dosc3612/Applications/miniconda3/envs/rgdal/share/proj',
'--with-data-copy=yes'))
trying URL 'https://r-forge.r-project.org/src/contrib/rgdal_1.4-5.tar.gz'
Content type 'application/x-gzip' length 1687877 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
* installing *source* package ‘rgdal’ ...
** using staged installation
configure: R_HOME: /Library/Frameworks/R.framework/Resources
configure: CC: clang
configure: CXX: clang++ -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.4-4
checking for /usr/bin/svnversion... yes
cat: inst/SVN_VERSION: No such file or directory
configure: svn revision:
configure: gdal-config set to
/Users/dosc3612/Applications/miniconda3/envs/rgdal/bin/gdal-config
checking gdal-config exists... yes
checking gdal-config executable... yes
checking gdal-config usability... yes
configure: GDAL: 3.0.0
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking gdal: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL:
/Users/dosc3612/Applications/miniconda3/envs/rgdal/share/gdal/pcs.csv
readable... yes
./configure: line 2101: pkg-config: command not found
configure: pkg-config proj not available
set PKG_CONFIG_PATH to the directory containing proj.pc
configure: PROJ version not determined using pkg-config proj
configure: proj CPP flags:
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
checking PROJ header API:... proj_api.h
checking proj_api.h presence and usability... yes
checking PROJ version >= 4.8.0... yes
configure: PROJ_LIB:
/Users/dosc3612/Applications/miniconda3/envs/rgdal/share/proj
dyld: Library not loaded: @rpath/libproj.15.dylib
Referenced from:
/private/var/folders/bb/13z2kq0j01jg5q_0ypjc76gr0000gn/T/RtmpVtyBCi/R.INSTALL76ca8b2ce2d/rgdal/./proj_conf_test2
Reason: image not found
./configure: line 2451: 30994 Abort trap: 6
PROJ_LIB="${proj_share_path}" ./proj_conf_test2
checking PROJ: proj.db found and readable... yes
configure: Copy data for:
configure: PROJ.4:
/Users/dosc3612/Applications/miniconda3/envs/rgdal/share/proj
configure: GDAL:
/Users/dosc3612/Applications/miniconda3/envs/rgdal/share/gdal
configure: Package CPP flags:
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
configure: Package LIBS:
-L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lgdal
-L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lproj
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c OGR_write.cpp -o OGR_write.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c gdal-bindings.cpp -o
gdal-bindings.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c init.c -o init.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c inverser.c -o inverser.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c local_stubs.c -o local_stubs.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c ogr_geom.cpp -o ogr_geom.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c ogr_polygons.c -o
ogr_polygons.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c ogr_proj.cpp -o ogr_proj.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c ogrdrivers.cpp -o ogrdrivers.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c ogrsource.cpp -o ogrsource.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c proj_info6.cpp -o proj_info6.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c projectit.cpp -o projectit.o
clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names
-undefined dynamic_lookup -single_module -multiply_defined suppress
-L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o
rgdal.so OGR_write.o gdal-bindings.o init.o inverser.o local_stubs.o
ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o proj_info6.o
projectit.o -L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lgdal
-L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lproj
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
installing to
/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rgdal’ in dyn.load(file,
DLLpath = DLLpath, ...):
unable to load shared object
'/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so,
6): Library not loaded: @rpath/libgdal.26.dylib
Referenced from:
/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing
‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rgdal’
The downloaded source packages are in
‘/private/var/folders/bb/13z2kq0j01jg5q_0ypjc76gr0000gn/T/Rtmpqaf8Yh/downloaded_packages’
Warning message:
In install.packages("rgdal", repo = "https://r-forge.r-project.org", :
installation of package ‘rgdal’ had non-zero exit status
>
I also tried passing
'--with-proj-share=/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib'
because that is where I found libproj.15.dylib but the installer still says
it can't find it.
*any suggestions?*
> install.packages('rgdal', repo = 'https://r-forge.r-project.org', type =
"source",
configure.args=c('--with-proj-include=/Users/dosc3612/Applications/miniconda3/envs/rgdal/include',
'--with-proj-lib=/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib',
'--with-gdal-config=/Users/dosc3612/Applications/miniconda3/envs/rgdal/bin/gdal-config','--with-proj-share=/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib',
'--with-data-copy=yes'))
trying URL 'https://r-forge.r-project.org/src/contrib/rgdal_1.4-5.tar.gz'
Content type 'application/x-gzip' length 1687877 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
* installing *source* package ‘rgdal’ ...
** using staged installation
configure: R_HOME: /Library/Frameworks/R.framework/Resources
configure: CC: clang
configure: CXX: clang++ -std=gnu++11
configure: C++11 support available
configure: rgdal: 1.4-4
checking for /usr/bin/svnversion... yes
cat: inst/SVN_VERSION: No such file or directory
configure: svn revision:
configure: gdal-config set to
/Users/dosc3612/Applications/miniconda3/envs/rgdal/bin/gdal-config
checking gdal-config exists... yes
checking gdal-config executable... yes
checking gdal-config usability... yes
configure: GDAL: 3.0.0
checking GDAL version >= 1.11.4... yes
checking GDAL version <= 2.5 or >= 3.0... yes
checking gdal: linking with --libs only... yes
checking GDAL: gdal-config data directory readable... yes
checking GDAL:
/Users/dosc3612/Applications/miniconda3/envs/rgdal/share/gdal/pcs.csv
readable... yes
./configure: line 2101: pkg-config: command not found
configure: pkg-config proj not available
set PKG_CONFIG_PATH to the directory containing proj.pc
configure: PROJ version not determined using pkg-config proj
configure: proj CPP flags:
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
checking PROJ header API:... proj_api.h
checking proj_api.h presence and usability... yes
checking PROJ version >= 4.8.0... yes
configure: PROJ_LIB: /Users/dosc3612/Applications/miniconda3/envs/rgdal/lib
dyld: Library not loaded: @rpath/libproj.15.dylib
Referenced from:
/private/var/folders/bb/13z2kq0j01jg5q_0ypjc76gr0000gn/T/Rtmpcbzrca/R.INSTALL7a1919c4df31/rgdal/./proj_conf_test2
Reason: image not found
./configure: line 2451: 31841 Abort trap: 6
PROJ_LIB="${proj_share_path}" ./proj_conf_test2
checking PROJ: proj.db found and readable... yes
configure: Copy data for:
configure: PROJ.4:
/Users/dosc3612/Applications/miniconda3/envs/rgdal/share/proj
configure: GDAL:
/Users/dosc3612/Applications/miniconda3/envs/rgdal/share/gdal
configure: Package CPP flags:
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
configure: Package LIBS:
-L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lgdal
-L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lproj
configure: creating ./config.status
config.status: creating src/Makevars
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c OGR_write.cpp -o OGR_write.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c gdal-bindings.cpp -o
gdal-bindings.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c init.c -o init.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c inverser.c -o inverser.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c local_stubs.c -o local_stubs.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c ogr_geom.cpp -o ogr_geom.o
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c ogr_polygons.c -o
ogr_polygons.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c ogr_proj.cpp -o ogr_proj.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c ogrdrivers.cpp -o ogrdrivers.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c ogrsource.cpp -o ogrsource.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c proj_info6.cpp -o proj_info6.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
-I/usr/local/include -fPIC -Wall -g -O2 -c projectit.cpp -o projectit.o
clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names
-undefined dynamic_lookup -single_module -multiply_defined suppress
-L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o
rgdal.so OGR_write.o gdal-bindings.o init.o inverser.o local_stubs.o
ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o proj_info6.o
projectit.o -L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lgdal
-L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lproj
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
installing to
/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rgdal’ in dyn.load(file,
DLLpath = DLLpath, ...):
unable to load shared object
'/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so,
6): Library not loaded: @rpath/libgdal.26.dylib
Referenced from:
/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing
‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rgdal’
The downloaded source packages are in
‘/private/var/folders/bb/13z2kq0j01jg5q_0ypjc76gr0000gn/T/Rtmpqaf8Yh/downloaded_packages’
Warning message:
In install.packages("rgdal", repo = "https://r-forge.r-project.org", :
installation of package ‘rgdal’ had non-zero exit status
>
On Tue, Jun 11, 2019 at 10:32 AM Edzer Pebesma <
edzer.pebesma using uni-muenster.de> wrote:
> for compiling rgdal from source on OSX against gdal 3 and proj 6.1.0,
> please use the dev version on r-forge. See also
> https://github.com/r-spatial/sf/issues/1070
>
>
> On 6/9/19 9:52 PM, Dominik Schneider wrote:
> > I'm trying to install rgdal from source on a fresh r 3.6 installation.
> > i setup a conda environment to install gdal, proj, geos
> >
> > install.packages('rgdal', type = "source",
> >
> configure.args=c('--with-proj-include=/Users/dosc3612/Applications/miniconda3/envs/rgdal/include',
> > '--with-proj-lib=/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib',
> >
> '--with-gdal-config=/Users/dosc3612/Applications/miniconda3/envs/rgdal/bin/gdal-config'))
> >
> > The full output is below but the first error I see is:
> > ./configure: line 2101: pkg-config: command not found
> > configure: pkg-config proj not available
> > set PKG_CONFIG_PATH to the directory containing proj.pc
> > configure: PROJ version not determined using pkg-config proj
> >
> > which I don't understand because:
> > Sys.getenv('PKG_CONFIG_PATH')
> > [1] "/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib/pkgconfig"
> >
> > and just to confirm:
> > (rgdal) Phoenix:~ $ ls `echo $PKG_CONFIG_PATH` | grep proj
> > proj.pc
> >
> > *Is there another way to set PKG_CONFIG_PATH within install.packages?*
> >
> > There are also some undefined symbols:
> > Undefined symbols for architecture x86_64:
> > "_pj_ctx_fclose", referenced from:
> > _main in proj_conf_test2-9a39dc.o
> > "_pj_get_default_ctx", referenced from:
> > _main in proj_conf_test2-9a39dc.o
> > "_pj_open_lib", referenced from:
> > _main in proj_conf_test2-9a39dc.o
> > ld: symbol(s) not found for architecture x86_64
> > clang: error: linker command failed with exit code 1 (use -v to see
> > invocation)
> > ./configure: line 2422: ./proj_conf_test2: No such file or directory
> >
> > I tried with gdal 2.4.1 and gdal 3.0.0 (after seeing
> >
> http://r-sig-geo.2731867.n2.nabble.com/GDAL-3-0-0-and-rgdal-tt7592822.html#a7592834
> > )
> > proj is 6.1
> > geos is 3.7.1
> >
> > What did I miss? Please advise. Thanks.
> >
> > FULL OUTPUT:
> >> install.packages('rgdal', type = "source",
> >
> configure.args=c('--with-proj-include=/Users/dosc3612/Applications/miniconda3/envs/rgdal/include',
> > '--with-proj-lib=/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib',
> >
> '--with-gdal-config=/Users/dosc3612/Applications/miniconda3/envs/rgdal/bin/gdal-config'))
> > --- Please select a CRAN mirror for use in this session ---
> > trying URL 'https://cloud.r-project.org/src/contrib/rgdal_1.4-4.tar.gz'
> > Content type 'application/x-gzip' length 1687518 bytes (1.6 MB)
> > ==================================================
> > downloaded 1.6 MB
> >
> > * installing *source* package ‘rgdal’ ...
> > ** package ‘rgdal’ successfully unpacked and MD5 sums checked
> > ** using staged installation
> > configure: R_HOME: /Library/Frameworks/R.framework/Resources
> > configure: CC: clang
> > configure: CXX: clang++ -std=gnu++11
> > configure: C++11 support available
> > configure: rgdal: 1.4-4
> > checking for /usr/bin/svnversion... yes
> > configure: svn revision: 833
> > configure: gdal-config set to
> > /Users/dosc3612/Applications/miniconda3/envs/rgdal/bin/gdal-config
> > checking gdal-config exists... yes
> > checking gdal-config executable... yes
> > checking gdal-config usability... yes
> > configure: GDAL: 2.4.1
> > checking C++11 support for GDAL >= 2.3.0... yes
> > checking GDAL version >= 1.11.4... yes
> > checking GDAL version <= 2.5 or >= 3.0... yes
> > checking gdal: linking with --libs only... yes
> > checking GDAL: gdal-config data directory readable... yes
> > checking GDAL:
> > /Users/dosc3612/Applications/miniconda3/envs/rgdal/share/gdal/pcs.csv
> > readable... yes
> > ./configure: line 2101: pkg-config: command not found
> > configure: pkg-config proj not available
> > set PKG_CONFIG_PATH to the directory containing proj.pc
> > configure: PROJ version not determined using pkg-config proj
> > configure: proj CPP flags:
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > checking PROJ header API:... proj_api.h
> > checking proj_api.h presence and usability... yes
> > checking PROJ version >= 4.8.0... yes
> > Undefined symbols for architecture x86_64:
> > "_pj_ctx_fclose", referenced from:
> > _main in proj_conf_test2-9a39dc.o
> > "_pj_get_default_ctx", referenced from:
> > _main in proj_conf_test2-9a39dc.o
> > "_pj_open_lib", referenced from:
> > _main in proj_conf_test2-9a39dc.o
> > ld: symbol(s) not found for architecture x86_64
> > clang: error: linker command failed with exit code 1 (use -v to see
> > invocation)
> > ./configure: line 2422: ./proj_conf_test2: No such file or directory
> > checking PROJ.4: proj.db found and readable... yes
> > Undefined symbols for architecture x86_64:
> > "_pj_ctx_fclose", referenced from:
> > _main in proj_conf_test3-9f8df7.o
> > "_pj_get_default_ctx", referenced from:
> > _main in proj_conf_test3-9f8df7.o
> > "_pj_open_lib", referenced from:
> > _main in proj_conf_test3-9f8df7.o
> > ld: symbol(s) not found for architecture x86_64
> > clang: error: linker command failed with exit code 1 (use -v to see
> > invocation)
> > ./configure: line 2482: ./proj_conf_test3: No such file or directory
> > checking PROJ.4: conus found and readable... yes
> > configure: Package CPP flags:
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> > configure: Package LIBS:
> > -L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lgdal
> > -L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lproj
> > configure: creating ./config.status
> > config.status: creating src/Makevars
> > ** libs
> > clang++ -std=gnu++11
> -I"/Library/Frameworks/R.framework/Resources/include"
> > -DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c OGR_write.cpp -o
> OGR_write.o
> > clang++ -std=gnu++11
> -I"/Library/Frameworks/R.framework/Resources/include"
> > -DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c gdal-bindings.cpp -o
> > gdal-bindings.o
> > clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c init.c -o init.o
> > clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c inverser.c -o inverser.o
> > clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c local_stubs.c -o
> local_stubs.o
> > clang++ -std=gnu++11
> -I"/Library/Frameworks/R.framework/Resources/include"
> > -DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c ogr_geom.cpp -o ogr_geom.o
> > clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c ogr_polygons.c -o
> > ogr_polygons.o
> > clang++ -std=gnu++11
> -I"/Library/Frameworks/R.framework/Resources/include"
> > -DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c ogr_proj.cpp -o ogr_proj.o
> > clang++ -std=gnu++11
> -I"/Library/Frameworks/R.framework/Resources/include"
> > -DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c ogrdrivers.cpp -o
> ogrdrivers.o
> > clang++ -std=gnu++11
> -I"/Library/Frameworks/R.framework/Resources/include"
> > -DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c ogrsource.cpp -o
> ogrsource.o
> > clang++ -std=gnu++11
> -I"/Library/Frameworks/R.framework/Resources/include"
> > -DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c proj_info6.cpp -o
> proj_info6.o
> > clang++ -std=gnu++11
> -I"/Library/Frameworks/R.framework/Resources/include"
> > -DNDEBUG -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -I/Users/dosc3612/Applications/miniconda3/envs/rgdal/include
> > -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
> >
> -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/sp/include"
> > -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> > -I/usr/local/include -fPIC -Wall -g -O2 -c projectit.cpp -o
> projectit.o
> > clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names
> > -undefined dynamic_lookup -single_module -multiply_defined suppress
> > -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o
> > rgdal.so OGR_write.o gdal-bindings.o init.o inverser.o local_stubs.o
> > ogr_geom.o ogr_polygons.o ogr_proj.o ogrdrivers.o ogrsource.o
> proj_info6.o
> > projectit.o -L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib
> -lgdal
> > -L/Users/dosc3612/Applications/miniconda3/envs/rgdal/lib -lproj
> > -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
> > -Wl,CoreFoundation
> > installing to
> >
> /Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs
> > ** R
> > ** data
> > ** inst
> > ** byte-compile and prepare package for lazy loading
> > ** help
> > *** installing help indices
> > ** building package indices
> > ** installing vignettes
> > ** testing if installed package can be loaded from temporary location
> > Error: package or namespace load failed for ‘rgdal’ in dyn.load(file,
> > DLLpath = DLLpath, ...):
> > unable to load shared object
> >
> '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so':
> >
> >
> dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so,
> > 6): Library not loaded: @rpath/libgdal.20.dylib
> > Referenced from:
> >
> /Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-rgdal/00new/rgdal/libs/rgdal.so
> > Reason: image not found
> > Error: loading failed
> > Execution halted
> > ERROR: loading failed
> > * removing
> > ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rgdal’
> >
> > The downloaded source packages are in
> >
> ‘/private/var/folders/bb/13z2kq0j01jg5q_0ypjc76gr0000gn/T/RtmplsyMiu/downloaded_packages’
> > Warning message:
> > In install.packages("rgdal", type = "source", configure.args =
> >
> c("--with-proj-include=/Users/dosc3612/Applications/miniconda3/envs/rgdal/include",
> > :
> > installation of package ‘rgdal’ had non-zero exit status
> >
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo using r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
> --
> Edzer Pebesma
> Institute for Geoinformatics
> Heisenbergstrasse 2, 48151 Muenster, Germany
> Phone: +49 251 8333081
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list