├── .gitattributes ├── .scripts ├── builds ├── mkweb ├── rver.c └── update-web.sh ├── README.md ├── benchmarks ├── R-benchmark-24.R ├── R-benchmark-25.R ├── bench.R └── index.html ├── index.in.html ├── main.css ├── old.html ├── openmp ├── index.html ├── openmp-10.0.0-darwin17-Debug.tar.gz ├── openmp-10.0.0-darwin17-Release.tar.gz ├── openmp-11.0.1-darwin20-Debug.tar.gz ├── openmp-11.0.1-darwin20-Release.tar.gz ├── openmp-12.0.1-darwin20-Debug.tar.gz ├── openmp-12.0.1-darwin20-Release.tar.gz ├── openmp-13.0.0-darwin21-Debug.tar.gz ├── openmp-13.0.0-darwin21-Release.tar.gz ├── openmp-14.0.6-darwin20-Debug.tar.gz ├── openmp-14.0.6-darwin20-Release.tar.gz ├── openmp-15.0.7-darwin20-Debug.tar.gz ├── openmp-15.0.7-darwin20-Release.tar.gz ├── openmp-16.0.4-darwin20-Debug.tar.gz ├── openmp-16.0.4-darwin20-Release.tar.gz ├── openmp-17.0.6-darwin20-Debug.tar.gz ├── openmp-17.0.6-darwin20-Release.tar.gz ├── openmp-18.1.8-darwin20-Debug.tar.gz ├── openmp-18.1.8-darwin20-Release.tar.gz ├── openmp-7.1.0-darwin17-Debug.tar.gz ├── openmp-7.1.0-darwin17-Release.tar.gz ├── openmp-8.0.1-darwin17-Debug.tar.gz ├── openmp-8.0.1-darwin17-Release.tar.gz ├── openmp-9.0.1-darwin17-Debug.tar.gz ├── openmp-9.0.1-darwin17-Release.tar.gz ├── openmp-96efe90-darwin20-Debug.tar.gz ├── openmp-96efe90-darwin20-Release.tar.gz └── src │ ├── bld │ ├── cmake-fix.patch │ ├── index.html │ ├── openmp-10.0.0.src.tar.xz │ ├── openmp-11.0.1.src.patch │ ├── openmp-11.0.1.src.tar.xz │ ├── openmp-7.1.0.src.tar.xz │ ├── openmp-8.0.1.src.tar.xz │ └── openmp-9.0.1.src.tar.xz └── tools ├── gcc-42-5666.3-darwin11.pkg ├── gfortran-8.2-Mojave.dmg ├── index-old.html ├── index.html ├── index.html.old └── subversion-1.14.0-darwin15.6.tar.gz /.gitattributes: -------------------------------------------------------------------------------- 1 | tools/gfortran-8.2-Mojave.dmg filter=lfs diff=lfs merge=lfs -text 2 | tools/gcc-42-5666.3-darwin11.pkg filter=lfs diff=lfs merge=lfs -text 3 | -------------------------------------------------------------------------------- /.scripts/builds: -------------------------------------------------------------------------------- 1 | big-sur/R-4.3-branch 2 | big-sur/R-4.4-branch 3 | -------------------------------------------------------------------------------- /.scripts/mkweb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | $root='/www/R-mac-dev'; 4 | $src="$root/.scripts"; 5 | $run="$src/web"; 6 | $builds="$src/builds"; 7 | $dbase=$base=$root; 8 | 9 | @bstyles=("Debug", "Release"); ## "Deployment", "Deployment64", "Leopard", "Leopard64", "SnowLeopard64"); 10 | 11 | open IN, "$builds"; 12 | @rds=; 13 | close IN; 14 | chomp @rds; 15 | 16 | # @pf=('i386','ppc','x86_64'); ## ppc64 is no longer supported 17 | #@pf=('i386','ppc','x86_64','ppc64'); 18 | @pf=('arm64','x86_64'); 19 | $rsuff='sa-x86_64'; 20 | 21 | $talt=0; 22 | ## New: use last-success for the main downloads 23 | open OUT1, ">$run/R-main.html"; 24 | print OUT1 "\n\n"; 25 | my @rrds = reverse @rds; 26 | foreach $rd (@rrds) { 27 | my $last_os=''; 28 | my ($os,$rd) = split /\//, $rd; 29 | foreach $arch (@pf) { 30 | my $pkg = "$dbase/$os-$arch/$rd/$rd-$arch.pkg"; 31 | if ( -e "$pkg" ) { 32 | print "[processing installer package $pkg]\n"; 33 | my @rv = `$src/pkg-ver $pkg $src/rver.c`; 34 | my $ver=$rv[0]; 35 | my $sz=`ls -lh $pkg|awk '{print \$5}'`; 36 | chop $sz; 37 | my $showos = "$os-$arch"; 38 | if ($last_os eq $showos) { $showos=''; } else { $last_os = $showos; $talt++; } 39 | $talt=1 if ($talt > 2); 40 | my $trc="build alt-$talt"; 41 | my $ainfo = ($arch eq 'arm64') ? '
(for M1/M2 Macs only!)' : '
(for Intel Macs)'; 42 | print OUT1 "\n"; 43 | } 44 | if (0) { ## disable .xz list for now 45 | my $lsbase = "$dbase/$os/last-success/$rd-$arch"; 46 | if ( -e "$lsbase.tar.xz" ) { 47 | print "[processing $lsbase.tar.xz]\n"; 48 | my @rv=`(rm -f '$run/rver.h' '$run/rver'; xzcat '$lsbase.tar.xz' | tar fxO - --wildcards 'R.framework/*/Rversion.h' > '$run/rver.h' 2>/dev/null; gcc -o '$run/rver' -I '$run' '$src/rver.c' && '$run/rver')`; 49 | my $ver=$rv[0]; 50 | my $sz=`ls -lh $lsbase.tar.xz|awk '{print \$5}'`; 51 | chop $sz; 52 | my $showos = "$os-$arch"; 53 | if ($last_os eq $showos) { $showos=''; } else { $last_os = $showos; $talt++; } 54 | $talt=1 if ($talt > 2); 55 | my $trc="build alt-$talt"; 56 | print OUT1 ""; 57 | } 58 | } 59 | } 60 | } 61 | print OUT1 "
BuildOSDownload
$rd
$ver
$showosInstaller: $rd-$arch.pkg (${sz}b, notarized)$ainfo
$rd
$ver
$showosFramework only: $rd-$arch.tar.xz (${sz}b)
(for automation, regular users please use installer)
\n"; 62 | close OUT1; 63 | 64 | open OUT, ">$run/R-builds.html"; 65 | print OUT "\n\n"; 66 | 67 | foreach $rd (@rds) { 68 | ($os,$rd) = split /\//, $rd; 69 | $talt++; 70 | $talt=1 if ($talt > 2); 71 | $trc="build alt-$talt"; 72 | undef @rv; 73 | print " - processing $os $rd\n"; 74 | if ( -e "$dbase/$os/$rd/$rd-$os-$rsuff.tar.gz" ) { 75 | @rv=`(rm -f '$run/rver.h' '$run/rver'; tar fxzO '$dbase/$os/$rd/$rd-$os-$rsuff.tar.gz' --wildcards 'Library/Frameworks/R.framework/*/Rversion.h' > '$run/rver.h'; gcc -o '$run/rver' -I '$run' '$src/rver.c' && '$run/rver')`; 76 | } elsif ( -e "$dbase/$os/$rd/x86_64/$rd.tar.gz" ) { 77 | @rv=`(rm -f '$run/rver.h' '$run/rver'; tar fxzO '$dbase/$os/$rd/x86_64/$rd.tar.gz' --wildcards 'Library/Frameworks/R.framework/*/Rversion.h' > '$run/rver.h'; gcc -o '$run/rver' -I '$run' '$src/rver.c' && '$run/rver')`; 78 | } elsif ( -e "$dbase/$os/$rd/arm64/$rd.tar.gz" ) { 79 | @rv=`(rm -f '$run/rver.h' '$run/rver'; tar fxzO '$dbase/$os/$rd/arm64/$rd.tar.gz' --wildcards 'Library/Frameworks/R.framework/*/Rversion.h' > '$run/rver.h'; gcc -o '$run/rver' -I '$run' '$src/rver.c' && '$run/rver')`; 80 | } 81 | $ver=$rv[0]; # $ver=~s/\.$//; 82 | # $ver=~s/development /development
/; 83 | $rl1=""; 84 | $rl=''; 85 | $lkf=''; 86 | $dl=''; 87 | foreach (@pf) { 88 | if ( -e "$dbase/$os/$rd/$_/SUCCESS" || -e "$dbase/$os/$rd/$_/FAILED" ) { 89 | if (-e "$dbase/$os/$rd/$_/SUCCESS") { 90 | print " old-style, OK\n"; 91 | $rl.="$_: OK (log)
"; $lkf="$dbase/$os/$rd/$_/SUCCESS"; 92 | } elsif (-e "$dbase/$os/$rd/$_/FAILED") { 93 | print " old-style, FAILED\n"; 94 | $sf=`cat $dbase/$os/$rd/$_/FAILED`; 95 | $bl=`cat $dbase/$os/$rd/$_/build.log`; 96 | $rl.="$_: $sf (log)
"; 97 | $lkf="$dbase/$os/$rd/$_/FAILED"; 98 | } else { 99 | # $rl.="MISSING
"; 100 | } 101 | } elsif ( -e "$dbase/$os/$rd/$_/$rd.SUCCESS" || -e "$dbase/$os/$rd/$_/$rd.FAILED" ) { 102 | if (-e "$dbase/$os/$rd/$_/$rd.SUCCESS") { 103 | print " R4, OK\n"; 104 | $rl.="$_: OK (log)
"; $lkf="$dbase/$os/$rd/$_/$rd.SUCCESS"; 105 | } elsif (-e "$dbase/$os/$rd/$_/$rd.FAILED") { 106 | print " R4, FAILED\n"; 107 | $sf=`cat $dbase/$os/$rd/$_/$rd.FAILED`; 108 | $bl=`cat $dbase/$os/$rd/$_/build.log`; 109 | $rl.="$_: $sf (log)
"; 110 | $lkf="$dbase/$os/$rd/$_/FAILED"; 111 | } else { 112 | # $rl.="MISSING
"; 113 | } 114 | } 115 | } 116 | if (-e "$dbase/$os/$rd/universal/SUCCESS") { 117 | $rl.="universal: OK
"; 118 | $lkf="$dbase/$os/$rd/universal/SUCCESS"; 119 | if (-e "$dbase/$os/$rd/universal/$rd-$os-universal.tar.gz") { 120 | $sz=`ls -lh $dbase/$os/$rd/universal/$rd-$os-universal.tar.gz|awk '{print \$5}'`; 121 | chop $sz; 122 | $dl="$rd-$os-universal.tar.gz (${sz}b)"; 123 | } 124 | $dmg=`ls $dbase/$os/$rd/universal/$rd-*.dmg 2>/dev/null|sort|tail -n 1`; chop $dmg; 125 | if ($dmg ne '' && (-e $dmg)) { 126 | $sz=`ls -lh $dmg|awk '{print \$5}'`; 127 | $dmg=`basename \"$dmg\"`; chop $dmg; 128 | chop $sz; 129 | $dl.="
$dmg (${sz}b, installer incl. GUI)"; 130 | } 131 | $lpkg="$dbase/$os/$rd/universal/$rd-$os.pkg"; 132 | if ( -e $lpkg ) { 133 | $sz=`ls -lh $lpkg|awk '{print \$5}'`; 134 | $lpkg=`basename \"$lpkg\"`; chop $lpkg; 135 | chop $sz; 136 | $dl.="

$lpkg (${sz}b, installer incl. GUI)"; 137 | } 138 | # if ($os eq 'leopard' && $rd=~/^R-2.9-/) { ## manual override! 139 | # $dl.="
(For an installer package see the Leopard build section below)"; 140 | # } 141 | } elsif (-e "$dbase/$os/$rd/universal/FAILED") { 142 | $sf=`cat $dbase/$os/$rd/universal/FAILED`; 143 | $rl.="universal: FAILED: $sf
"; 144 | $lkf="$dbase/$os/$rd/universal/FAILED"; 145 | } 146 | if (-e "$dbase/$os/$rd/$rd.pkg") { 147 | $rl.="Package: OK
"; 148 | # $lkf="$dbase/$os/$rd/universal/SUCCESS"; 149 | foreach $arch (@pf) { 150 | if (-e "$dbase/$os/$rd/$arch/$rd.tar.gz") { 151 | $sz=`ls -lh $dbase/$os/$rd/$arch/$rd.tar.gz|awk '{print \$5}'`; 152 | chop $sz; 153 | $dl="
$arch/$rd.tar.gz ($arch, ${sz}b)"; 154 | } 155 | } 156 | $lpkg="$dbase/$os/$rd/$rd.pkg"; 157 | if ( -e $lpkg ) { 158 | $lkf = $lpkg; 159 | $sz=`ls -lh $lpkg|awk '{print \$5}'`; 160 | $lpkg=`basename \"$lpkg\"`; chop $lpkg; 161 | chop $sz; 162 | $dl.="

$lpkg (${sz}b, installer incl. GUI)"; 163 | } 164 | } elsif (-e "$dbase/$os-x86_64/$rd/$rd.pkg" || -e "$dbase/$os-arm64/$rd/$rd.pkg") { 165 | foreach $arch (@pf) { 166 | if (-e "$dbase/$os/$rd/$arch/$rd.tar.gz") { 167 | $sz=`ls -lh $dbase/$os/$rd/$arch/$rd.tar.gz|awk '{print \$5}'`; 168 | chop $sz; 169 | $dl.="
$arch/$rd.tar.gz ($arch, ${sz}b)"; 170 | } 171 | if (-e "$dbase/$os/last-success/$rd-$arch.tar.xz") { 172 | $sz=`ls -lh $dbase/$os/last-success/$rd-$arch.tar.xz|awk '{print \$5}'`; 173 | chop $sz; 174 | $dl.="
$rd-$arch.tar.xz ($arch framework, ${sz}b)"; 175 | } 176 | $lpkg="$dbase/$os-$arch/$rd/$rd-$arch.pkg"; 177 | $lpkg="$dbase/$os-$arch/$rd/$rd.pkg" if (! -e $lpkg ); 178 | if ( -e $lpkg ) { 179 | $lkf = $lpkg; 180 | $sz=`ls -lh $lpkg|awk '{print \$5}'`; 181 | $lpkg=`basename \"$lpkg\"`; chop $lpkg; 182 | chop $sz; 183 | $dl.="
$lpkg (${sz}b, installer incl. GUI)
"; 184 | } 185 | } 186 | } elsif (-e "$dbase/$os/$rd/x86_64/$rd.tar.gz" || -e "$dbase/$os/$rd/arm64/$rd.tar.gz") { 187 | $rl.="Package:FAILED
"; 188 | foreach $a (@pf) { 189 | if (-e "$dbase/$os/$rd/$a/$rd.tar.gz") { 190 | $sz=`ls -lh $dbase/$os/$rd/$a/$rd.tar.gz|awk '{print \$5}'`; 191 | chop $sz; 192 | $dl="
$rd.tar.gz ($a, ${sz}b)"; 193 | } 194 | } 195 | } elsif (-e "$dbase/$os/$rd/$rd-$os.pkg") { 196 | $rl.="Package: OK
"; 197 | # $lkf="$dbase/$os/$rd/universal/SUCCESS"; 198 | if (-e "$dbase/$os/$rd/$rd-$os-$rsuff.tar.gz") { 199 | $sz=`ls -lh $dbase/$os/$rd/$rd-$os-$rsuff.tar.gz|awk '{print \$5}'`; 200 | chop $sz; 201 | $dl="
$rd-$os-$rsuff.tar.gz (${sz}b)"; 202 | } 203 | $lpkg="$dbase/$os/$rd/$rd-$os-signed.pkg"; 204 | if ( -e $lpkg ) { 205 | $lkf = $lpkg; 206 | $sz=`ls -lh $lpkg|awk '{print \$5}'`; 207 | $lpkg=`basename \"$lpkg\"`; chop $lpkg; 208 | chop $sz; 209 | $dl.="

$lpkg (${sz}b, installer incl. GUI)"; 210 | } else { 211 | $lpkg="$dbase/$os/$rd/$rd-$os.pkg"; 212 | if ( -e $lpkg ) { 213 | $lkf = $lpkg; 214 | $sz=`ls -lh $lpkg|awk '{print \$5}'`; 215 | $lpkg=`basename \"$lpkg\"`; chop $lpkg; 216 | chop $sz; 217 | $dl.="

$lpkg (${sz}b, installer incl. GUI)"; 218 | } 219 | } 220 | # if ($os eq 'leopard' && $rd=~/^R-2.9-/) { ## manual override! 221 | # $dl.="
(For an installer package see the Leopard build section below)"; 222 | # } 223 | } elsif (-e "$dbase/$os/$rd/universal/FAILED") { 224 | $sf=`cat $dbase/$os/$rd/universal/FAILED`; 225 | $rl.="Package: FAILED: $sf
"; 226 | $lkf="$dbase/$os/$rd/universal/FAILED"; 227 | } 228 | $lkd=''; 229 | $lkd=`ls -l "$lkf" |awk '{print \$6,\$7,\$8}'` if ($lkf ne ''); 230 | chop $lkd; 231 | 232 | $logs=''; 233 | 234 | @suff=('check','conf','build'); 235 | foreach $a (@pf) { 236 | print " - generating log-$rd.$os.$a.html\n"; 237 | open LOUT, ">$run/log-$rd.$os.$a.html"; 238 | print LOUT "

$rd, $os, $a

"; 239 | foreach(@suff) { print LOUT "$_   "; }; 240 | print LOUT "
BuildOSDateStatusDownload
$rd
$ver
$os
"; 241 | foreach $pf (@suff) { 242 | $fc=($pf=~/err$/)?"#c00000":"#0000c0"; 243 | $fn="$dbase/$os/$rd/$a/$pf"; 244 | if ( -e "$dbase/$os/$rd/$a/$rd.$pf" ) { $fn="$dbase/$os/$rd/$a/$rd.$pf" } 245 | $da=`stat -c '\%y' $fn 2>/dev/null`; $da=~s/\".*?\"//; $da=$1 if ($da=~/\"(.*?)\"/); 246 | print LOUT "\n"; 256 | } 257 | print LOUT "
$pf - $da
";
247 | 	    open INA, "$fn"; while() {
248 | 		#s//>/g;
250 | 		s/\#\@1\@\#//g;
251 | 		s/\#\@2\@\#/
/g; 252 | s/\@\#.\#\@/<\/font>/g; 253 | print LOUT $_; 254 | }; close INA; 255 | print LOUT "
"; 258 | close LOUT; 259 | } 260 | if ($dl eq '') { 261 | $rl="$rl1$lkd$rl\n"; 262 | } else { 263 | $rl="$rl1$lkd$rl$dl\n"; 264 | } 265 | print OUT $rl; 266 | 267 | foreach $bsty (@bstyles) { 268 | foreach $arch (@pf) { 269 | $gf=`ls $dbase/$os/$rd/R-GUI*-$arch-$bsty.dmg 2>/dev/null|sort -r|head -n 1`; 270 | $gf=~s/[\r\n]+//g; 271 | push @guilist, $gf if ($gf ne ''); 272 | $gf=`ls $dbase/$os/$rd/universal/R-GUI*-$arch-$bsty.dmg 2>/dev/null|sort -r|head -n 1`; 273 | $gf=~s/[\r\n]+//g; 274 | push @guilist, $gf if ($gf ne ''); 275 | } 276 | } 277 | } 278 | 279 | print OUT "\n"; 280 | close OUT; 281 | 282 | open OUT, ">$run/GUI.html"; 283 | print OUT "\n\n"; 284 | 285 | $trc=''; $talt=0; 286 | foreach (@guilist) { 287 | $gfn=$_; 288 | $lnk=$_; 289 | if (/\/universal/) { 290 | s/^.*\///; 291 | $lnk=$_; 292 | } else { 293 | $lnk=~s/.*deploy\///; 294 | $lnk=~s/.*R-mac-dev\///; 295 | s/^.*\///; 296 | } 297 | $rl=''; 298 | $talt++; 299 | $talt=1 if ($talt > 2); 300 | $trc="gui alt-$talt"; 301 | if (/GUI-(\d+)-(\d+\.\d+)-(.*)/) { 302 | $rl="\n"; 303 | } 304 | print OUT $rl; 305 | } 306 | 307 | print OUT "
VersionBuildDownload
Mac OS X GUI rev. $1 for R $2.x$3$_
\n"; 308 | close OUT; 309 | 310 | sub fetch { my($a); $a=''; open INF,"$run/$_[0]"; while() { $a.=$_; }; close INF; $a; }; 311 | 312 | open IN, "$base/index.in.html"; 313 | open OUT, ">$run/index.html"; 314 | while() { 315 | s//fetch($1)/ge; 316 | print OUT $_; 317 | } 318 | close IN; 319 | close OUT; 320 | -------------------------------------------------------------------------------- /.scripts/rver.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "rver.h" 3 | 4 | int main(int ac, char **av) { 5 | /* this is a work-around for broken R_SVN_REVISION in most recent (unreleased) R */ 6 | #if R_VERSION > R_Version(2,12,1) 7 | char buf[16], *rev; 8 | if (sizeof(R_SVN_REVISION) < 6) { 9 | snprintf(buf, sizeof(buf), "%d", (int)(long)R_SVN_REVISION); 10 | rev = buf; 11 | } else rev = (char*)R_SVN_REVISION; 12 | printf("%s%s)\n", R_MAJOR "." R_MINOR " " R_STATUS "
(" R_YEAR "/" R_MONTH "/" R_DAY ", r", rev); 13 | #else 14 | /* this is how it should be */ 15 | puts(R_MAJOR "." R_MINOR " " R_STATUS "
(" R_YEAR "/" R_MONTH "/" R_DAY ", r" R_SVN_REVISION ")"); 16 | #endif 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /.scripts/update-web.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd /www/R-mac-dev/.scripts 4 | ./mkweb && cp -p web/index.html ../ && cp -p web/log-R-* ../logs/ 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # R-mac-dev 2 | R for macOS developer page 3 | 4 | This repository holds copies of some files from the [R for macOS Developer Page](https://mac.R-project.org) 5 | 6 | You can issue PRs if you wish to improve the R for macOS documentation for developers. For updates to the official R releases and manuals, please use the [R bug tracker](https://bugs.R-project.org). 7 | -------------------------------------------------------------------------------- /benchmarks/R-benchmark-24.R: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/benchmarks/R-benchmark-24.R -------------------------------------------------------------------------------- /benchmarks/R-benchmark-25.R: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/benchmarks/R-benchmark-25.R -------------------------------------------------------------------------------- /benchmarks/bench.R: -------------------------------------------------------------------------------- 1 | hilbert<-function(n) 1/(outer(seq(n),seq(n),"+")-1) 2 | print("hilbert n=500") 3 | print(system.time(eigen(hilbert(500)))) 4 | print(system.time(eigen(hilbert(500)))) 5 | print(system.time(eigen(hilbert(500)))) 6 | print("hilbert n=1000") 7 | print(system.time(eigen(hilbert(1000)))) 8 | print(system.time(eigen(hilbert(1000)))) 9 | print(system.time(eigen(hilbert(1000)))) 10 | print("sort n=6") 11 | print(system.time(sort(rnorm(10^6)))) 12 | print(system.time(sort(rnorm(10^6)))) 13 | print(system.time(sort(rnorm(10^6)))) 14 | print("sort n=7") 15 | print(system.time(sort(rnorm(10^7)))) 16 | print(system.time(sort(rnorm(10^7)))) 17 | print(system.time(sort(rnorm(10^7)))) 18 | # loess 19 | loess.me<-function(n) { 20 | print(paste("loess n=",as.character(n),sep="")) 21 | for (i in 1:5) { 22 | x<-rnorm(10^n); y<-rnorm(10^n); z<-rnorm(10^n) 23 | print(system.time(loess(z~x+y))) 24 | } 25 | } 26 | loess.me(3) 27 | loess.me(4) 28 | -------------------------------------------------------------------------------- /benchmarks/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | R benchmarks 4 | 5 | 6 | 7 | 8 |

R benchmarks

9 | 10 | Benchmarking R is not an easy task and there are many aspects so it is 11 | very hard to tell whether a given build of R or a given architecture 12 | is faster than another. Nonetheless some measures have been used in 13 | the past and although none of them is the ultimate measure, they are 14 | collected here. If you are aware of other benchmarks that should be 15 | included here, please let us know. 16 |

17 |

MASS

18 | The examples of CRAN packages, in particular MASS, are often used as a 19 | simple benchmark, because they consist of real problems and thus can 20 | cover at least some part of real use of R. For example thay can be run 21 | from $R_HOME using 22 |
 23 | (echo 'library(MASS);set.seed(1)' && cat library/MASS/R-ex/*) | time R --slave
 24 | 
25 | For future reference reproduce the resulting script based on 26 | VR_7.2-41 package here: MASS-ex.R 27 |

28 | Results for a rough reference: 29 | 30 | 32 | 34 |
R versionBLASOSMachineWall 31 | clockCPU time
R 2.7.0vecLibMac OS X 10.5Mac 33 | Pro 2.6GHz17.8s17.1s
35 |

36 |

R Benchmark

37 | Philippe Grosjean had created some benchmarks (based on benchmarks by 38 | Stephan Steinhaus and others) for multiple scientific packages. The 39 | original website is here, but it's very 41 | outdated and doesn't work with current R. Updated versions are here: 42 |

43 | R-benchmark-24.R - R benchmark 2.4, a 44 | modification of R benchmark 2.3 to work with current R and Matrix 45 | package 46 |

47 | R-benchmark-25.R - R benchmark 2.5, same 48 | as above but scaled to more realistic times on current hardware. For 49 | rough comparison the results on a Mac Pro 2.6GHz, Mac OS X 10.5.3 and 50 | R 2.7.0 (vecLib) are as follows: 51 |

 52 |    R Benchmark 2.5
 53 |    ===============
 54 | Number of times each test is run__________________________:  3
 55 | 
 56 |    I. Matrix calculation
 57 |    ---------------------
 58 | Creation, transp., deformation of a 2500x2500 matrix (sec):  1.10533333333333 
 59 | 2400x2400 normal distributed random matrix ^1000____ (sec):  0.986333333333334 
 60 | Sorting of 7,000,000 random values__________________ (sec):  1.044 
 61 | 2800x2800 cross-product matrix (b = a' * a)_________ (sec):  1.02333333333333 
 62 | Linear regr. over a 3000x3000 matrix (c = a \ b')___ (sec):  0.873666666666665 
 63 |                       --------------------------------------------
 64 |                  Trimmed geom. mean (2 extremes eliminated):  1.01760783769740 
 65 | 
 66 |    II. Matrix functions
 67 |    --------------------
 68 | FFT over 2,400,000 random values____________________ (sec):  1.175 
 69 | Eigenvalues of a 640x640 random matrix______________ (sec):  1.18100000000000 
 70 | Determinant of a 2500x2500 random matrix____________ (sec):  1.024 
 71 | Cholesky decomposition of a 3000x3000 matrix________ (sec):  1.22600000000000 
 72 | Inverse of a 1600x1600 random matrix________________ (sec):  1.04733333333333 
 73 |                       --------------------------------------------
 74 |                 Trimmed geom. mean (2 extremes eliminated):  1.13272433303719 
 75 | 
 76 |    III. Programmation
 77 |    ------------------
 78 | 3,500,000 Fibonacci numbers calculation (vector calc)(sec):  1.14866666666667 
 79 | Creation of a 3000x3000 Hilbert matrix (matrix calc) (sec):  0.984666666666667 
 80 | Grand common divisors of 400,000 pairs (recursion)__ (sec):  1.0960 
 81 | Creation of a 500x500 Toeplitz matrix (loops)_______ (sec):  1.13266666666667 
 82 | Escoufier's method on a 45x45 matrix (mixed)________ (sec):  1.03999999999999 
 83 |                       --------------------------------------------
 84 |                 Trimmed geom. mean (2 extremes eliminated):  1.08888497297556 
 85 | 
 86 | 
 87 | Total time for all 15 tests_________________________ (sec):  16.088 
 88 | Overall mean (sum of I, II and III trimmed means/3)_ (sec):  1.07868728433365 
 89 |                       --- End of test ---
 90 | 
91 | 92 |

Jan de Leeuw's quick test

93 | Jan de Leeuw is occasinally posting benchmark results for various 94 | cutting-edge compilers and hardware. Often they are based on this 95 | benchmark script (the original post is here). 97 | The script itself: bench.R 98 |

99 | Again results on the Mac Pro and R 2.7.0: 100 |

101 | [1] "hilbert n=500"
102 |    user  system elapsed 
103 |   0.312   0.143   0.340 
104 |    user  system elapsed 
105 |   0.270   0.141   0.284 
106 |    user  system elapsed 
107 |   0.270   0.142   0.284 
108 | [1] "hilbert n=1000"
109 |    user  system elapsed 
110 |   1.689   0.690   1.576 
111 |    user  system elapsed 
112 |   1.595   0.694   1.475 
113 |    user  system elapsed 
114 |   1.607   0.692   1.495 
115 | [1] "sort n=6"
116 |    user  system elapsed 
117 |   0.372   0.019   0.390 
118 |    user  system elapsed 
119 |   0.367   0.019   0.386 
120 |    user  system elapsed 
121 |   0.368   0.018   0.385 
122 | [1] "sort n=7"
123 |    user  system elapsed 
124 |   4.603   0.183   4.787 
125 |    user  system elapsed 
126 |   4.584   0.184   4.769 
127 |    user  system elapsed 
128 |   4.588   0.179   4.768 
129 | [1] "loess n=3"
130 |    user  system elapsed 
131 |   0.089   0.001   0.089 
132 |    user  system elapsed 
133 |   0.085   0.001   0.085 
134 |    user  system elapsed 
135 |   0.085   0.001   0.085 
136 |    user  system elapsed 
137 |   0.085   0.001   0.086 
138 |    user  system elapsed 
139 |   0.087   0.001   0.087 
140 | [1] "loess n=4"
141 |    user  system elapsed 
142 |   6.932   0.022   6.957 
143 |    user  system elapsed 
144 |   6.917   0.023   6.942 
145 |    user  system elapsed 
146 |   6.897   0.017   6.915 
147 |    user  system elapsed 
148 |   7.033   0.024   7.109 
149 |    user  system elapsed 
150 |   6.955   0.021   6.983 
151 | 
152 |

153 |

BLAS

154 | There were some BLAS-specific tests, but they should be mostly covered 155 | by the R benchmark tests these days. 156 |

157 |


158 |

159 | Note: be always careful when comparing benchmarks. It is 160 | important to look at the variance ot see if the results are reasonable 161 | (unfortunately R benchmark test above don't report it although it 162 | would be easy to modify it). In practice it often turns out that R 163 | behaves differently than in benchmarks simply because of the 164 | complexity and various components involved (we even had a case where 165 | an optimized BLAS was fasted on all benchmarks yet resulted in more 166 | than 10x slowed perofrmance on a real-world problem - unfortunately I 167 | cannot find that e-mail anymore - I'd like to add that test). 168 |

169 |


170 | Last modification: 2008/06/03 Simon Urbanek 171 | 172 | 173 | -------------------------------------------------------------------------------- /index.in.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | R for macOS Developers 14 | 15 | 16 | 17 | 18 | 19 |

R for macOS Developers

20 | 21 | This is the home for experimental binaries and documentation related to R for macOS. To learn more about the R software or download released versions, please visit www.r-project.org. 22 |

23 | 25 | 26 |

27 | Starting with R 4.0.0 we are building R using standard Apple tools (Xcode) and GNU Fortran (see tools for downloads and details). Since R 4.3.0 we maintain two binary builds: 28 |

    29 | 30 |
  • big-sur-x86_64 build supports legacy Intel Macs from macOS 11 (Big Sur) and higher
  • 31 |
  • big-sur-arm64 build supports arm64 Macs (M1+) from macOS 11 (Big Sur) and higher
  • 32 |
33 | We are no longer building binaries for macOS versions before 11 (as they are no longer supported by Apple). 34 | 35 |

Nightly Build Installers

36 | 37 | 38 | 39 |

Changes since R 4.3.0 Builds

40 | R 4.3.0 CRAN builds are using Xcode 14.2/14.3, macOS 11.3 SDK and targetting macOS 11 (Big Sur) and GNU Fortran 12.2. This is now true for both x86_64 and arm64 builds. The corresponding package types (.Platform$pkgType) are "mac.binary.big-sur-x86_64" for Intel and "mac.binary.big-sur-arm64" for Apple silicon Macs. 41 |

42 | R 4.5.0 CRAN builds use the same SDK and target, but updated GNU Fortran 14.2 compiler.

43 |

44 | Note that although M1 Macs can run the Intel build via Rosetta2 the native arm64 build is typically faster. All dependent static libraries are available in the bin directory. Please make sure you remove any modifications to build flags from your home (~/.R) since no custom compilers are used anymore. For more information about alternative OpenMP options (as in older version) see the openmp page of this site. 45 |

46 |

47 | 49 | 50 |

51 |

Index

52 | 66 | 67 | 68 |

Nightly builds for macOS

69 |

R framework

70 | 71 | 72 | 73 | 74 | 75 |

76 | The installer image (*.pkg) is packaged exactly the same way as the CRAN release of R (including the GUI) and it will update your R version (unless you use pkgutil - see instructions during installation and/or the "Multiple versions" section of the R Installation and Administration manual). 77 | 78 |

79 | Alternatively, you can use the tar-ball (*.tar.gz) in the table above. The tar-ball must be unpacked in the root directory using: 80 |

81 | $ tar fvxz R*.tar.gz -C / 82 |
83 |

84 | NOTE: The tar-ball does not contain the GUI (see below for a separate download), it only contains files under /Library/Frameworks/R.framework so either run it via /Library/Frameworks/R.framework/Resources/bin/R or create a convenience symlink if desired. The installer includes Tcl/Tk package which will install in /opt/R/arm64 or /opt/R/x86_64. It is optional (only needed for the tcltk R package) and can be unchecked at installation time.

85 |

86 | If you see any issues with the builds, please contact Simon Urbanek (the macOS maintainer of R) or report on the R-SIG-Mac mailing list.

87 |

88 | For old OS X El Capitan nightly builds of R 3.x.x please see the old OS X builds page. 89 |

90 |

Persistent "last-success" binaries

91 |

We have introduced "last-success" binaries which are always available (even if the nightly build fails) and intended mostly for CI/CD automated systems to install latest versions. The two locations are split by the build: high-sierra (x86_64) and big-sur (x86_64 and arm64). The xz tar balls contain only the R.framework directory of the final package, so must be unpacked into /Library/Frameworks. 92 |

93 | 94 |

Mac OS X GUI

95 | 96 | 97 | 98 |

To install, open the image and drag the R icon to your Applications folder. Alternatively the GUI can be run directly off that image without copying if you just want to test it. Build configurations with "64" suffix are 64-bit builds, all others are 32-bit (except for Debug). If you want to use both, rename one of them or place them in different directories. 99 | 100 | 101 |

Tools

102 | 103 | In order to compile R and R packages you will need Xcode Developer Tools and a Fortran compiler. For details and download, please read the Tools page. Latest builds are built using Xcode 14.3 and universal GNU Fortran 14.2 from here. 104 | 105 |

CRAN macOS master

106 | This is now the master repository for released R package binaries. If you have issues with other mirrors, try using https://mac.r-project.org/ as your mirror since it is updated first. 107 | 108 | 109 |

Apple silicon (aka arm64, aarch64, M1+)

110 | 111 | To avoid clashes with the Intel builds, we use separate tools and libraries for the arm64 builds of R on macOS. This is only relevant if you want to compile R packages yourself. All tools and libraries live in /opt/R/arm64 from bin and tools respectively. It is assumed that /usr/local is unsafe as it may contain Intel binaries which don't mix, therefore R will not try to use /usr/local unless a manual flags override is issued. However, it also means that it is safe to use our arm64 binaries without affecting your legacy Intel ecosystem. 112 | 113 |

114 | The big-sur build of R requires XQuartz 2.8.5 or higher to use the X11 components. 115 | 116 | 120 | 121 | 122 |

Legacy R

123 | The current build supports only macOS 11 (Big Sur) or higher. Older versions of macOS are not supported in binary form, but R can be compiled from sources for such legacy OS versions. Last released version for Mac OS X 10.4 (Tiger) was R 2.10.1, last release for Mac OS X 10.5 (Leopard) was R 2.15.3, last release for Mac OS X 10.11 (El Capitan) was R 3.6.3 and last release for macOS 10.13 (High Sierra) was R 4.2.3. 124 | 125 | 126 |

Other legacy binaries

127 | 128 | The following binaries are not maintained or supported by R-core and are provided without any guarantee and for convenience only (Mac OS X 10.4.4 or higher required). They match the binaries used on the CRAN binary build machine at the time, but are no longer used. 129 |
    130 |
  • GTK+ 2.24.17 framework - 64-bit build of GTK+ 2.24.17, necessary for binary R packages that use GTK+ version 2 (such as RGtk2+). R 3.0.0 and higher, Snow Leopard build
    131 | Download: GTK_2.24.17-X11.pkg (ca. 41MB)
      132 |
  • GTK+ 2.18.5 framework - universal build of GTK+ 2.18.5, necessary for binary R packages that use GTK+ version 2 (such as RGtk2+). R 2.10.0 - 2.15.3, Leopard build
    133 | Download: GTK_2.18.5-X11.pkg (ca. 58MB)
      134 |
  • RSwitch - a small GUI that allows you to switch between R versions quickly (if you have multiple versions of R framework installed).
    135 | Download: RSwitch-1.2.dmg (ca 67kB, universal, updated 2011/03/24 to support R 2.13.0 and up)
    136 | Sources: RSwitch-1.2.tar.gz (Xcode project and sources)
    137 |

    138 | NOTE: Bob Rudis is maintaining a new version of a tool which has RSwitch functionality and more - see 3rd party RSwitch replacement (NOT related to R-Foundation or CRAN!). 139 |

  • 140 |
141 |

142 | 143 |

Disclaimer

144 | 145 | All software is provided "as is" and any express or implied warranties, including, but but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the publisher, copyright owner or contributors be liable for any direct, indirect, incidental,special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /main.css: -------------------------------------------------------------------------------- 1 | @media screen and (min-width: 50rem) { 2 | body { 3 | margin: 0.25rem auto 1rem auto; 4 | padding: 1rem; 5 | max-width: 70rem; 6 | } 7 | } 8 | 9 | body, div, table, tt, td, thead, tbody, tr, span, a { 10 | font-size: 11pt; 11 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 12 | } 13 | 14 | body { 15 | aSCROLLBAR-TRACK-COLOR: #3188ff; 16 | aSCROLLBAR-3DLIGHT-COLOR: #d2f2ff; 17 | SCROLLBAR-HIGHLIGHT-COLOR: #000000; 18 | SCROLLBAR-ARROW-COLOR: #d2f2ff; 19 | SCROLLBAR-DARKSHADOW-COLOR: #3188ff; 20 | SCROLLBAR-BASE-COLOR: #000000; 21 | } 22 | 23 | a:link, 24 | a:visited, 25 | a:active, 26 | a:hover { 27 | text-decoration: none; 28 | font-weight: bold; 29 | color: #00c; 30 | } 31 | 32 | a:hover { 33 | color: #66f; 34 | } 35 | 36 | #SUBTXT { 37 | font-size: 10pt; 38 | } 39 | 40 | #MIC { 41 | font-size: 4pt; 42 | } 43 | 44 | #H1 { 45 | font-size: 12pt; 46 | font-weight: bold; 47 | } 48 | 49 | #H2 { 50 | font-size: 14pt; 51 | font-weight: bold; 52 | } 53 | 54 | ALL, p, td { 55 | font-size: 11pt; 56 | } 57 | 58 | th { 59 | font-size: 12pt; 60 | font-weight: bold; 61 | } 62 | 63 | pre, 64 | code { 65 | font-family: SFMono-Regular, Menlo, Monaco, "Courier New", monospace; 66 | } 67 | 68 | tt { 69 | color: #000080; 70 | font-family: SFMono-Regular, Menlo, Monaco, "Courier New", monospace; 71 | } 72 | 73 | .code-block-indent { 74 | padding-top:1rem; 75 | padding-left:1rem; 76 | } 77 | 78 | #RC { 79 | background-color: #e0e0ff; 80 | border: 2px solid #c0c0ff; 81 | padding: 10px; 82 | margin: 7px; 83 | } 84 | 85 | .important { 86 | background: #ffe0e0; 87 | padding: 1rem; 88 | border-radius: 5px; 89 | } 90 | 91 | .noborder, 92 | .noborder table, 93 | .noborder thead, 94 | .noborder tbody, 95 | .noborder th, 96 | .noborder tr, 97 | .noborder th, 98 | .noborder td { 99 | border: none; 100 | } 101 | 102 | .build, 103 | .build table, 104 | .build thead, 105 | .build tbody, 106 | .build th, 107 | .build tr, 108 | .build th, 109 | .build td { 110 | padding: 3px; 111 | border-spacing: 0; 112 | border-collapse: collapse; 113 | } 114 | 115 | .build table { 116 | table-layout: fixed; 117 | background-color: #ffffe0; 118 | } 119 | 120 | .build table, 121 | .build thead, 122 | .build tbody, 123 | .build tr { 124 | table-layout: auto; 125 | margin: auto; 126 | width: 100%; 127 | } 128 | 129 | .build .log table, 130 | .build .log thead, 131 | .build .log tbody, 132 | .build .log tr { 133 | word-wrap: break-word; 134 | white-space: pre-wrap; 135 | width: 1200; 136 | } 137 | .log pre { 138 | white-space: pre-wrap; 139 | } 140 | 141 | .build thead, 142 | .build thead + th { 143 | background-color: #c8c8ff; 144 | } 145 | 146 | .build .inter, .warn { 147 | background-color: #ffe0e0; 148 | color: #400; 149 | } 150 | 151 | .build .alt-1 { 152 | vertical-align: bottom; 153 | background-color: #ffffa0; 154 | } 155 | 156 | .build .alt-2 { 157 | vertical-align: bottom; 158 | background-color: #ffffe0; 159 | } 160 | 161 | .build .err { 162 | color:#400; 163 | } 164 | 165 | .gui, 166 | .gui table, 167 | .gui thead, 168 | .gui tbody, 169 | .gui th, 170 | .gui tr, 171 | .gui th { 172 | padding: 3px; 173 | border-spacing: 0; 174 | border-collapse: collapse; 175 | } 176 | 177 | .gui td { 178 | padding: 6px; 179 | } 180 | 181 | .gui table { 182 | table-layout: fixed; 183 | background-color: #ffffe0; 184 | } 185 | 186 | .gui table, 187 | .gui thead, 188 | .gui tbody, 189 | .gui tr { 190 | table-layout: auto; 191 | margin: auto; 192 | width: 100%; 193 | } 194 | 195 | .gui thead, 196 | .gui thead + th { 197 | background-color: #c8c8ff; 198 | } 199 | 200 | .gui .alt-1 { 201 | vertical-align: top; 202 | background-color: #ffffa0; 203 | } 204 | 205 | .gui .alt-2 { 206 | vertical-align: top; 207 | background-color: #ffffe0; 208 | } 209 | 210 | @media (prefers-color-scheme: dark) { 211 | body { 212 | background-color: black; 213 | color: #eee; 214 | } 215 | 216 | b, i { 217 | color: #fff; 218 | } 219 | code, tt { 220 | color: #8080ff; 221 | } 222 | pre { 223 | color: #ffffd0; 224 | } 225 | a:link, 226 | a:visited, 227 | a:active { 228 | color: #aaf; 229 | } 230 | a:hover { 231 | color: #88f; 232 | } 233 | 234 | .build thead, .build thead + th, .gui thead, .gui thread + th { 235 | background-color: #004; 236 | } 237 | 238 | .build .alt-1, .gui .alt-1 { 239 | vertical-align: bottom; 240 | background-color: #111; 241 | } 242 | 243 | .build .alt-2, .gui .alt-2 { 244 | vertical-align: bottom; 245 | background-color: #333; 246 | } 247 | 248 | .build .inter, .gui .inter, .warn { 249 | background-color: #200; 250 | color: #fcc; 251 | } 252 | 253 | .build .err { 254 | color:#f44; 255 | } 256 | 257 | h1, h2, h3 { 258 | color: #ff8; 259 | } 260 | } 261 | -------------------------------------------------------------------------------- /old.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | R for macOS Developers - Old Builds 15 | 16 | 17 | 18 | 19 | 20 |

R for macOS Developers - Old Builds

21 | 22 |

23 | All software on this page is strictly experimental and subject to acceptance of the supplied R license agreement and the disclaimer at the end of the page. 24 | 25 | 26 | 27 |

Nightly builds for Mac OS X 10.11 (El Capitan)

28 | 29 | This page lists older nighlty binaries that are no longer updated but may be of interest for debugging and other purposes. 30 | 31 |

R framework

32 | 33 | 34 | 35 | 37 | 39 | 41 |
BuildOSDateStatusDownload
R-3.4-branch
3.4.4 Patched
(2018/03/19, r75535) 36 |
el-capitanDec 22 2018x86_64: OK (log)
Package: OK

R-3.4-branch-el-capitan-sa-x86_64.tar.gz (64Mb)

R-3.4-branch-el-capitan-signed.pkg (74Mb, installer incl. GUI)
R-3.5-branch
3.5.3 Patched
(2019/03/11, r77192) 38 |
el-capitanDec 12 2019x86_64: OK (log)
Package: OK

R-3.5-branch-el-capitan-sa-x86_64.tar.gz (65Mb)

R-3.5-branch-el-capitan-signed.pkg (75Mb, installer incl. GUI)
R-3.6-branch
3.6.3 Patched
(2020/04/28, r80465) 40 |
el-capitanJun 8 22:30x86_64: OK (log)
Package: OK

R-3.6-branch-el-capitan-sa-x86_64.tar.gz (67Mb)

R-3.6-branch-el-capitan-signed.pkg (78Mb, installer incl. GUI)
42 |

43 | The installer image (*.pkg) is packaged exactly the same way as the CRAN release of R (including the GUI) and it will update your R version (unless you use pkgutil - see instructions during installation and/or the "Multiple versions" section of the R Installation and Administration manual). 44 | 45 |

46 | Alternatively, you can use the tar-ball (*.tar.gz) in the table above. The tar-ball must be unpacked in the root directory using: 47 |

48 | $ tar fvxz R*.tar.gz -C / 49 |
50 |

51 | NOTE: The tar-ball does not contain the GUI (see below for a separate download). The installer includes Tcl/Tk package which will install in /usr/local. It is optional (only needed for the tcltk R package) and can be unchecked at installation time. 52 |

53 | If you see any issues with the builds, please contact Simon Urbanek (the macOS maintainer of R) or report on the R-SIG-Mac mailing list. 54 |

55 | 56 | 57 |

Mac OS X GUI

58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
VersionBuildDownload
Mac OS X GUI rev. 7541 for R 3.4.xel-capitan-Debug.dmgR-GUI-7541-3.4-el-capitan-Debug.dmg
Mac OS X GUI rev. 7541 for R 3.4.xel-capitan-Release.dmgR-GUI-7541-3.4-el-capitan-Release.dmg
Mac OS X GUI rev. 7649 for R 3.5.xel-capitan-Debug.dmgR-GUI-7649-3.5-el-capitan-Debug.dmg
Mac OS X GUI rev. 7649 for R 3.5.xel-capitan-Release.dmgR-GUI-7649-3.5-el-capitan-Release.dmg
Mac OS X GUI rev. 7969 for R 3.6.xel-capitan-Debug.dmgR-GUI-7969-3.6-el-capitan-Debug.dmg
Mac OS X GUI rev. 7969 for R 3.6.xel-capitan-Release.dmgR-GUI-7969-3.6-el-capitan-Release.dmg
68 | 69 | 70 |

To install, open the image and drag the R icon to your Applications folder. Alternatively the GUI can be run directly off that image without copying if you just want to test it. Build configurations with "64" suffix are 64-bit builds, all others are 32-bit (except for Debug). If you want to use both, rename one of them or place them in different directories. 71 | 72 | 78 | 79 |

CRAN macOS master

80 | This is now the master repository for released R package binaries. If you have issues with other mirrors, try using https://mac.r-project.org/ as your mirror as it is updated first. 81 | 82 | 83 |

Other binaries

84 | 85 | The following binaries are not maintained or supported by R-core and are provided without any guarantee and for convenience only (Mac OS X 10.4.4 or higher required). They match the binaries used on the CRAN binary build machine and thus are recommended for use with CRAN R package binaries. 86 |
    87 |
  • GTK+ 2.24.17 framework - 64-bit build of GTK+ 2.24.17, necessary for binary R packages that use GTK+ version 2 (such as RGtk2+). R 3.0.0 and higher, Snow Leopard build
    88 | Download: GTK_2.24.17-X11.pkg (ca. 41MB)
      89 |
  • GTK+ 2.18.5 framework - universal build of GTK+ 2.18.5, necessary for binary R packages that use GTK+ version 2 (such as RGtk2+). R 2.10.0 - 2.15.3, Leopard build
    90 | Download: GTK_2.18.5-X11.pkg (ca. 58MB)
      91 |
  • RSwitch - a small GUI that allows you to switch between R versions quickly (if you have multiple versions of R framework installed).
    92 | Download: RSwitch-1.2.dmg (ca 67kB, universal, updated 2011/03/24 to support R 2.13.0 and up)
    93 | Sources: RSwitch-1.2.tar.gz (Xcode project and sources)
    94 |

    95 | NOTE: Bob Rudis is maintaining a new version of a tool which has RSwitch functionality and more - see 3rd party RSwitch replacement (NOT related to R-Foundation or CRAN!). 96 |

  • 97 |
98 |

99 | 100 |

Disclaimer

101 | 102 | All software is provided "as is" and any express or implied warranties, including, but but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the publisher, copyright owner or contributors be liable for any direct, indirect, incidental,special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /openmp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | OpenMP on macOS with Xcode tools 4 | 5 | 6 | 7 |

OpenMP on macOS with Xcode tools

8 |

9 |

10 | Warning! Everything described on this page is strictly 11 | experimental and not officially supported by Apple. 12 | It may break at any time. The information is 13 | provided in the hope of being useful to some tech-savvy 14 | people. It is not intended for the regular R user. 15 |
16 |

17 | For those impatient, skip to how to enable OpenMP in 18 | packages. 19 |

20 |

OpenMP support in Xcode

21 |

22 | Apple has explicitly disabled OpenMP support in compilers that 23 | they ship in Xcode: 24 | 25 |

   $ clang -c omp.c -fopenmp
 26 |    clang: error: unsupported option '-fopenmp'
27 | 28 | even though clang had OpenMP support for quite a long 29 | time now (great thanks to the folks at Intel providing their 30 | library as open source!). In fact, the clang compiler in Xcode 31 | can generate all the necessary code for OpenMP. It can be tricked 32 | into performing its designed function by using 33 | -Xclang -fopenmp flags. 34 |

35 |

36 | The unfortunate part about this is that Apple is not shipping the 37 | necesssary libomp.dylib run-time library needed for 38 | OpenMP support. Fortunately, some clever folks were able to 39 | 40 | match the versions so we can build the binaries 41 | that correspond to the clang version used. It is 42 | sometimes possible to use a more recent version of the runtime 43 | than the version of Apple clang. A notable exception is Xcode 16.3 44 | (Apple clang 1700+) which is incompatible with previous versions. 45 | 46 |

OpenMP run-time downloads

47 | The following are links to libomp OpenMP run-time built 48 | from official LLVM release sources using Xcode compilers. They 49 | are signed and support macOS 10.13 (High Sierra) and higher 50 | (x86_64) or macOS 11 (Big Sur) or higher (arm64). All 51 | tar-balls contain the system tree usr/local/lib 52 | and usr/local/include so the recommended installation is to type in Terminal: 53 |
 54 |     curl -O https://mac.r-project.org/openmp/openmp-17.0.6-darwin20-Release.tar.gz
 55 |     sudo tar fvxz openmp-17.0.6-darwin20-Release.tar.gz -C /
56 |

NOTE: Do NOT use a browser to download the tar balls, because it will quarantine the downloaded file and its contents. Modern macOS security doesn't allow the use of quarantined libraries so you'd have to remove the quarantine first with xattr -c if you do so.

57 |

The contained set of files is the same in all tar balls 58 | (except 19.1.0 which adds ompx.h) 59 |

 60 |     usr/local/lib/libomp.dylib
 61 |     usr/local/include/ompt.h
 62 |     usr/local/include/omp.h
 63 |     usr/local/include/omp-tools.h
64 | so you can simply remove those to uninstall. Note that any package 65 | you compile against libomp.dylib will need that run-time 66 | so you have to ship it with your package or have users install it. 67 | Note, however, that CRAN R ships with libomp.dylib 68 | from here in $R_HOME/lib (corresponding to the Xcode 69 | version used on CRAN) so if you link against that location (recommended) 70 | you don't have to ship it if users are using CRAN binaries of R 71 | as long as you make sure you use a compatible run-time. 72 |

73 | You can verify the signature in the library via codetool (see below). 74 |

75 | 76 | 77 | 78 | 79 | 81 | 82 | 83 | 84 | 86 | 87 | 88 | 89 | 91 | 92 | 93 | 94 | 96 | 98 | 99 | 101 | 102 | 103 | 104 | 106 | 107 | 108 | 109 | 111 | 112 | 113 | 114 | 116 | 117 | 118 | 124 | 125 | 127 | 128 | 129 | 130 | 131 | 133 | 134 | 135 | 136 | 138 | 139 | 140 | 141 | 143 | 144 | 145 | 146 | 148 | 149 | 150 |
BuildDownloadSHA1 checksum
LLVM 19.1.0
Xcode 16.3+ (Apple clang 1700.x)
openmp-19.1.0-darwin20-Release.tar.gz (Release)
80 | openmp-19.1.0-darwin20-Debug.tar.gz (Debug)
42a22fa5852bafc23ab31241d064f9be9aab8a0d
d4b0a4166ebaa01ea5d086454fd4e42d791db235
LLVM 18.1.8
 
openmp-18.1.8-darwin20-Release.tar.gz (Release)
85 | openmp-18.1.8-darwin20-Debug.tar.gz (Debug)
b8e7b79d265310ba12672e117df48ccfd9ce0366
115629b4ca79af7155a0bbe76932e7a2c9f3c313
LLVM 17.0.6
Xcode 16.0-16.2 (Apple clang 1600.x)
openmp-17.0.6-darwin20-Release.tar.gz (Release)
90 | openmp-17.0.6-darwin20-Debug.tar.gz (Debug)
a89cab4e763025f03a5d12a93a609ff771ad209c
d74afdd50cd1fb4d17bdb45c2467ffeea530b1a2
LLVM 16.0.4
Xcode 15.x (Apple clang 1500.x)
openmp-16.0.4-darwin20-Release.tar.gz (Release)
95 | openmp-16.0.4-darwin20-Debug.tar.gz (Debug)
591136d3c1cc26f3a21f1202a652be911bf1a2ad
1253f7157f590804031095440ffd80aac016b101
97 |
LLVM 15.0.7
Xcode 14.3.x (Apple clang 1403.x)
openmp-15.0.7-darwin20-Release.tar.gz (Release)
100 | openmp-15.0.7-darwin20-Debug.tar.gz (Debug)
31f0be747101b2bdce3c01b4d1c9041959bb3b27
17728c6592d341400bb6076add9c2524a95305b7
LLVM 14.0.6
Xcode 14.0-14.2 (Apple clang 1400.x)
openmp-14.0.6-darwin20-Release.tar.gz (Release)
105 | openmp-14.0.6-darwin20-Debug.tar.gz (Debug)
19912991431ecf032f037b6e8aea19dbd490f1ba
6b96a15db9329ea6f605449a630575036fa20aae
LLVM 13.0.0
Xcode 13.3-13.4.1 (Apple clang 1316.x)
openmp-13.0.0-darwin21-Release.tar.gz (Release)
110 | openmp-13.0.0-darwin21-Debug.tar.gz (Debug)
47af4cb0d1f3554969f2ec9dee450d728ea30024
f6f8f1f49c02d5ec0729b56ddc7eaf51e7f04714
LLVM 12.0.1
Xcode 13.0-13.2.1 (Apple clang 1300.x)
openmp-12.0.1-darwin20-Release.tar.gz (Release)
115 | openmp-12.0.1-darwin20-Debug.tar.gz (Debug)
4fab53ccc420ab882119256470af15c210d19e5e
58b4323e7933e12cba5c2996b4c9ef27567c41d9
LLVM 11.0.1 (+M1 patch)
Xcode 12.5 (Apple clang 1205.x)
openmp-11.0.1-darwin20-Release.tar.gz (Release)
126 | openmp-11.0.1-darwin20-Debug.tar.gz (Debug)
0dcd19042f01c4f552914e2cf7a53186de397aa1
65e83ea667c72bbe44fea699776564d2f03a080f
(All binaries above include both arm64 and x86_64 and require macOS 11 or higher. Binaries below require macOS 10.13 or higher and are Intel-only)
LLVM 10.0.0
Xcode 12.0-12.4 (Apple clang 1200.x)
openmp-10.0.0-darwin17-Release.tar.gz (Release)
132 | openmp-10.0.0-darwin17-Debug.tar.gz (Debug)
9bf16a64ab747528c5de7005a1ea1a9e318b3cf0
d4508d3f0c2952c3f984393b088e0b4beab33b58
LLVM 9.0.1
Xcode 11.4-11.7 (Apple clang 1103.x)
openmp-9.0.1-darwin17-Release.tar.gz (Release)
137 | openmp-9.0.1-darwin17-Debug.tar.gz (Debug)
e5bd8501a3f957b4babe27b0a266d4fa15dbc23f
c4c8491631504fb060f7c25ec14324d02d617d5b
LLVM 8.0.1
Xcode 11.0-11.3.1 (Apple clang 1100.x)
openmp-8.0.1-darwin17-Release.tar.gz (Release)
142 | openmp-8.0.1-darwin17-Debug.tar.gz (Debug)
e4612bfcb1bf520bf22844f7db764cadb7577c28
d6c83918b28405d43950d4b864ca8d1687eed4d1
LLVM 7.1.0
Xcode 10.2-10.3 (Apple clang 1001.x)
openmp-7.1.0-darwin17-Release.tar.gz (Release)
147 | openmp-7.1.0-darwin17-Debug.tar.gz (Debug)
6891ff6f83f2ed83eeed42160de819b50cf643cd
34456adde62b9a1047f906e1d7f54990a1c15a34
151 | 152 |

How to enable OpenMP in packages

153 |
  • Download the libomp run-time corresponding to the 154 | Xcode version you use from the links above
  • 155 |
  • add -Xclang -fopenmp to CPPFLAGS, 156 | add -lomp to LIBS
  • 157 |
158 | How you do the latter depends on the package, but if the package does 159 | not set these environment variables itself, you can try 160 |
161 |     PKG_CPPFLAGS='-Xclang -fopenmp' PKG_LIBS=-lomp R CMD INSTALL myPackage
162 | 163 | If that doesn't work, please consult the package's documentation, and 164 | liaise with its maintainer. 165 | 166 | It is also possible to add those flags globally by 167 | adding the following to ~/.R/Makevars: 168 |
169 |     CPPFLAGS += -Xclang -fopenmp
170 |     LDFLAGS += -lomp
171 | 172 | but be very careful when doing this, always check 173 | your ~/.R/Makevars whenever you upgrade R, macOS or Xcode! 174 | 175 |

Note: If you are using CRAN R binary and there is a potential 176 | conflict between its run-time and your run-time (which is generally 177 | a bad idea!) then you can force the use of your binary by 178 | replacing -lomp above with /usr/local/lib/libomp.dylib 179 | (note that lack of -l!).

180 | 181 |

Side notes

182 | It may be possible in principle to build static version of the run-time. 183 | That can be done via -DLIBOMP_ENABLE_SHARED=OFF, but has not been 184 | tested. There is a potential for chaos when more OMP run-times get 185 | loaded into one process as they may clash, in fact it is strongly 186 | discouraged to use static run-time, because only one version the 187 | run-time may be loaded into a process. That is why R package are 188 | encouraged to use the common run-time supplied with CRAN R 189 | binaries instead of shipping their own (see above). 190 |

191 | Another interesting test would be to 192 | try -DLIBOMP_FORTRAN_MODULES=ON and see which versions 193 | are compatible with the GNU Fortran used in R. We are 194 | intentionally removing the gomp symlink from the binary 195 | so that iomp and gomp don't conflict. Future R 196 | releases may use LLVM-based Fortran complier with OpenMP support. 197 | 198 |

License and sources

199 | All sources were obtained directly from the 200 | LLVM releases 201 | and copies are also available in the src 202 | directory (including the build script). See LICENSE.txt 203 | in the sources for the corresponding license and 204 | https://openmp.llvm.org/ 205 | for details on the OpenMP run-time. 206 | 207 |

Verifying code signatures

208 | You can use codetools to verify the signature, for example you should see: 209 |
210 | $ codesign -d -vv /usr/local/lib/libomp.dylib 
211 | Executable=/usr/local/lib/libomp.dylib
212 | Identifier=libomp
213 | Format=Mach-O universal (x86_64 arm64)
214 | CodeDirectory v=20400 size=5514 flags=0x0(none) hashes=167+2 location=embedded
215 | Signature size=8927
216 | Authority=Developer ID Application: Simon Urbanek (VZLD955F6P)
217 | Authority=Developer ID Certification Authority
218 | Authority=Apple Root CA
219 | Timestamp=11/11/2021 at 1:29:04 PM
220 | Info.plist=not bound
221 | TeamIdentifier=VZLD955F6P
222 | Sealed Resources=none
223 | Internal requirements count=1 size=168
224 | 
225 | 226 |

Acknowledgements

227 | Thanks to John Clayden, Kevin Ushey and others who contributed to the discussion and testing. 228 | 229 |

Trademark notices

230 |
    231 |
  • The OpenMP name and the OpenMP logo are registered trademarks of 232 | the OpenMP Architecture Review Board.
  • 233 |
  • Intel is a trademark of Intel Corporation in the U.S. and/or other countries.
  • 234 |
  • Apple, Xcode and macOS are trademarks of Apple Inc., registered in the U.S. and other countries.
  • 235 |
236 |

237 | Last modified on 2025/04/23 by Simon Urbanek 238 | 239 | 240 | -------------------------------------------------------------------------------- /openmp/openmp-10.0.0-darwin17-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-10.0.0-darwin17-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-10.0.0-darwin17-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-10.0.0-darwin17-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-11.0.1-darwin20-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-11.0.1-darwin20-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-11.0.1-darwin20-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-11.0.1-darwin20-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-12.0.1-darwin20-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-12.0.1-darwin20-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-12.0.1-darwin20-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-12.0.1-darwin20-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-13.0.0-darwin21-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-13.0.0-darwin21-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-13.0.0-darwin21-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-13.0.0-darwin21-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-14.0.6-darwin20-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-14.0.6-darwin20-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-14.0.6-darwin20-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-14.0.6-darwin20-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-15.0.7-darwin20-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-15.0.7-darwin20-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-15.0.7-darwin20-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-15.0.7-darwin20-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-16.0.4-darwin20-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-16.0.4-darwin20-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-16.0.4-darwin20-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-16.0.4-darwin20-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-17.0.6-darwin20-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-17.0.6-darwin20-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-17.0.6-darwin20-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-17.0.6-darwin20-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-18.1.8-darwin20-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-18.1.8-darwin20-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-18.1.8-darwin20-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-18.1.8-darwin20-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-7.1.0-darwin17-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-7.1.0-darwin17-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-7.1.0-darwin17-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-7.1.0-darwin17-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-8.0.1-darwin17-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-8.0.1-darwin17-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-8.0.1-darwin17-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-8.0.1-darwin17-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-9.0.1-darwin17-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-9.0.1-darwin17-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-9.0.1-darwin17-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-9.0.1-darwin17-Release.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-96efe90-darwin20-Debug.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-96efe90-darwin20-Debug.tar.gz -------------------------------------------------------------------------------- /openmp/openmp-96efe90-darwin20-Release.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/openmp-96efe90-darwin20-Release.tar.gz -------------------------------------------------------------------------------- /openmp/src/bld: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$1" ]; then 4 | echo '' 5 | echo " Usage: $0 []" 6 | echo '' 7 | echo " Example: $0 17.0.6" 8 | echo '' 9 | echo ' Expects openmp-.tar.xz and cmake-.tar.xz' 10 | echo ' If not present the version is assumed to be a release tag and I will try to downoad them.' 11 | echo '' 12 | exit 1 13 | fi 14 | 15 | set -e 16 | 17 | ARCH="$2" 18 | VER="$1" 19 | 20 | if [ ! -e openmp-${VER}.src.tar.xz ]; then 21 | echo NOTE: cannot find openmp-${VER}.src.tar.xz - trying to download 22 | curl -sSfLO https://github.com/llvm/llvm-project/releases/download/llvmorg-${VER}/openmp-${VER}.src.tar.xz 23 | fi 24 | 25 | TAR="openmp-${VER}.src.tar.xz" 26 | BASE="`echo $TAR | sed 's:\.tar.*::'`" 27 | echo $TAR '->' $BASE 28 | if [ -z "$BASE" ]; then 29 | echo "ERROR: can't figure out the base" 30 | exit 1 31 | fi 32 | 33 | if [ ! -e "$BASE" -a -e "$TAR" ]; then 34 | tar fxz "$TAR" 35 | fi 36 | if [ ! -e "$BASE" ]; then 37 | echo "ERROR: extract expected at $BASE but it's not ..." 38 | exit 1 39 | fi 40 | 41 | if [ ! -e "$BASE/cmake/ExtendPath.cmake" ]; then 42 | echo "INFO: copying missing cmake files" 43 | ## annoying as hell, but we have no choice but to add the missing cmake files 44 | if [ ! -e cmake-${VER}.src.tar.xz ]; then 45 | echo NOTE: cannot find cmake-${VER}.src.tar.xz - trying to download 46 | curl -sSfLO https://github.com/llvm/llvm-project/releases/download/llvmorg-${VER}/cmake-${VER}.src.tar.xz 47 | fi 48 | if [ ! -d cmake-${VER}.src ]; then 49 | tar fxz cmake-${VER}.src.tar.xz 50 | fi 51 | cp cmake-${VER}.src/Modules/* $BASE/cmake/ 52 | fi 53 | 54 | if [ -n "$ARCH" ]; then 55 | CMAKEARCH=-DCMAKE_OSX_ARCHITECTURES=$ARCH 56 | else 57 | for arch in x86_64 arm64; do 58 | if [ ! -e dst-Release-$arch -o ! -e dst-Debug-$arch ]; then 59 | sh bld $VER $arch 60 | fi 61 | done 62 | for i in Release Debug; do 63 | rm -rf dst-$i 64 | rsync -a dst-$i-arm64/ dst-$i/ 65 | rm dst-$i/usr/local/lib/* 66 | lipo -create -arch arm64 dst-$i-arm64/usr/local/lib/libomp.dylib \ 67 | -arch x86_64 dst-$i-x86_64/usr/local/lib/libomp.dylib \ 68 | -output dst-$i/usr/local/lib/libomp.dylib 69 | codesign -s Dev -f --timestamp dst-$i/usr/local/lib/libomp.dylib 70 | ( cd dst-$i && tar fcz ../openmp-${VER}-darwin20-$i.tar.gz --uid 0 --gid 80 usr/local/include/* usr/local/lib/* ) 71 | tar fvtz openmp-${VER}-darwin20-$i.tar.gz 72 | done 73 | file dst-Release/usr/local/lib/* dst-Debug/usr/local/lib/* 74 | exit 0 75 | fi 76 | 77 | set -v 78 | 79 | export MACOSX_DEPLOYMENT_TARGET=11.0 80 | export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk 81 | 82 | cmakedir=/Applications/CMake.app 83 | 84 | rm -rf "${BASE}/build" 85 | mkdir -p "${BASE}/build" 86 | (cd "${BASE}/build" && $cmakedir/Contents/bin/cmake $CMAKEARCH -DLLVM_INCLUDE_BENCHMARKS=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .. && make -j8 install DESTDIR=dst-Release-$ARCH && \ 87 | make clean && \ 88 | /Applications/CMake.app/Contents/bin/cmake $CMAKEARCH -DLLVM_INCLUDE_BENCHMARKS=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug .. && make -j8 install DESTDIR=dst-Debug-$ARCH ) 89 | 90 | for lib in `ls $BASE/build/dst-*$ARCH/usr/local/lib/libomp.dylib`; do 91 | install_name_tool -id /usr/local/lib/libomp.dylib $lib 92 | done 93 | 94 | for i in Release Debug; do 95 | DST="dst-$i-$ARCH" 96 | rm -rf "$DST" 97 | mkdir -p $DST/usr/local/include $DST/usr/local/lib 98 | cp -p $BASE/build/dst-$i-$ARCH/usr/local/include/* $DST/usr/local/include/ 99 | cp -p $BASE/build/dst-$i-$ARCH/usr/local/lib/libomp.dylib $DST/usr/local/lib/ 100 | done 101 | 102 | otool -L dst-*$ARCH/usr/local/lib/libomp.dylib 103 | -------------------------------------------------------------------------------- /openmp/src/cmake-fix.patch: -------------------------------------------------------------------------------- 1 | diff -ru openmp-16.0.4.src/runtime/src/CMakeLists.txt openmp-16.0.4-1/runtime/src/CMakeLists.txt 2 | --- openmp-16.0.4.src/runtime/src/CMakeLists.txt 2023-05-17 17:03:06 3 | +++ openmp-16.0.4-1/runtime/src/CMakeLists.txt 2023-10-09 15:08:53 4 | @@ -8,7 +8,7 @@ 5 | #//===----------------------------------------------------------------------===// 6 | # 7 | 8 | -include(ExtendPath) 9 | +# include(ExtendPath) 10 | 11 | # Configure omp.h, kmp_config.h and omp-tools.h if necessary 12 | configure_file(${LIBOMP_INC_DIR}/omp.h.var omp.h @ONLY) 13 | @@ -368,7 +368,7 @@ 14 | foreach(alias IN LISTS LIBOMP_ALIASES) 15 | install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E copy \"${LIBOMP_LIB_FILE}\" 16 | \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY \"${CMAKE_INSTALL_FULL_BINDIR}\")") 17 | - extend_path(outdir "${CMAKE_INSTALL_PREFIX}" "${OPENMP_INSTALL_LIBDIR}") 18 | + set(outdir "${CMAKE_INSTALL_PREFIX}/lib") 19 | install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E copy \"${LIBOMP_IMP_LIB_FILE}\" 20 | \"${alias}${CMAKE_STATIC_LIBRARY_SUFFIX}\" WORKING_DIRECTORY \"${outdir}\")") 21 | endforeach() 22 | @@ -380,7 +380,7 @@ 23 | # Create aliases (symlinks) of the library for backwards compatibility 24 | set(LIBOMP_ALIASES "libgomp;libiomp5") 25 | foreach(alias IN LISTS LIBOMP_ALIASES) 26 | - extend_path(outdir "${CMAKE_INSTALL_PREFIX}" "${OPENMP_INSTALL_LIBDIR}") 27 | + set(outdir "${CMAKE_INSTALL_PREFIX}/lib") 28 | install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\" 29 | \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY 30 | \"\$ENV{DESTDIR}${outdir}\")") 31 | Only in openmp-16.0.4-1/runtime/src: CMakeLists.txt~ 32 | -------------------------------------------------------------------------------- /openmp/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | Sources for LLVM OpenMP run-time 3 | 4 |

Sources for LLVM OpenMP run-time

5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
bld3354Nov 9 17:33
cmake-17.0.6.src.tar.xz8712Nov 9 17:34
cmake-18.1.8.src.tar.xz8708Nov 9 17:33
cmake-19.1.0.src.tar.xz9300Jan 30 20:00
cmake-fix.patch1662Oct 8 2023
openmp-10.0.0.src.tar.xz959016Apr 30 2020
openmp-11.0.1.src.patch1424Feb 14 2021
openmp-11.0.1.src.tar.xz971332Feb 14 2021
openmp-12.0.1.src.tar.xz1081308Nov 10 2021
openmp-13.0.0.src.tar.xz1139488Nov 10 2021
openmp-14.0.6.src.tar.xz1205476Feb 5 2023
openmp-15.0.7.src.tar.xz1184544Oct 8 2023
openmp-16.0.4.src.tar.xz1278420Oct 8 2023
openmp-17.0.6.src.tar.xz1273412Nov 9 17:34
openmp-18.1.8.src.tar.xz1320200Nov 9 17:34
openmp-19.1.0.src.tar.xz1089828Jan 30 19:59
openmp-7.1.0.src.tar.xz909320Apr 30 2020
openmp-8.0.1.src.tar.xz933320Apr 30 2020
openmp-9.0.1.src.tar.xz938360Apr 30 2020
26 |

27 | 28 | 29 | -------------------------------------------------------------------------------- /openmp/src/openmp-10.0.0.src.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/src/openmp-10.0.0.src.tar.xz -------------------------------------------------------------------------------- /openmp/src/openmp-11.0.1.src.patch: -------------------------------------------------------------------------------- 1 | Only in openmp-11.0.1.src-1/runtime: exports 2 | diff -ru openmp-11.0.1.src/runtime/src/z_Linux_asm.S openmp-11.0.1.src-1/runtime/src/z_Linux_asm.S 3 | --- openmp-11.0.1.src/runtime/src/z_Linux_asm.S 2020-12-19 08:57:38.000000000 +1300 4 | +++ openmp-11.0.1.src-1/runtime/src/z_Linux_asm.S 2021-02-15 09:30:34.000000000 +1300 5 | @@ -1433,13 +1433,8 @@ 6 | add 12, 0, 12 7 | neg 12, 12 8 | 9 | -// We need to make sure that the stack frame stays aligned (to 16 bytes, except 10 | -// under the BG/Q CNK, where it must be to 32 bytes). 11 | -# if KMP_OS_CNK 12 | - li 0, -32 13 | -# else 14 | +// We need to make sure that the stack frame stays aligned (to 16 bytes). 15 | li 0, -16 16 | -# endif 17 | and 12, 0, 12 18 | 19 | // Establish the local stack frame. 20 | @@ -1742,14 +1737,19 @@ 21 | #endif /* KMP_ARCH_ARM */ 22 | 23 | #if KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 || KMP_ARCH_MIPS64 || KMP_ARCH_RISCV64 24 | +#ifndef KMP_PREFIX_UNDERSCORE 25 | +# define KMP_PREFIX_UNDERSCORE(x) x 26 | +#endif 27 | .data 28 | .comm .gomp_critical_user_,32,8 29 | .data 30 | .align 8 31 | - .global __kmp_unnamed_critical_addr 32 | -__kmp_unnamed_critical_addr: 33 | + .global KMP_PREFIX_UNDERSCORE(__kmp_unnamed_critical_addr) 34 | +KMP_PREFIX_UNDERSCORE(__kmp_unnamed_critical_addr): 35 | .8byte .gomp_critical_user_ 36 | - .size __kmp_unnamed_critical_addr,8 37 | +#ifdef __ELF__ 38 | + .size KMP_PREFIX_UNDERSCORE(__kmp_unnamed_critical_addr),8 39 | +#endif 40 | #endif /* KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 || KMP_ARCH_MIPS64 || 41 | KMP_ARCH_RISCV64 */ 42 | 43 | -------------------------------------------------------------------------------- /openmp/src/openmp-11.0.1.src.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/src/openmp-11.0.1.src.tar.xz -------------------------------------------------------------------------------- /openmp/src/openmp-7.1.0.src.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/src/openmp-7.1.0.src.tar.xz -------------------------------------------------------------------------------- /openmp/src/openmp-8.0.1.src.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/src/openmp-8.0.1.src.tar.xz -------------------------------------------------------------------------------- /openmp/src/openmp-9.0.1.src.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/openmp/src/openmp-9.0.1.src.tar.xz -------------------------------------------------------------------------------- /tools/gcc-42-5666.3-darwin11.pkg: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2f3893b411f578bfa98a99646ecfea0ba14e1bff4e4f311d7e595936d0da065d 3 | size 30691106 4 | -------------------------------------------------------------------------------- /tools/gfortran-8.2-Mojave.dmg: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:81d379231ba5671a5ef1b7832531f53be5a1c651701a61d87e1d877c4f06d369 3 | size 91167366 4 | -------------------------------------------------------------------------------- /tools/index-old.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tools - R for Mac OS X - developer's page - GNU Fortan for Xcode 4 | 5 | 6 | 7 |

8 |

Tools

9 | 10 | IMPORTANT: This page has only historical value. It does NOT apply to current R versions. See this page for current information. 11 |

12 | NOTE: some links may be broken - older binaries have been lost in an incident. 13 |

Mandatory tools

14 | In order to compile R for Mac OS X 10.4 or higher, you will need the following tools: (for Mac OS X 10.5 and higher look further down) 15 |
    16 |
  • Xcode Development Tools 2.4.0 (or higher) from Apple
    17 | They can be obtained from Apple's Xcode pages. Also, all recent Mac OS X versions come bundled with Xcode Tools, they are located on the installation DVD. However, if your OS X came with Xcode older than version 2.4.0, you will have to download a more recent version from the above site. 18 |

    Note: The binary Leopard build of R on CRAN requires Xcode 3.1 or higher
     

  • 19 |
  • GNU Fortran compiler
    20 | Unfortunately Xcode doesn't contain a Fortran compiler, therefore you will have to install one. For convenience we provide a binary of the GNU Fortran compiler, because most other binaries are either incomplete or broken (do not use compilers from HPC, they won't work correctly!). You can download it from CRAN or here:
    21 |
    gfortran-4.2.3.dmg (ca. 27MB, GNU Fortran 4.2.3 release)
    MD5 hash: 9551fc46f55537dd1db581154daf27ef

    22 | This binary contains gfortran 4.2.3 (release) for both Intel and PowerPC Macs. It supports all four targets (i386, ppc, x86_64 and ppc64) and features Apple's Darwin compiler drivers, i.e. you can build fat binaries with one command (e.g. gfortran -arch i386 -arch ppc -o tf tf.f). 23 |

    24 | Make sure you add /usr/local/bin to your PATH in order to use this compiler. This can be done, e.g. by
    25 | export PATH=$PATH:/usr/local/bin 26 |

    27 | Note: If you are interested in cutting-edge compilers and/or integration of GNU Fortran and Apple's compilers see gcc 4.2 section below. That section is also the right place to go if you use the binary Leopard build of R. 28 |

    29 | Previous versions:
    30 | gfortran-4.2.1.dmg (ca. 28MB, 4.2.1 release, also avaiable in R 2.6.0)
    31 | gfortran-4.2.0.dmg (ca. 28MB, 4.2.0 release, also avaiable in R 2.5.1)
    32 | gfortran-4.2.0-20070325.dmg (ca. 16MB, 4.2.0 2007/03/25 pre-release without cc back-end) 33 |
      34 |

  • 35 |
36 |

Mandatory Tools - Leopard CRAN build

37 | R build can be built with the above requirements, but if you want to use source compilation with the CRAN build of R for Mac OS X 10.5 or higher (aka Leopard build), you will need more recent tools: 38 |
    39 |
  • Xcode Development Tools 3.1 (or higher) from Apple with gcc-4.2
    40 | They can be obtained from Apple's Xcode pages. Make sure gcc-4.2 is selected during the installation (default in recent Xcode versions).
     
  • 41 |
  • GNU Fortran compiler
    42 | Do not install Fortran compilers that comde with Tiger builds of R. Remove them using sudo gfortran-uninstall if you installed them before (unless you want to use both builds in parallel). Then install gfortran-4.2 addition to Apple compilers (see below - you have to pick the one that maches your Xcode version!). Although the Tiger compilers supplied with the Tiger build of R can be used, they will result in slightly different binaries. 43 |
44 |

Optional tools and libraries

45 | The following tools and libraries are optional. R can be compiled without them, but they provide additional capabilities to R. 46 |
    47 |
  • LaTeX
    48 | In order to produce documentation, LaTeX is necessary. It can be obtained from several places, for example as a part of MacTeX. 49 |
      50 |
  • 51 |
  • GNU readline
    52 | Although Mac OS X comes with readline-replacement library, it lack some functionality like backward search etc. Therefore many user prefer GNU readline. Binary for all four architectures is provided from CRAN as a part of the devpack: Tools on CRAN or see libs on this site for more recent versions. 53 | 56 |
      57 |
  • 58 |
  • PNG and JPEG libraries
    59 | If bitmap manipulation libraries are present, R will add graphics device support for those bitmap formats. There are also other package that take advantage of PNG and JPEG, so it is in general a good idea to install them. 60 | Again, they are now part of the devpack on CRAN: Tools on CRAN or more recent versions are available from libs. 61 | 65 |
      66 |
  • 67 |
  • cairo
    68 | R 2.7.0 comes with cairo support. The following tar-ball contains cairo and its dependencies (FreeType, pkgconfig and png) in static form such that you can compile R the same way it is compiled for CRAN: 69 | Tools on CRAN 70 | 73 |
74 |

75 |

Apple Xcode gcc-42 add-ons

76 |
    77 |
  • 78 | GNU Fortran 4.2.4 for Mac OS X 10.7 (Lion):
    79 | Download: gfortran-lion-5666-3.pkg (for Xcode 4.1)
    80 | This package adds GNU Fortran to Xcode 4.1 for Lion (Apple's gcc 4.2 build 5666.3). Requires Mac OS X 10.7 (Lion) and Xcode 4.1.
    81 |

    82 | gcc-4.2 (Apple build 5666.3) with GNU Fortran 4.2.4 for Mac OS X 10.7 (Lion):
    83 | Download: gcc-42-5666.3-darwin11.pkg (for Xcode 4.2 and higher)
    84 | This package contains gcc-4.2 (Apple build 5666.3) including GNU Fortran for Mac OS X 10.7 (Lion). It is needed for Xcode 4.2 or higher since Apple has dropped gcc-4.2 from Xcode. It works with Xcode 4.0 and 4.1 as well, but there you can use the above smaller Fortran package instead.
    85 |

    86 |

  • 87 |
  • 88 | GNU Fortran 4.2.4 for Mac OS X 10.6 (Snow Leopard):
    89 | Download: gfortran-42-5664.pkg (for Xcode 3.2.3 through 3.2.5)
    90 | This package adds GNU Fortran to Xcode 3.2.3/4/5 for Snow Leopard (Apple's gcc 4.2 build 5664). Requires Mac OS X 10.6 (Snow Leopard) and Xcode 3.2.3, 3.2.4 or 3.2.5 (it will also work with more recent Xcode such as 4.0 or 4.1 on Snow Leopard since Apple stopped updating gcc)
    91 |
    Download: gfortran-42-5659.pkg (for Xcode 3.2.2)
    92 | This package adds GNU Fortran to Xcode 3.2.2 for Snow Leopard (Apple's gcc 4.2 build 5659). Requires Mac OS X 10.6 (Snow Leopard) and Xcode 3.2.2.
    93 |
    Download: gfortran-42-5646.pkg (for Xcode 3.2 and 3.2.1)
    94 | This package adds GNU Fortran to Xcode 3.2 for Snow Leopard (Apple's gcc 4.2 build 5646). Requires Mac OS X 10.6 (Snow Leopard) and Xcode 3.2 (or 3.2.1). 95 |

    96 | Dynamic libgfortran: libgfortran-4.2.4-5646.tar.gz (NOT needed for R)
    97 | The compiler above contains static libgfortran. To avoid library pollution the dynamic gfortran library is not included since it is not necessary for most projects and causes problems for people that don't have it installed at run-time. If you know what you're doing, you can install it, but be aware that your FORTRAN binaries will depend on it and OS X does NOT include it.
    98 | Install: sudo tar fxz libgfortran-4.2.4-5646.tar.gz -C / 99 |

    100 | 101 |

    102 |

  • 103 |
  • 104 | GNU Fortran 4.2.4 for Mac OS X 10.5 (Leopard):
    105 | Download: gfortran-42-5577.pkg (for Xcode 3.1.4 only!)
    106 | This package adds GNU Fortran 4.2.4 to Apple's Xcode 3.1.4 gcc 4.2 (build 5577) compilers on Mac OS X 10.5 (Leopard). It does NOT work on Snow Leopard. This binary has been built the Apple way with the gcc_42 (build 5577) sources (by adding the Fortran directories from gcc 4.2.4 release), so it features full Apple driver (i.e. all special flags work) and works directly with the gcc 4.2 system compiler. You have to install Xcode 3.1.4 first (from ADC). 107 |

    108 | Older versions:
    109 | GNU Fortran 4.2.4 for Apple's gcc-4.2 (build 5564) = Xcode 3.1 and 3.1.1:
    110 | gfortran-4.2-5564-darwin9.tar.gz
    111 | GNU Fortran 4.2.4 for Apple's gcc-4.2 (build 5566) = Xcode 3.1.2:
    112 | gfortran-4.2-5566-darwin9.tar.gz
    113 | GNU Fortran 4.2.4 for Apple's gcc-4.2 (build 5577) = Xcode 3.1.4:
    114 | gfortran-4.2-5577-darwin9.tar.gz (same as the above installer)
    115 | Installation: sudo tar fvxz gcc-4.2-5577-darwin9-all.tar.gz -C / 116 |

    117 | 121 |

  • 122 |
  • 123 | gcc 4.2 (Apple Inc. build 5566) for Mac OS X 10.4 (Tiger): (updated 2008/12/24)
    124 | Download: gcc-4.2-5566-darwin8-all.tar.gz (Apple gcc 4.2 build 5566 [as in Xcode 3.1.2] + GNU Fortran 4.2.4)
    125 | The above tar-ball contains compilers, docs and 10.4u SDK - unpack using:
    126 | sudo tar fvxz gcc-4.2-5566-darwin8-all.tar.gz -C /
    127 | The above compilers don't replace existing 4.0 or older compilers, use as gcc-4.2, g++-4.2 etc. or create symlinks if you want to make it the default compiler (or use sudo gcc_select 4.2).
    128 | (Note: SDK and documentation is assumed to live in /Developer - move accordingly for non-standard installations). 129 |
      130 |
  • 131 |
132 |

Previous (older) versions

133 |
    134 |
  • 135 | gcc 4.2 (Apple Inc. build 5553) for Mac OS X 10.4 (Tiger):
    136 | Download: gcc-42-5553-darwin8-all.tar.gz (Apple gcc 4.2 build 5553 + GNU Fortran 4.2.3)
    137 | The above tar-ball contains compilers, docs and 10.4u SDK - unpack using:
    138 | sudo tar fvxz gcc-42-5553-darwin8-all.tar.gz -C /
    139 | The above compilers don't replace existing 4.0 or older compilers, use as gcc-4.2, g++-4.2 etc. or create symlinks if you want to make it the default compiler. 140 |
      141 |
  • 142 |
  • 143 | gcc 4.2 (Apple Inc. build 5531) for Mac OS X 10.4 (Tiger) (older than above):
    144 | Download: gcc-42-5531-darwin8.tar.gz (Apple gcc 4.2 build 5531)
    145 | Download: gcc-42-5531-darwin8-SDK.tar.gz (MacOSX10.4u SDK files)
    146 | Download: gfortran-42-5531-darwin8.tar.gz (GNU Fortran)
    147 | This is a set of Apple's gcc 4.2.1 (build 5531) compilers for Mac OS X 10.4 (Tiger). Xcode 2.5 has gcc 4.0 only, and gcc 4.2 update is currently available only for Leopard, so this binary fills the gap. 148 |
    The second file contains the Fortran compiler which is not part of the Apple sources, but was compiled along with the Apple sources. 149 |
      150 |
  • 151 |
152 |

153 |


154 |

155 |

Building a universal compiler

156 | Note: This section is now becoming obsolete given Apple's gcc 42 branch, but it is kept here until we have more definite information on Apple's Fortran support. If you're interested in compiling Apple's gcc-4.2 branch with Fortran support, add Fortran sources and use this patch: gfortran-5564.diff (for gcc-4.2 Apple build 5564/5566/5577 and GNU Fortran 4.2.4) or gfortran-5531.diff (for gcc-4.2 Apple builds 5531 or 5553 and GNU Fortran 4.2.3). Complete sources are also in /src.

157 | Apple provides universal compilers in their Xcode tools. This means that the compiler itself can be run on both on Intel and PowerPC Macs natively. In addition, Apple's compilers can produce binaries for any of the architectures i386, ppc, x86_64 and ppc64. This mean that the same compiler suite is usable on any Mac and can target any Mac as well. 158 |

Apple also provides a special driver for all compilers such that they support additional flags such as -arch which allow us to build fat binaries in one run. Internally the driver invokes multple separate compilers, one for each distincts -arch flag and combines the result using lipo. This is highly convenient and allows for compilation of the form:
159 | gcc -c foo.c -arch ppc -arch i386 -arch ppc64 -arch x86_64
160 | which produces one fat object file (foo.o) containing binaries for all four architectures. 161 |

162 | Unfortunately Apple's branch of gcc is based on a fairly old version of gcc and they don't support Fortran. (Update: 2007/11 there is some hope, Apple's gcc-42 branch can be used to compile Fortran - see binaries above - and Apple is allegedly working on an official Fortran release) Therefore it is sometimes necessary to compile gcc from the original FSF sources. However, such compilers (e.g. as provided by HPC) are very limited, because they work only on one kind of Mac (Intel or PPC) and don't support cross-compiling. Therefore is it necessary to merge Apple's approach and FSF gcc sources to create a more usable compiler for Mac OS X. 163 |

164 | In this part I want to describe steps necessary to create such universal compiler from any gcc sources. The whole process is fully automated by a shell script which can be obtained here (it must be run sudo unless you have write-premissions in /usr/local). I have used this procedure to create the Fortran compiler available above. Run the script with "-h" flag to see all the options. 165 |

166 |

How does it work?

167 | Conceptually Apple's drivers use naming scheme to distinguish compilers for Intel and PowerPC targets. In the Xcode installation they are called powerpc-apple-darwin8-gcc-4.0.1 and i686-apple-darwin8-gcc-4.0.1. The virtual targets ppc64 and x86_64 are compiled by adding -m64 flags to the corresponding compiler. The driver (gcc-4.0) invokes the actual compiler(s) that are needed and uses lipo to create the resulting fat object/binary. 168 |

169 | In order to build an universal compiler suite, we need to proceed using these steps: 170 |

    171 |
  • get cross-compilation tools
    172 | The building process requires tools for cross-compilation to be of the form <arch>-apple-darwin8-<tool>. However, Apple's tools expect the -arch flag instead of naming conventions. Therefore it is necessary to create small stubs that map FSF naming conventions into corresponding invocations of the Apple tools. Such stubs are automatically generated by Apple's gcc bulding process, but they are also available in this file: gcc-bin-stubs.tar.gz 173 |
      174 |
  • 175 |
  • 176 | get gcc sources
    177 | This is obviuos, you clearly need gcc sources. One way to get them is via svn, for example:
    178 | svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch gcc-4.2 179 |
      180 |
  • 181 |
  • 182 | compile and install the native compilers
    183 | The compilation part is straight-forward, just configure and build gcc for the i686-apple-darwin8 host and powerpc-apple-darwin8 host. The harder part is the installation, because Apple uses fat files, whereas FSF's multilibs relies on different names. First install one architecture, rename the binaries according to Apple's compiler name conventions and move everything in /usr/local/lib aside. Then install the other architecture and do the same. Finally combine all system libraries using lipo into /usr/local/lib. This applies also to 64-bit architectures which should also be included in the libraries placed in /usr/local/lib. Then get all the other files and symlinks back. Finally remove everything from the subdirectories in lib and replace it with symlinks. This should give you a working environment for all four targets. Finally adjust the IDs of the libraries to match their location. 184 |
      185 |
  • 186 |
  • 187 | compile and merge cross-compilers
    188 | With the above compiler we cannot create universal binaries, because the cross-compilers are missing. We need to compile them now. Note that we don't need libraries anymore, because they are already in place, so even if some of the libraries fail when cross-compiled, we don't care. The cross-compilers don't even need to be installed, just lipo the binaries of the cross-compilers into /usr/local/libexec/gcc/*-apple-darwin*/* and the drivers into /usr/local/bin with the corresponding name. You may want to strip them as well in order to reduce size. 189 |
      190 |
  • 191 |
  • 192 | get and install the Darwin driver
    193 | The driver is part of Apple's gcc and can be obtained correspondingly. I have packaged the minimal sources and the corresponding Makefile into one small tar-ball which is available here: gcc-darwin-driver.tar.gz. It is based on gcc-5363 sources released by Apple, but the Makefile allows the use of any Apple's gcc sources - just set AGCC accordingly. Move the resulting driver files into /usr/local/bin and you're all set! 194 |
  • 195 |
196 | Was this too compilcated? Well, use the script above or just fetch the binaries which are provided in the form of a convenient Apple installer above. 197 |

198 |


199 | (sources for open source software not linked directly) 200 |

201 |

Disclaimer

202 | 203 | All software is provided "as is" and any express or implied warranties, including, but but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall AT&T, the publisher, copyright owner or contributors be liable for any direct, indirect, incidental,special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. 204 | 205 | 206 |
207 | 208 | 209 | -------------------------------------------------------------------------------- /tools/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tools - R for Mac OS X - developer's page - GNU Fortan for Xcode 4 | 5 | 6 | 7 |
8 |

Tools

9 |

Mandatory tools

10 | In order to compile R for macOS, you will need the following tools: 11 |
    12 |
  • Xcode developer tools from Apple
    13 | Xcode can be obtained from Apple AppStore and the Xcode developer page. Older versions are available in the "more" section of the Developer pages (Apple developer account necessary). On modern macOS versions you can simply use 14 |

    sudo xcode-select --install

    15 |

    which installs Xcode command line tools which are sufficient to build R (however, if you want to also build the R.app GUI you do need the full Xcode installation).

    16 |
  • 17 |
  • GNU Fortran compiler
    18 | R and some contributed package require a FORTRAN compiler. 19 | Unfortunately Xcode doesn't contain a Fortran compiler, therefore you will have to install one. We recommend universal GNU Fortran compiler. You can download an installer package gfortran-14.2-universal.pkg (287MB) - for more details and other download options see 20 | R-macos GNU Fortran releases on GitHub. 21 |

    CRAN R Big Sur builds used gfortran-12.2-universal.pkg for R 4.3.0 up to 4.4.3

    22 |
23 |

NOTE: To compile R packages (as opposed to R itself) you have to use the same GNU Fortran which was used to build the R version you are using. For CRAN R releases please refer to the download page of the specific R version to determine the tools required.

24 | 51 | 52 |

In order to retain compatibility with native R we recommend using above tools. Although it is possible to compile R using tools from other package managers such as Homebrew, MacPorts or Fink, such binaries are by definition incompatible with macOS native libraries and applications. If you choose one of those package managers, make sure you compile everything using those tools including R and all packages and libraries you intend to use since you can no longer use CRAN binaries in that case.

53 | 54 |

Additional information on the OpenMP page is available for those interested in OpenMP support which is not supported by Apple, but still possible with additional libraries. 55 |

56 |

Mandatory libraries

57 | Old versions of R provided fall-back versions of dependend libraries. This is no longer the case, the following libraries are not present in most recent macOS (or are too old) and have to be installed before R can be compiled: 58 | 63 | Binaries for the above libraries are available from the "Binaries of libraries and tools for macOS page" (also the /bin directory) for the builds we use. 64 | 65 |

Those are binaries used by CRAN and are built using the recipes system, thus can be transparently re-built accordingly. If you wish to compile all dependencies yourself (only recommended for expert users) use the following commands: 66 | 67 |

git clone https://github.com/R-macos/recipes.git
68 | cd recipes
69 | ./build.sh r-base-dev
70 | 71 |

This will build and install all dependencies necessary to compile R including optional capabilities such as cairo, tiff, jpeg, png and texinfo. On Intel Macs the default prefix is /usr/local (another recommended alternative is /opt/R/x86_64) and on arm64 Macs it is /opt/R/arm64. It may be convenient to setup the target to be managed by the current user, e.g.:

72 | sudo mkdir -p /opt/R/arm64
73 | sudo chown $USER /opt/R/arm64
74 |

after which sudo is no longer required. For more details, please see the documentation of the recipes build system. 75 |

76 |

Optional tools and libraries

77 | The following tools and libraries are optional. R can be compiled without them, but they provide additional capabilities to R. 78 |
    79 |
  • LaTeX
    80 | In order to produce documentation, LaTeX is necessary. It can be obtained from several places, for example as a part of MacTeX. 81 |
      82 |
  • 83 |
  • GNU readline
    84 | Although macOS comes with readline-replacement library (libedit), it lacks some functionality like backward search etc. Therefore many users prefer GNU readline. 85 |
      86 |
  • 87 |
  • subversion
    88 | If you want to check out R from the SVN repository, you will need subversion. It was included in Xcode 9 and earlier, but is no longer. We are providing a signed binary:
    subversion-1.14.0-darwin15.6.tar.gz (SHA1: 9dab09d6cf608bea6224bdc3ec3e95893e4e9800)
    which works on OS X 10.11 (El Capitan) and higher, is relocatable, i.e., you can put it anywhere you want since it only depends on system libraries. 89 |

    Similarly, the arm64 version is also available: subversion-1.14.1-darwin.20-arm64.tar.gz (SHA1: 2e6068749ded28d5080a7cb37ddee5fdda16858a) 90 |

    (Static build with: apr-1.7.0, apr-util-1.6.1, openssl-1.1.1g, serf-1.3.9, sqlite-3.33.0, subversion-1.14.0)
    This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)
    91 |

  • 92 |
  • Tcl/Tk
    93 | Tcl/Tk is needed for the tcltk package and the binaries are shipped with R releases. Please use the corresponding R installer (you can use "custom" option during installation to just install Tcl/Tk). The corresponding scripts to build Tcl/Tk are in a separate part of the recipes repository. 94 |
95 |

96 |


97 | (sources for open source software not linked directly) 98 |

99 | Old version of this page for much older OS X versions. 100 |

101 |

Disclaimer

102 | 103 | All software is provided "as is" and any express or implied warranties, including, but but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the publisher, copyright owner or contributors be liable for any direct, indirect, incidental,special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. 104 | 105 | 106 |
107 | 108 | 109 | -------------------------------------------------------------------------------- /tools/index.html.old: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tools - R for Mac OS X - developer's page - GNU Fortan for Xcode 4 | 5 | 6 | 7 |
8 |

Tools

9 |

Mandatory tools

10 | In order to compile R for Mac OS X 10.4 or higher, you will need the following tools: (for Mac OS X 10.5 and higher look further down) 11 |
    12 |
  • Xcode Development Tools 2.4.0 (or higher) from Apple
    13 | They can be obtained from Apple's Xcode pages. Also, all recent Mac OS X versions come bundled with Xcode Tools, they are located on the installation DVD. However, if your OS X came with Xcode older than version 2.4.0, you will have to download a more recent version from the above site. 14 |

    Note: The binary Leopard build of R on CRAN requires Xcode 3.1 or higher
     

  • 15 |
  • GNU Fortran compiler
    16 | Unfortunately Xcode doesn't contain a Fortran compiler, therefore you will have to install one. For convenience we provide a binary of the GNU Fortran compiler, because most other binaries are either incomplete or broken (do not use compilers from HPC, they won't work correctly!). You can download it from CRAN or here:
    17 |
    gfortran-4.2.3.dmg (ca. 27MB, GNU Fortran 4.2.3 release)
    MD5 hash: 9551fc46f55537dd1db581154daf27ef

    18 | This binary contains gfortran 4.2.3 (release) for both Intel and PowerPC Macs. It supports all four targets (i386, ppc, x86_64 and ppc64) and features Apple's Darwin compiler drivers, i.e. you can build fat binaries with one command (e.g. gfortran -arch i386 -arch ppc -o tf tf.f). 19 |

    20 | Make sure you add /usr/local/bin to your PATH in order to use this compiler. This can be done, e.g. by
    21 | export PATH=$PATH:/usr/local/bin 22 |

    23 | Note: If you are interested in cutting-edge compilers and/or integration of GNU Fortran and Apple's compilers see gcc 4.2 section below. That section is also the right place to go if you use the binary Leopard build of R. 24 |

    25 | Previous versions:
    26 | gfortran-4.2.1.dmg (ca. 28MB, 4.2.1 release, also avaiable in R 2.6.0)
    27 | gfortran-4.2.0.dmg (ca. 28MB, 4.2.0 release, also avaiable in R 2.5.1)
    28 | gfortran-4.2.0-20070325.dmg (ca. 16MB, 4.2.0 2007/03/25 pre-release without cc back-end) 29 |
      30 |

  • 31 |
32 |

Mandatory Tools - Leopard CRAN build

33 | R build can be built with the above requirements, but if you want to use source compilation with the CRAN build of R for Mac OS X 10.5 or higher (aka Leopard build), you will need more recent tools: 34 |
    35 |
  • Xcode Development Tools 3.1 (or higher) from Apple with gcc-4.2
    36 | They can be obtained from Apple's Xcode pages. Make sure gcc-4.2 is selected during the installation (default in recent Xcode versions).
     
  • 37 |
  • GNU Fortran compiler
    38 | Do not install Fortran compilers that comde with Tiger builds of R. Remove them using sudo gfortran-uninstall if you installed them before (unless you want to use both builds in parallel). Then install gfortran-4.2 addition to Apple compilers (see below - you have to pick the one that maches your Xcode version!). Although the Tiger compilers supplied with the Tiger build of R can be used, they will result in slightly different binaries. 39 |
40 |

Optional tools and libraries

41 | The following tools and libraries are optional. R can be compiled without them, but they provide additional capabilities to R. 42 |
    43 |
  • LaTeX
    44 | In order to produce documentation, LaTeX is necessary. It can be obtained from several places, for example as a part of MacTeX. 45 |
      46 |
  • 47 |
  • GNU readline
    48 | Although Mac OS X comes with readline-replacement library, it lack some functionality like backward search etc. Therefore many user prefer GNU readline. Binary for all four architectures is provided from CRAN as a part of the devpack: Tools on CRAN or see libs on this site for more recent versions. 49 | 52 |
      53 |
  • 54 |
  • PNG and JPEG libraries
    55 | If bitmap manipulation libraries are present, R will add graphics device support for those bitmap formats. There are also other package that take advantage of PNG and JPEG, so it is in general a good idea to install them. 56 | Again, they are now part of the devpack on CRAN: Tools on CRAN or more recent versions are available from libs. 57 | 61 |
      62 |
  • 63 |
  • cairo
    64 | R 2.7.0 comes with cairo support. The following tar-ball contains cairo and its dependencies (FreeType, pkgconfig and png) in static form such that you can compile R the same way it is compiled for CRAN: 65 | Tools on CRAN 66 | 69 |
70 |

71 |

Apple Xcode gcc-42 add-ons

72 |
    73 |
  • 74 | GNU Fortran 4.2.4 for Mac OS X 10.6 (Snow Leopard):
    75 | Download: gfortran-42-5664.pkg (for Xcode 3.2.3 through 3.2.5)
    76 | This package adds GNU Fortran to Xcode 3.2.3/4/5 for Snow Leopard (Apple's gcc 4.2 build 5664). Requires Mac OS X 10.6 (Snow Leopard) and Xcode 3.2.3, 3.2.4 or 3.2.5.
    77 |
    Download: gfortran-42-5659.pkg (for Xcode 3.2.2)
    78 | This package adds GNU Fortran to Xcode 3.2.2 for Snow Leopard (Apple's gcc 4.2 build 5659). Requires Mac OS X 10.6 (Snow Leopard) and Xcode 3.2.2.
    79 |
    Download: gfortran-42-5646.pkg (for Xcode 3.2 and 3.2.1)
    80 | This package adds GNU Fortran to Xcode 3.2 for Snow Leopard (Apple's gcc 4.2 build 5646). Requires Mac OS X 10.6 (Snow Leopard) and Xcode 3.2 (or 3.2.1). 81 |

    82 | Dynamic libgfortran: libgfortran-4.2.4-5646.tar.gz (NOT needed for R)
    83 | The compiler above contains static libgfortran. To avoid library pollution the dynamic gfortran library is not included since it is not necessary for most projects and causes problems for people that don't have it installed at run-time. If you know what you're doing, you can install it, but be aware that your FORTRAN binaries will depend on it and OS X does NOT include it.
    84 | Install: sudo tar fxz libgfortran-4.2.4-5646.tar.gz -C / 85 |

    86 | 87 |

    88 |

  • 89 |
  • 90 | GNU Fortran 4.2.4 for Mac OS X 10.5 (Leopard):
    91 | Download: gfortran-42-5577.pkg (for Xcode 3.1.4 only!)
    92 | This package adds GNU Fortran 4.2.4 to Apple's Xcode 3.1.4 gcc 4.2 (build 5577) compilers on Mac OS X 10.5 (Leopard). It does NOT work on Snow Leopard. This binary has been built the Apple way with the gcc_42 (build 5577) sources (by adding the Fortran directories from gcc 4.2.4 release), so it features full Apple driver (i.e. all special flags work) and works directly with the gcc 4.2 system compiler. You have to install Xcode 3.1.4 first (from ADC). 93 |

    94 | Older versions:
    95 | GNU Fortran 4.2.4 for Apple's gcc-4.2 (build 5564) = Xcode 3.1 and 3.1.1:
    96 | gfortran-4.2-5564-darwin9.tar.gz
    97 | GNU Fortran 4.2.4 for Apple's gcc-4.2 (build 5566) = Xcode 3.1.2:
    98 | gfortran-4.2-5566-darwin9.tar.gz
    99 | GNU Fortran 4.2.4 for Apple's gcc-4.2 (build 5577) = Xcode 3.1.4:
    100 | gfortran-4.2-5577-darwin9.tar.gz (same as the above installer)
    101 | Installation: sudo tar fvxz gcc-4.2-5577-darwin9-all.tar.gz -C / 102 |

    103 | 107 |

  • 108 |
  • 109 | gcc 4.2 (Apple Inc. build 5566) for Mac OS X 10.4 (Tiger): (updated 2008/12/24)
    110 | Download: gcc-4.2-5566-darwin8-all.tar.gz (Apple gcc 4.2 build 5566 [as in Xcode 3.1.2] + GNU Fortran 4.2.4)
    111 | The above tar-ball contains compilers, docs and 10.4u SDK - unpack using:
    112 | sudo tar fvxz gcc-4.2-5566-darwin8-all.tar.gz -C /
    113 | The above compilers don't replace existing 4.0 or older compilers, use as gcc-4.2, g++-4.2 etc. or create symlinks if you want to make it the default compiler (or use sudo gcc_select 4.2).
    114 | (Note: SDK and documentation is assumed to live in /Developer - move accordingly for non-standard installations). 115 |
      116 |
  • 117 |
118 |

Previous (older) versions

119 |
    120 |
  • 121 | gcc 4.2 (Apple Inc. build 5553) for Mac OS X 10.4 (Tiger):
    122 | Download: gcc-42-5553-darwin8-all.tar.gz (Apple gcc 4.2 build 5553 + GNU Fortran 4.2.3)
    123 | The above tar-ball contains compilers, docs and 10.4u SDK - unpack using:
    124 | sudo tar fvxz gcc-42-5553-darwin8-all.tar.gz -C /
    125 | The above compilers don't replace existing 4.0 or older compilers, use as gcc-4.2, g++-4.2 etc. or create symlinks if you want to make it the default compiler. 126 |
      127 |
  • 128 |
  • 129 | gcc 4.2 (Apple Inc. build 5531) for Mac OS X 10.4 (Tiger) (older than above):
    130 | Download: gcc-42-5531-darwin8.tar.gz (Apple gcc 4.2 build 5531)
    131 | Download: gcc-42-5531-darwin8-SDK.tar.gz (MacOSX10.4u SDK files)
    132 | Download: gfortran-42-5531-darwin8.tar.gz (GNU Fortran)
    133 | This is a set of Apple's gcc 4.2.1 (build 5531) compilers for Mac OS X 10.4 (Tiger). Xcode 2.5 has gcc 4.0 only, and gcc 4.2 update is currently available only for Leopard, so this binary fills the gap. 134 |
    The second file contains the Fortran compiler which is not part of the Apple sources, but was compiled along with the Apple sources. 135 |
      136 |
  • 137 |
138 |

139 |


140 |

141 |

Building a universal compiler

142 | Note: This section is now becoming obsolete given Apple's gcc 42 branch, but it is kept here until we have more definite information on Apple's Fortran support. If you're interested in compiling Apple's gcc-4.2 branch with Fortran support, add Fortran sources and use this patch: gfortran-5564.diff (for gcc-4.2 Apple build 5564/5566/5577 and GNU Fortran 4.2.4) or gfortran-5531.diff (for gcc-4.2 Apple builds 5531 or 5553 and GNU Fortran 4.2.3). Complete sources are also in /src.

143 | Apple provides universal compilers in their Xcode tools. This means that the compiler itself can be run on both on Intel and PowerPC Macs natively. In addition, Apple's compilers can produce binaries for any of the architectures i386, ppc, x86_64 and ppc64. This mean that the same compiler suite is usable on any Mac and can target any Mac as well. 144 |

Apple also provides a special driver for all compilers such that they support additional flags such as -arch which allow us to build fat binaries in one run. Internally the driver invokes multple separate compilers, one for each distincts -arch flag and combines the result using lipo. This is highly convenient and allows for compilation of the form:
145 | gcc -c foo.c -arch ppc -arch i386 -arch ppc64 -arch x86_64
146 | which produces one fat object file (foo.o) containing binaries for all four architectures. 147 |

148 | Unfortunately Apple's branch of gcc is based on a fairly old version of gcc and they don't support Fortran. (Update: 2007/11 there is some hope, Apple's gcc-42 branch can be used to compile Fortran - see binaries above - and Apple is allegedly working on an official Fortran release) Therefore it is sometimes necessary to compile gcc from the original FSF sources. However, such compilers (e.g. as provided by HPC) are very limited, because they work only on one kind of Mac (Intel or PPC) and don't support cross-compiling. Therefore is it necessary to merge Apple's approach and FSF gcc sources to create a more usable compiler for Mac OS X. 149 |

150 | In this part I want to describe steps necessary to create such universal compiler from any gcc sources. The whole process is fully automated by a shell script which can be obtained here (it must be run sudo unless you have write-premissions in /usr/local). I have used this procedure to create the Fortran compiler available above. Run the script with "-h" flag to see all the options. 151 |

152 |

How does it work?

153 | Conceptually Apple's drivers use naming scheme to distinguish compilers for Intel and PowerPC targets. In the Xcode installation they are called powerpc-apple-darwin8-gcc-4.0.1 and i686-apple-darwin8-gcc-4.0.1. The virtual targets ppc64 and x86_64 are compiled by adding -m64 flags to the corresponding compiler. The driver (gcc-4.0) invokes the actual compiler(s) that are needed and uses lipo to create the resulting fat object/binary. 154 |

155 | In order to build an universal compiler suite, we need to proceed using these steps: 156 |

    157 |
  • get cross-compilation tools
    158 | The building process requires tools for cross-compilation to be of the form <arch>-apple-darwin8-<tool>. However, Apple's tools expect the -arch flag instead of naming conventions. Therefore it is necessary to create small stubs that map FSF naming conventions into corresponding invocations of the Apple tools. Such stubs are automatically generated by Apple's gcc bulding process, but they are also available in this file: gcc-bin-stubs.tar.gz 159 |
      160 |
  • 161 |
  • 162 | get gcc sources
    163 | This is obviuos, you clearly need gcc sources. One way to get them is via svn, for example:
    164 | svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch gcc-4.2 165 |
      166 |
  • 167 |
  • 168 | compile and install the native compilers
    169 | The compilation part is straight-forward, just configure and build gcc for the i686-apple-darwin8 host and powerpc-apple-darwin8 host. The harder part is the installation, because Apple uses fat files, whereas FSF's multilibs relies on different names. First install one architecture, rename the binaries according to Apple's compiler name conventions and move everything in /usr/local/lib aside. Then install the other architecture and do the same. Finally combine all system libraries using lipo into /usr/local/lib. This applies also to 64-bit architectures which should also be included in the libraries placed in /usr/local/lib. Then get all the other files and symlinks back. Finally remove everything from the subdirectories in lib and replace it with symlinks. This should give you a working environment for all four targets. Finally adjust the IDs of the libraries to match their location. 170 |
      171 |
  • 172 |
  • 173 | compile and merge cross-compilers
    174 | With the above compiler we cannot create universal binaries, because the cross-compilers are missing. We need to compile them now. Note that we don't need libraries anymore, because they are already in place, so even if some of the libraries fail when cross-compiled, we don't care. The cross-compilers don't even need to be installed, just lipo the binaries of the cross-compilers into /usr/local/libexec/gcc/*-apple-darwin*/* and the drivers into /usr/local/bin with the corresponding name. You may want to strip them as well in order to reduce size. 175 |
      176 |
  • 177 |
  • 178 | get and install the Darwin driver
    179 | The driver is part of Apple's gcc and can be obtained correspondingly. I have packaged the minimal sources and the corresponding Makefile into one small tar-ball which is available here: gcc-darwin-driver.tar.gz. It is based on gcc-5363 sources released by Apple, but the Makefile allows the use of any Apple's gcc sources - just set AGCC accordingly. Move the resulting driver files into /usr/local/bin and you're all set! 180 |
  • 181 |
182 | Was this too compilcated? Well, use the script above or just fetch the binaries which are provided in the form of a convenient Apple installer above. 183 |

184 |


185 | (sources for open source software not linked directly) 186 |

187 |

Disclaimer

188 | 189 | All software is provided "as is" and any express or implied warranties, including, but but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall AT&T, the publisher, copyright owner or contributors be liable for any direct, indirect, incidental,special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. 190 | 191 | 192 |
193 | 194 | 195 | -------------------------------------------------------------------------------- /tools/subversion-1.14.0-darwin15.6.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/R-macos/R-mac-dev/f0f212755017702e525926944ed8f9a05e79677e/tools/subversion-1.14.0-darwin15.6.tar.gz --------------------------------------------------------------------------------