[Rcpp-devel] Getting different build commands on Linux vs. Mac OS

Evan Biederstedt evan.biederstedt at gmail.com
Tue May 1 16:24:49 CEST 2018


@Keith

> Unless I'm mistaken, neither are required to install binary packages. Can
you check your *source* build setup; try:

> curl -O https://cran.r-project.org/src/contrib/RcppArmadillo_0.8.
500.0.tar.gz
> R CMD INSTALL RcppArmadillo_0.8.500.0.tar.gz

This looks successful

```

$ R CMD INSTALL RcppArmadillo_0.8.500.0.tar.gz


* installing to library
‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library’

* installing *source* package ‘RcppArmadillo’ ...

** package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked

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 how to run the C++ preprocessor... clang++ -E

checking whether we are using the GNU C++ compiler... (cached) yes

checking whether clang++ accepts -g... (cached) yes

checking whether g++ version is sufficient... almost

configure: WARNING: Compiler self-identifies as being compliant with GNUC
extensions but is not g++.

checking for macOS... found

checking for macOS Apple compiler... found

configure: WARNING: OpenMP unavailable and turned off.

checking LAPACK_LIBS... R-supplied partial LAPACK found

configure: WARNING: Some complex-valued LAPACK functions may not be
available

configure: creating ./config.status

config.status: creating inst/include/RcppArmadilloConfigGenerated.h

config.status: creating src/Makevars

** libs

clang++ -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include
-DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include"
-I/usr/local/include  -I../inst/include  -fPIC  -Wall -g -O2 -c
RcppArmadillo.cpp -o RcppArmadillo.o

clang++ -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include
-DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include"
-I/usr/local/include  -I../inst/include  -fPIC  -Wall -g -O2 -c
RcppExports.cpp -o RcppExports.o

clang++ -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include
-DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include"
-I/usr/local/include  -I../inst/include  -fPIC  -Wall -g -O2 -c fastLm.cpp
-o fastLm.o

clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names
-undefined dynamic_lookup -single_module -multiply_defined suppress
-L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o
RcppArmadillo.so RcppArmadillo.o RcppExports.o fastLm.o
-L/Library/Frameworks/R.framework/Resources/lib -lRlapack
-L/Library/Frameworks/R.framework/Resources/lib -lRblas
-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0
-L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation

ld: warning: directory not found for option
'-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'

ld: warning: directory not found for option '-L/usr/local/gfortran/lib'

installing to
/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RcppArmadillo/libs

** R

** inst

** preparing package for lazy loading

** help

*** installing help indices

** building package indices

** installing vignettes

** testing if installed package can be loaded

* DONE (RcppArmadillo)

```

> Check your build directory for any .Rprofile or .Renviron files, and also
check ~/.R/Makevars for errors.

I'm using the command line. I do not seem to have anything in `$ cat
~/.R/Makevars` or `$cat ~/.Rprofile`. Perhaps this is the problem?


> If you can list the required libraries for bamdb, I'm happy to try a
build on my end. (I'm lazy to go through the CMake list :-))

There are four dependencies:

htslib/1.5 or higher: https://github.com/samtools/htslib

LMDB key-value store: https://github.com/LMDB/lmdb

Concurreny-Ck:  https://github.com/concurrencykit/ck

zlib: Standard compression library https://github.com/madler/zlib
(probably already installed)

Mac OS:
```
brew install lmdb
brew install concurrencykit
brew install zlib // mac OS already provides this software
brew install htslib // I *think* this is the latest htslib, but I would
double-check
```

Linux (for the record):
```
yum install libhts-dev    ## dev branch of latest htslib
yum install liblmdb-dev   ## LMDB dev
yum install libck-dev     ## Concurrency-ck
yum install libz-dev      ## zlib compresssion
```

On Tue, May 1, 2018 at 3:45 AM, Keith O'Hara <kth.ohr at gmail.com> wrote:

> Unless I'm mistaken, neither are required to install binary packages. Can
> you check your *source* build setup; try:
>
> curl -O https://cran.r-project.org/src/contrib/RcppArmadillo_0.8.
> 500.0.tar.gz
> R CMD INSTALL RcppArmadillo_0.8.500.0.tar.gz
>
> If that goes through without a hitch then it's probably a package issue.
> Are you using RStudio? Check your build directory for any .Rprofile or
> .Renviron files, and also check ~/.R/Makevars for errors.
>
> If you can list the required libraries for bamdb, I'm happy to try a build
> on my end. (I'm lazy to go through the CMake list :-))
>
> Keith
>
> > On May 1, 2018, at 3:07 AM, Evan Biederstedt <evan.biederstedt at gmail.com>
> wrote:
> >
> > I would add, I think clang and gfortran are working correctly, as these
> are required for `install.packages('RcppArmadillo')` to install properly.
> >
> > On Tue, May 1, 2018 at 3:06 AM, Evan Biederstedt <
> evan.biederstedt at gmail.com> wrote:
> > Maybe my Mac OS needs updating...possibly something with XCode, but it's
> not clear how...
> >
> > --- mac OS Sierra 10.12.6
> > --- CRAN R 3.4.3
> > ---clang & gfortran
> >
> > $ clang --version
> > Apple LLVM version 9.0.0 (clang-900.0.39.2)
> > Target: x86_64-apple-darwin16.7.0
> > Thread model: posix
> > InstalledDir: /Library/Developer/CommandLineTools/usr/bin
> >
> > $ gfortran --version
> > GNU Fortran (GCC) 7.1.0
> > Copyright (C) 2017 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions.  There is
> NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.
> >
> > I will update once I have access to and try this on several other mac
> boxes with different specs..
> >
> > Thank you to everyone for the help.
> >
> >
> > On Tue, May 1, 2018 at 1:44 AM, Ralf Stubner <
> ralf.stubner at r-institute.com> wrote:
> >
> > Am 30.04.2018 um 23:42 schrieb Evan Biederstedt <
> evan.biederstedt at gmail.com>:
> >
> >> @Ralf
> >>
> >> > I had not installed the necessary C library, so unsurprisingly the
> compilation step already failed. What I find interesting is that in my case
> "-std=gnu++11“ and "-I../inst/include/" are present in the command line
> options for clang++. These are also missing from what you quoted and are
> also a consequence of src/Makevars. It almost looks as if this file got
> lost on your macOS box …
> >>
> >> Interesting....I'm not sure what to make of this of course, but it
> would be interesting if it was only happening on this macbook. Perhaps OS
> version or brew could be to blame? I'm not sure what else would be
> "special" about this macbook....
> >
> > On my side that would be
> > • macOS high Sierra
> > • CRAN R 3.4.4
> > • clang and gfortran as recommended by CRAN
> > • brew is installed but I do not see how it enters the picture
> >
> > Greetings
> > Ralf
> >
> >
> > _______________________________________________
> > Rcpp-devel mailing list
> > Rcpp-devel at lists.r-forge.r-project.org
> > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20180501/b2b0eaa2/attachment-0001.html>


More information about the Rcpp-devel mailing list