[R-sig-Geo] Strange Rgdal compile error (possibly three)

Roger Bivand Roger.Bivand at nhh.no
Wed Nov 5 18:31:20 CET 2014


On Wed, 5 Nov 2014, Dr Didier G. Leibovici wrote:

> Hi,
> I have the same problem with MacOS x maverick.
>
> I had installed the GDAL_Complete-1.11.dmg but it looks it can't find it
> when running this R CMD?
> Nonehteless $ echo $PATH
> /Library/Frameworks/Python.framework/Versions/3.3/bin:/Library/Frameworks/GDAL.framework/Programs:/usr/texbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
>
> console$ R CMD install rgdal_0.9-1.tar.gz

Please read the documentation, such as the README file carefully. The 
configure script does not try to guess where the dynamically loaded 
libraies are, so you'll need to work out how to pass the location -L to 
configure through a configure argument, and ensure that the library is 
also seen when rgdal loads. Using Kyngchaos is also a viable route.

Do you need the extra drivers - if not, Brian Ripley solved the Mavericks 
problem last spring, and the rgdal OSX Mavericks binary is on CRANxtras:

https://stat.ethz.ch/pipermail/r-sig-mac/2014-May/010871.html

Hope this helps,

Roger

>
> * installing to library '/Users/lgzdl/Library/R/3.1/library'
> * installing *source* package 'rgdal' ...
> ** package 'rgdal' successfully unpacked and MD5 sums checked
> configure: CC: clang
> configure: CXX: clang++
> configure: rgdal: 0.9-1
> checking for /usr/bin/svnversion... yes
> configure: svn revision: 518
> configure: gdal-config: gdal-config
> checking gdal-config usability... yes
> configure: GDAL: 1.11.1
> checking GDAL version >= 1.6.3... yes
> checking GDAL version < 2... yes
> checking for gcc... clang
> 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 clang accepts -g... yes
> checking for clang option to accept ISO C89... none needed
> checking how to run the C preprocessor... clang -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
> *ld: framework not found GDAL*
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> ld: framework not found GDAL
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> configure: Install failure: compilation and/or linkage problems.
> configure: error: GDALAllRegister not found in libgdal.
> ERROR: configuration failed for package 'rgdal'
>
> On 30/10/2014 18:14, Paul hewson wrote:
>> I'm trying to install rgdal on Kubuntu 14.04 and R 3.1.1; I have spent a lot
>> of time following up various online suggestions for the problems I think I'm
>> seeing but am currently rather baffled.   I'd be very grateful for a hint.
>> I am using R CMD INSTALL ......
>>
>> libgdal1-dev is installed, mariadb is installed, and armadillo/poppler etc
>> are installed (although ld can't find them).
>>
>> To date, I have followed
>> - Old postings about GDALAllRegister not found
>> http://stackoverflow.com/questions/15569720/install-rgdal-library-in-rstudio-gdalallregister-not-found-in-libgdal
>> - not relevant here (I have compiliers)
>> - GDAL stuff on the amadillo / poppler missing (they are not - there might
>> be some ubuntu packaging issue here if I'm reading launchpad right)
>> https://bugs.launchpad.net/ubuntu/+source/gdal/+bug/1194082
>> - There is some stuff on MySQL / mariadb compatibility.
>> https://github.com/Homebrew/homebrew/issues/32973
>>
>> If anyone has any hints about what I should do next I'd be really grateful.
>> For example, I don't know whether to knock out mariadb to see whether/how
>> that helps, but there seem to be orthogonal warnings.
>>
>>
>> checking gdal: linking with --libs only... no
>> checking gdal: linking with --libs and --dep-libs... no
>>
>> /usr/lib/libgdal.so: undefined reference to `mysql_error at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_options at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_fetch_lengths at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_real_connect at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to `mysql_query at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_free_result at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to `my_init at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_field_seek at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_num_rows at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_num_fields at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to `mysql_close at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_field_count at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `free_defaults at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to `mysql_init at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_fetch_row at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_fetch_field at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to `mysql_errno at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_insert_id at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_use_result at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_store_result at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `load_defaults at libmysqlclient_18'
>> /usr/lib/libgdal.so: undefined reference to
>> `mysql_affected_rows at libmysqlclient_18'
>> collect2: error: ld returned 1 exit status
>>
>> /usr/bin/ld: cannot find -larmadillo
>> /usr/bin/ld: cannot find -lproj
>> /usr/bin/ld: cannot find -lpoppler
>> /usr/bin/ld: cannot find -lfreexl
>> /usr/bin/ld: cannot find -lepsilon
>> /usr/bin/ld: cannot find -lkmldom
>> /usr/bin/ld: cannot find -lkmlbase
>> /usr/bin/ld: cannot find -lkmlengine
>> /usr/bin/ld: cannot find -lkmlconvenience
>> /usr/bin/ld: cannot find -lminizip
>> /usr/bin/ld: cannot find -luriparser
>> collect2: error: ld returned 1 exit status
>>
>> configure: Install failure: compilation and/or linkage problems.
>>
>> configure: error: GDALAllRegister not found in libgdal.
>>
>>
>>
>>
>> --
>> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Strange-Rgdal-compile-error-possibly-three-tp7587374.html
>> Sent from the R-sig-geo mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> 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, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list