[R-SIG-Mac] Failing to build R-devel: lzma.h missing

peter dalgaard pd@|gd @end|ng |rom gm@||@com
Sun Apr 19 09:44:52 CEST 2026


I have

$ cat ~/r-devel/BUILD/config.site 
CPPFLAGS=-I/opt/R/x86_64/include
LDFLAGS=-L/opt/R/x86_64/lib
with_tcl_config=/opt/R/x86_64/lib/tclConfig.sh
with_tk_config=/opt/R/x86_64/lib/tkConfig.sh

(even though Simon says I shouldn't use config files...)

I.e. you may need to set the *FLAGS in your setup (switch out the arch of course).

-pd


> On 18 Apr 2026, at 22.34, Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
> 
> I'm trying to build R-devel.  I used this command line to configure it:
> 
> ../R-devel-src//configure -C --enable-R-shlib --enable-memory-profiling --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib --with-tcl-config=/opt/R/arm64/lib/tclConfig.sh --with-tk-config=/opt/R/arm64/lib/tkConfig.sh PKG_CONFIG_PATH=/opt/R/arm64/lib/pkgconfig:/usr/lib/pkgconfig
> 
> (I found that in the old config.log, with "pkg-config" in the PKG_CONFIG_PATH instead of "pkgconfig".  Neither one works.  I think it also matches the suggestion in the R-admin manual.)  Is there something missing?  It fails with this error at the end:
> 
> 
>  checking for lzma_version_number in -llzma... yes
>  checking for lzma.h... no
>  configure: error: "liblzma library and headers are required"
> 
> But I see lzma.h in /opt/R/arm64/include, and that's where pkg-config --cflags liblzma says it should be.  I tried removing PKG_CONFIG_PATH and got the same result.
> 
> Duncan Murdoch
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes using cbs.dk  Priv: PDalgd using gmail.com



More information about the R-SIG-Mac mailing list