Message-ID: <98d94688-4b98-4055-bc93-a4b673d31bdb@app.fastmail.com>
Date: 2025-05-15T16:24:10Z
From: Heather Turner
Subject: Need for `-headerpad_max_install_names` with `--enable-R-framework`
Dear All,
I have been building R (on Apple M1 Pro) with `--enable-R-framework` so that I can use the built version of R in RStudio/Positron. My set up was working fine back in February or so, then in April (with the alpha version) I started to hit errors with `make install`:
Creating R framework ...
libRlapack
libRblas
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: /Library/Frameworks/R.framework/Versions/R-devel/Resources/bin/exec/R <http://r.framework/Versions/R-devel/Resources/bin/exec/R> (for architecture arm64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
<similar error for libR, snipped>
I only just got round to exploring further. I can fix the issue by adding
MAIN_LDFLAGS="-Wl,-headerpad_max_install_names"
to my config.site, but I wonder why I didn't need to set this in the past. Also I wonder if this should be set by default, at least with `--enable-R-framework`?
Let me know if I can provide any information that might be helpful about my configuration/setup.
Best wishes,
Heather