[R-sig-Geo] Rgdal on osx 10.8 (homebrew)
rpi
distem at rpi.edu
Tue Nov 27 01:19:11 CET 2012
Thanks Roger!
the compiler was the problem :)
using the terminal instead of R.app (GUI)
i was able to install rgdal correctly exptoring CC & CXX using gcc & g++
(the default on OSX 10.8.x , Xcode 4.5.x are : clang & clang++)
so what i had to do :
wget http://cran.cs.wwu.edu/src/contrib/rgdal_0.7-22.tar.gz
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
R CMD INSTALL rgdal_0.7-22.tar.gz
--Massimo.
Il giorno 26/nov/2012, alle ore 02:40, Roger Bivand <Roger.Bivand at nhh.no> ha scritto:
> I suggest posting on R-SIG-Mac for possibly more rapid and accurate feedback. The rgdal developers have no access to OSX at all, let alone 10.8. It appears in addition that your compile train may be running the configure tests with clang rather than gcc, and that the GDAL shared objects are not being found where gdal-config says they are located. Please report back on this thread when you solve the problem.
>
> Roger
>
> On Mon, 26 Nov 2012, rpi wrote:
>
>> Hi All,
>> i'm having trouble trying to build Rgdal from source on mac osx 10.8.x
>> i have R and gfortran installed using Homebrew.
>> when i try to build rgdal i got this log :
>> epi:~ epi$ R CMD INSTALL rgdal_0.7-22.tar.gz
>> * installing to library
>> ???/usr/local/Cellar/r/2.15.2/R.framework/Versions/2.15/Resources/library???
>> * installing *source* package ???rgdal??? ...
>> ** package ???rgdal??? successfully unpacked and MD5 sums checked
>> configure: gdal-config: gdal-config
>> checking gdal-config usability... yes
>> configure: GDAL: 1.9.2
>> checking GDAL version > 1.5.4... yes
>> checking for gcc... 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 cc accepts -g... yes
>> checking for cc option to accept ISO C89... none needed
>> checking how to run the C preprocessor... 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... rm: conftest.dSYM: is a directory
>> rm: conftest.dSYM: is a directory
>> 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... no
>> checking gdal: linking with --libs and --dep-libs... no
>> clang: warning: treating 'c' input as 'c++' when in C++ mode, this
>> behavior is deprecated
>> gdal_test.c:5:1: error: C++ requires a type specifier for all declarations
>> main() {
>> ^~~~
>> 1 error generated.
>> clang: warning: treating 'c' input as 'c++' when in C++ mode, this
>> behavior is deprecated
>> gdal_test.c:5:1: error: C++ requires a type specifier for all declarations
>> main() {
>> ^~~~
>> 1 error generated.
>> configure: Install failure: compilation and/or linkage problems.
>> configure: error: GDALAllRegister not found in libgdal.
>> ERROR: configuration failed for package ???rgdal???
>> * removing
>> ???/usr/local/Cellar/r/2.15.2/R.framework/Versions/2.15/Resources/library/rgd
>> al???
>> epi:~ epi$
>> have you any clue about it ?
>> I tried to untar the rgdal.tar.gz
>> and rerun the R CMD install command ,
>> i attached a link to the logs :
>> http://epi.whoi.edu/esr/errors.txt
>> http://epi.whoi.edu/esr/configure.ac
>> http://epi.whoi.edu/config.log
>> > sessionInfo()
>> R version 2.15.2 (2012-10-26)
>> Platform: x86_64-apple-darwin12.2.0 (64-bit)
>> locale:
>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>> attached base packages:
>> [1] stats graphics grDevices utils datasets methods base
>> >
>> ###
>> epi:~ epi$ gfortran -v
>> Using built-in specs.
>> COLLECT_GCC=gfortran
>> COLLECT_LTO_WRAPPER=/usr/local/Cellar/gfortran/4.7.2/gfortran/libexec/gcc/x
>> 86_64-apple-darwin12.2.0/4.7.2/lto-wrapper
>> Target: x86_64-apple-darwin12.2.0
>> Configured with: ../configure --enable-languages=fortran
>> --prefix=/usr/local/Cellar/gfortran/4.7.2/gfortran
>> --datarootdir=/usr/local/Cellar/gfortran/4.7.2/share
>> --bindir=/usr/local/Cellar/gfortran/4.7.2/bin --with-system-zlib
>> --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr
>> --with-mpc=/usr/local/opt/libmpc --enable-checking=release
>> --disable-stage1-checking --disable-build-poststage1-with-cxx
>> --disable-libstdcxx-pc --disable-nls
>> Thread model: posix
>> gcc version 4.7.2 (GCC)
>> epi:~ epi$
>> Thanks!!!
>> Massimo.
>> [[alternative HTML version deleted]]
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
> --
> Roger Bivand
> Department of Economics, NHH Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list