Hi Simon,
thanks a lot for your help. I have to admit, a lot of what you wrote is entirely
new to me (probably because we are on arm64 now). So far, on Intel Macs, I
always could easily install R from source (see below) and thus had several
versions available, my own starter script, version-independent library of R
packages, etc. I used to use /usr/local/R for all of that (see below), which,
now will be /opt/R/arm64 I assume. However, I don't understand why suddenly
lzma.h is not found (even though it's inside /opt/R/arm64 as recommended and
also xz is found, etc.).
1) You mentioned "The flags used by CRAN... which works for the binaries
installed using source(...)". This part I don't understand. If you already have
R running (to be able to execute the source(); install.libs() command), why are
the flags for compiling R relevant?
2) Concerning the flags on
https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R4/conf.big-sur-arm64, are
these the flags used per default if I do ./configure on arm64 or does it mean
that I need to provide all those flags on arm64 because they are not the
default?
3) The install.R script you mentioned already needs to be execute from R, so you
assume R is already installed. Is the recommended way then to install R via
binaries and then to use install.R to install the tools required to build
packages from source? Can you then still have various R versions installed
(and if so, where are they located)?
As a clarification, what I always did on Intel Macs and what I also tried now is this:
1) Install all preliminaries (GCC, Fortran, XQuartz, qpdf, Tcl/Tk, Open MPI,
GSL, GMP, MPFR, Java, XML, PCRE2, xz) either via brew or directly from source
(./configure, make, make install)
2) create /usr/local/R for the various R versions and ./usr/local/R/library for
a version-independent library of packages
3) Download R versions, say R-4.2.0.tar.gz and unpack them to /usr/local/R/R-4.2.0_source
4) Create /usr/local/R/R-4.2.0_build and execute:
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
../R-4.2.0_source/configure --enable-R-shlib --with-tcl-config=/Library/Frameworks/Tcl.framework/Versions/8.6/tclConfig.sh --with-tk-config=/Library/Frameworks/Tk.framework/tkConfig.sh
The latter configure step produced the lzma.h error described. Given what you wrote
I assume I failed to specify the location of the dependencies in ./configure. So
would the right ./configure then specify all flags provided by
https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R4/conf.big-sur-arm64 ?
Thanks again for your help & cheers,
Marius
________________________________________
From: Simon Urbanek <simon....@R-project.org>
Sent: Saturday, June 11, 2022 19:29
To: Marius Hofert
Cc:
r-si...@r-project.org
Subject: Re: [R-SIG-Mac] configure: error: "liblzma library and headers are required"