Skip to content

[Bioc-devel] Updating for 3.11

5 messages · Karl Stamm, Michael Love, Martin Morgan +1 more

#
I was notified recently my package has build errors going in to bioc 3.11.
So begins the biannual saga of updating everything to see what's new.
My package has quite a few dependencies, so it's normal for someone to
change their API and break my scripted usage. This time a default parameter
changed in DESeq2::lfcShrink and my fix is simply to specify the previous
method.
However, to get there, we need to update the system to R 4.0.0 release
candidate, and download and compile all of the bioconductor packages
implicated. My primary system is an OSX 10.12, and certain system packages
are out of date routinely on OSX.
I'm sharing this story with the group to report some commands I have found
necessary and may help others fighting through this process.

First was "clang4" a c compiler needed by R devel and not available in the
right spot on OSX 10.12.  A fix was found by reinstalling clang in several
spots lying about the version numbers. these downloads are complete
installation with varied linker names.

To install the R package called XML you need a system library for libxml.
Which is called libxml2 on OSX, and primarily available through Homebrew,
which itself wanted to update. Brew update brings in a Ruby engine and a
Python installation, and finally warns that OSX 10.12 is aged out of
support, and will only make the libxml available "within the keg" which is
apparently their nomenclature for a local installation vs system.
So to get the R library to see it we first need to run
Sys.setenv(XML_CONFIG = "/usr/local/Cellar/libxml2/2.9.10/bin/xml2-config")
Where the 2.9.10 folder name may vary with your system. Had I known,
perhaps I could have avoided updating brew entirely.

Next RCurl didn't want to install/compile, because Apple XCode 9 has
removed the libsystem_darwin.dylib for the x64 architecture. The command to
re-use a previously installed version is simply:
sudo xcode-select -s /Library/Developer/CommandLineTools

With that I was able to install the Bioc Devel versions and finally
reproduce the bug found on the build servers.
#
Thanks for the note Karl, and sorry for the break.

For others, the change in DESeq2::lfcShrink is that now type="apeglm"
is the default instead of type="normal".

For the past two releases, users have been getting a message when they
run with the default argument that type="normal" performs worse the
other two shrinkage options available.

best,
Mike
#
I'm not an expert on macOS, but generally one wants to follow documented R procedures.

Instructions for installing binary versions of R on macOS, including managing multiple versions, are provide at http://mac.r-project.org/man/R-admin.html#Installing-R-under-macOS.

The section about installing R packages from source is at http://mac.r-project.org/man/R-admin.html#macOS-packages.

Several system libraries, and instructions for installing them, are at https://mac.r-project.org/libs/ and I believe should be preferred to homebrew.

This changes (corrects?) some of the contortions you indicate below, for instance it is not necessary to fiddle with clang4. Also, by using the CRAN-distributed binary (from http://mac.r-project.org/) for R-devel one does not need to compile packages (other than your own) from source but rather can install the binaries (see pkgType on ?options and ?install.packages).

I think it's helpful too to ask whether dependencies are all strictly necessary, or only convenient (stringr and stringi useage often seems to fall into this category, where base string manipulation functionality is often sufficient) or providing very marginal functionality that adds minimally to our packages -- perhaps, in general and not necessarily your use of DESeq2, our packages could adopt a New Year's resolution and go on a dependency diet?

Martin

?On 1/8/20, 12:18 AM, "Bioc-devel on behalf of Karl Stamm" <bioc-devel-bounces at r-project.org on behalf of karl.stamm at gmail.com> wrote:

    I was notified recently my package has build errors going in to bioc 3.11.
    So begins the biannual saga of updating everything to see what's new.
    My package has quite a few dependencies, so it's normal for someone to
    change their API and break my scripted usage. This time a default parameter
    changed in DESeq2::lfcShrink and my fix is simply to specify the previous
    method.
    However, to get there, we need to update the system to R 4.0.0 release
    candidate, and download and compile all of the bioconductor packages
    implicated. My primary system is an OSX 10.12, and certain system packages
    are out of date routinely on OSX.
    I'm sharing this story with the group to report some commands I have found
    necessary and may help others fighting through this process.
    
    First was "clang4" a c compiler needed by R devel and not available in the
    right spot on OSX 10.12.  A fix was found by reinstalling clang in several
    spots lying about the version numbers. these downloads are complete
    installation with varied linker names.
    
    To install the R package called XML you need a system library for libxml.
    Which is called libxml2 on OSX, and primarily available through Homebrew,
    which itself wanted to update. Brew update brings in a Ruby engine and a
    Python installation, and finally warns that OSX 10.12 is aged out of
    support, and will only make the libxml available "within the keg" which is
    apparently their nomenclature for a local installation vs system.
    So to get the R library to see it we first need to run
    Sys.setenv(XML_CONFIG = "/usr/local/Cellar/libxml2/2.9.10/bin/xml2-config")
    Where the 2.9.10 folder name may vary with your system. Had I known,
    perhaps I could have avoided updating brew entirely.
    
    Next RCurl didn't want to install/compile, because Apple XCode 9 has
    removed the libsystem_darwin.dylib for the x64 architecture. The command to
    re-use a previously installed version is simply:
    sudo xcode-select -s /Library/Developer/CommandLineTools
    
    With that I was able to install the Bioc Devel versions and finally
    reproduce the bug found on the build servers.
    
    
    _______________________________________________
    Bioc-devel at r-project.org mailing list
    https://stat.ethz.ch/mailman/listinfo/bioc-devel
#
I went on a dependency diet and went from 114 to 87 in devel now.

I would like to trim more, but I think trimming any of the rest would just
be pushing burden over for the user to install packages when they run core
functions, so not very helpful. But if someone spots one I can trim, I'd be
happy to work on it.
#
Hi,
On 1/7/20 10:47, Karl Stamm wrote:
FWIW celaya2 (Mac builder for BioC 3.11) uses clang 8.0.0 (see 
http://bioconductor.org/checkResults/devel/bioc-LATEST/celaya2-NodeInfo.html) 
which is available on CRAN here https://cran.r-project.org/bin/macosx/tools/

Note that the page says that this is the version "to be used with El 
Capitan builds of R 3.7.0 and higher" which is a little confusing given 
that there won't be a 3.7.0 release of R. Anyway that's what you should 
use if you use R 4.0.0.
The lack of Mac binary packages for R-devel on CRAN together with the 
high turnover of Mac OS versions are a major PITA and the reason why 
when R/Bioconductor newbies ask me what OS I recommend for package 
development I always say Linux, without hesitation. Unless they want to 
suffer ;-)

Cheers,
H.