[R-SIG-Mac] Error while loading packages R 2.14.0

Simon Urbanek simon.urbanek at r-project.org
Wed Nov 16 21:53:26 CET 2011


On Nov 16, 2011, at 3:07 PM, Dan Tenenbaum wrote:

> Simo n,
> 
> On Tue, Nov 15, 2011 at 7:26 PM, Simon Urbanek
> <simon.urbanek at r-project.org> wrote:
>> Dan,
>> 
>> static hdf5-1.8.8 and netcdf-4.1.3 are now in http://r.research.att.com/libs/ (and also on the CRAN machine).
>> 
> 
> Thanks! So far the package does not compile against that but I've
> asked the package maintainer to take a look. If you are curious, the
> package is ncdfFlow
> (http://bioconductor.org/packages/release/bioc/html/ncdfFlow.html) and
> the error I get is:
> checking for nc_def_var_deflate in -lnetcdf... no
> configure: error: netCDF library not found!
> ERROR: configuration failed for package 'ncdfFlow'
> 
> Seems like this might be a symbol from zlib.
> 

No, it's using the wrong flags to link NetCDF - it completely ignores dependencies. It has hard-coded LIBS which is simply wrong. I would suggest the author uses pkg-config to fetch the relevant LIBS, e.g. on the CRAN machine it is

hagal:tmp$ pkg-config --libs netcdf
-L/usr/local/lib -lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl  

so all the above is simply missing.

Cheers,
Simon



> Dan
> 
> 
>> Cheers,
>> Simon
>> 
>> On Nov 15, 2011, at 9:40 PM, Simon Urbanek wrote:
>> 
>>> 
>>> On Nov 15, 2011, at 8:36 PM, Dan Tenenbaum wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> 2011/11/15 Hervé Pagès <hpages at fhcrc.org>:
>>>>> On 11-11-15 06:26 AM, Simon Urbanek wrote:
>>>>>> 
>>>>>> On Nov 15, 2011, at 1:29 AM, Hervé Pagès wrote:
>>>>>> 
>>>>>>> On 11-11-12 11:30 PM, Prof Brian Ripley wrote:
>>>>>>>> 
>>>>>>>> On Sun, 13 Nov 2011, Riccardo Romoli wrote:
>>>>>>>> 
>>>>>>>>> Hi, I have already installed R 2.14.0 and I have some problem to load
>>>>>>>>> several packages, in particular xcms package. I installed it directly
>>>>>>>>> from the GUI and when I try to load it the R I have:
>>>>>>>>> 
>>>>>>>>>> library(xcms)
>>>>>>>>> 
>>>>>>>>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>>>>>>>> unable to load shared object
>>>>>>>>> 
>>>>>>>>> '/Users/riccardoromoli/Library/R/2.14/library/xcms/libs/x86_64/xcms.so':
>>>>>>>>> 
>>>>>>>>> dlopen(/Users/riccardoromoli/Library/R/2.14/library/xcms/libs/x86_64/xcms.so,
>>>>>>>>> 6): Library not loaded: /usr/local/lib/libnetcdf.7.dylib
>>>>>>>>> Referenced from:
>>>>>>>>> /Users/riccardoromoli/Library/R/2.14/library/xcms/libs/x86_64/xcms.so
>>>>>>>>> Reason: image not found
>>>>>>>>> Inoltre: Warning message:
>>>>>>>>> In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc
>>>>>>>>> = lib.loc) :
>>>>>>>>> there is no package called ‘digest’
>>>>>>>>> Errore: package/namespace load failed for ‘xcms’
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> I think the error is the absence of ibnetcdf.7.dylib. Do you have any
>>>>>>>>> idea how can I correct this error??
>>>>>>>> 
>>>>>>>> 1) Ask BioC to build the package correctly, or
>>>>>>>> 2) Build from the sources yourself, preferably using a static netcdf
>>>>>>>> library.
>>>>>>>> 
>>>>>>>> People should not be distributing Mac binary packages with hardcoded
>>>>>>>> paths to dependencies not in the R framework: CRAN does not.
>>>>>>> 
>>>>>>> Not true. rggobi, Cairo and other Mac binaries on CRAN have hardcoded
>>>>>>> paths to a bunch of stuff that is not in the R framework.
>>>>>>> 
>>>>>> 
>>>>>> The above statement is false.
>>>>>> 
>>>>>> All binaries that involve just libraries (like Cairo) are linked
>>>>>> statically and have no dependencies (see otool -L).
>>>>>> 
>>>>>> There are very few exceptions where it doesn't involve a library but an
>>>>>> entire system: gtk, ggobi and tcltk. For those there is no other option
>>>>>> since just linking them statically is not sufficient as they rely on other
>>>>>> external files. For those we provide the binaries for download along with
>>>>>> the package.
>>>>> 
>>>>> I'm aware of that and thanks for providing those binaries.
>>>>> Also thanks for confirming that Ripley's original statement was wrong.
>>>>> 
>>>>>> 
>>>>>> The problem in BioC is that not only it uses unnecessary dependent
>>>>>> libraries (it didn't use to when you were running it ;)), it doesn't even
>>>>>> provide the needed dependencies for download with the package. That makes
>>>>>> the repository useless for the user since the packages simply don't work.
>>>>> 
>>>>> We used to use your static netcdf from here
>>>>> 
>>>>> http://r.research.att.com/libs/
>>>>> 
>>>>> and that's what we should use. For whatever reason another netcdf
>>>>> (non-static) ended up being installed on our build machine. We'll fix
>>>>> that.
>>>>> 
>>>> 
>>>> This is fixed now. At the end of our next build cycle (about 1PM
>>>> tomorrow, Wednesday, Seattle time), xcms 1.30.1 will be available
>>>> which is once again built against the static netcdf library (version
>>>> 4.0.1) that Simon provides on his site. Other BioC packages that use
>>>> netcdf (flowWorkspace and mzR) will also be fixed.
>>>> 
>>>> Riccardo, this means that all you have to do is wait until the new
>>>> package is available and then:
>>>> source("http://bioconductor.org/biocLite.R")
>>>> biocLite("xcms")
>>>> library(xcms)
>>>> 
>>>> You will not need to compile anything. I just tested this on a Mac
>>>> without netcdf or any compilers and it worked fine.
>>>> 
>>>> Simon: I will be asking for your help but I want to make sure I have
>>>> all my ducks in a row first. I want first to be able to build things
>>>> exactly right, then I can know that I am giving you the right thing.
>>>> That is taking a bit more time than I'd like.
>>>> 
>>>> Briefly, the package in question needs netcdf (must be version 4.1.3)
>>>> to be linked against hdf5 which in turn needs to link to zlib.
>>>> I will contact you when I am able to create a static version of this
>>>> that allows this package to compile.
>>>> 
>>> 
>>> Note that in libs there is static hdf5 and netcdf 4.1.1 (which uses hdf5), so the only issue is that the package needs 4.1.3 and not 4.1.1 -- I wonder why since it's just a patch release ...
>>> 
>>> Cheers,
>>> Simon
>>> 
>>> 
>>>> Thanks for your help.
>>>> Dan
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> Cheers,
>>>>> H.
>>>>> 
>>>>>> 
>>>>>> Cheers,
>>>>>> Simon
>>>>>> 
>>>>>> 
>>>>>>>> In
>>>>>>>> particular, /usr/local/lib need administrative privileges to populate.
>>>>>>> 
>>>>>>> Note that installing the external stuff needed by rggobi, Cairo etc
>>>>>>> also requires administrative privileges.
>>>>>>> 
>>>>>>> Cheers,
>>>>>>> H.
>>>>>>> 
>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Best
>>>>>>>>> 
>>>>>>>>> Riccardo
>>>>>>>>> _______________________________________________
>>>>>>>>> R-SIG-Mac mailing list
>>>>>>>>> R-SIG-Mac at r-project.org
>>>>>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> R-SIG-Mac mailing list
>>>>>>>> R-SIG-Mac at r-project.org
>>>>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> Hervé Pagès
>>>>>>> 
>>>>>>> Program in Computational Biology
>>>>>>> Division of Public Health Sciences
>>>>>>> Fred Hutchinson Cancer Research Center
>>>>>>> 1100 Fairview Ave. N, M1-B514
>>>>>>> P.O. Box 19024
>>>>>>> Seattle, WA 98109-1024
>>>>>>> 
>>>>>>> E-mail: hpages at fhcrc.org
>>>>>>> Phone:  (206) 667-5791
>>>>>>> Fax:    (206) 667-1319
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> R-SIG-Mac mailing list
>>>>>>> R-SIG-Mac at r-project.org
>>>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Hervé Pagès
>>>>> 
>>>>> Program in Computational Biology
>>>>> Division of Public Health Sciences
>>>>> Fred Hutchinson Cancer Research Center
>>>>> 1100 Fairview Ave. N, M1-B514
>>>>> P.O. Box 19024
>>>>> Seattle, WA 98109-1024
>>>>> 
>>>>> E-mail: hpages at fhcrc.org
>>>>> Phone:  (206) 667-5791
>>>>> Fax:    (206) 667-1319
>>>>> 
>>>>> _______________________________________________
>>>>> R-SIG-Mac mailing list
>>>>> R-SIG-Mac at r-project.org
>>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
> 
> 



More information about the R-SIG-Mac mailing list