[R-pkg-devel] Library not loaded ‘libgdal.dylib’ when building package on travis (osx)
jon at thon.cc
Sat Apr 29 15:22:30 CEST 2017
On 29/4/17 21:29, Patrick Schratz wrote:
> Nope, still an open issue. I also do not have any ideas left what I could try next.
> Tried the export hints (e.g. bash profile) given in 'brew info gdal2' and checked with my local configuration but I do not see what the possible issue could be here.
> On 29. Apr 2017, 13:24 +0200, Alexandre Courtiol <alexandre.courtiol at gmail.com>, wrote:
>> Did you already sort out your issue?
>> On 28 April 2017 at 17:19, Patrick Schratz <patrick.schratz at gmail.com (mailto:patrick.schratz at gmail.com)> wrote:
>>> Hi everyone,
>>> the following error gives me headaches. When building my package on Travis CI (OS X build), I get the following error:
>>> Building with: R CMD build
>>> 4.64s$ R CMD build .
>>> * checking for file ‘./DESCRIPTION’ ... OK
>>> * preparing ‘RQGIS’:
>>> * checking DESCRIPTION meta-information ... OK
>>> * installing the package to build vignettes
>>> * installing *source* package ‘RQGIS’ ...
>>> ** R
>>> ** data
>>> *** moving datasets to lazyload DB
>>> ** inst
>>> ** byte-compile and prepare package for lazy loading
>>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>> unable to load shared object '/Users/travis/R/Library/rgdal/libs/rgdal.so':
>>> dlopen(/Users/travis/R/Library/rgdal/libs/rgdal.so, 6): Library not loaded: /Builds/unix/recipes/build/gdal-2.1.3-obj/libgdal.dylib
>>> Referenced from: /Users/travis/R/Library/rgdal/libs/rgdal.so
>>> Reason: image not found
it looks to me that rgdal.so is looking for libgdal.dylib in
you can confirm this with the command:
otool -L /Users/travis/R/Library/rgdal/libs/rgdal.so
it will list where it's expecting to find libgdal.dylib
my guess is that the root of the issue is that the libgdal.dylib that
rgdal.so linked against, thinks that it lives at
you can confirm this with:
otool -L /Builds/unix/recipes/build/gdal-2.1.3-obj/libgdal.dylib
you can change where .so's and .dylibs think they live, and where they
think their dependencies live with the install_name_tool tool.
i can walk you through this off-list if you need.
More information about the R-package-devel