Skip to content

Commit

Permalink
[SPARK-33105][INFRA] Change default R arch from i386 to x64 and param…
Browse files Browse the repository at this point in the history
…etrize BINPREF

### What changes were proposed in this pull request?

- Change default R `arch` from `i386` to `x64`, to match Rtools  version.
- Parameterize `BINPREF` with `WIN` (https://stackoverflow.com/a/44035904)

Reported on dev:

http://apache-spark-developers-list.1001551.n3.nabble.com/Broken-rlang-installation-on-AppVeyor-td30294.html

### Why are the changes needed?

It seems like update from rlang 0.4.7 to 0.4.8 exposed an issue, where build fails because of incompatible ddl

```
c:/Rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible C:/R/bin/i386/R.dll when searching for -lR
[00:01:52]
c:/Rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible C:/R/bin/i386/R.dll when searching for -lR
[00:01:52]
c:/Rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
cannot find -lR
[00:01:52] collect2.exe: error: ld returned 1 exit status
```

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing tests.

Closes apache#29991 from zero323/APPVEYOR-DEAFAULT-ARCH.

Authored-by: zero323 <mszymkiewicz@gmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
  • Loading branch information
zero323 authored and zhengruifeng committed Oct 12, 2020
1 parent f756d9c commit f92c883
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev/appveyor-install-dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $CRAN = "https://cloud.r-project.org"

Function InstallR {
if ( -not(Test-Path Env:\R_ARCH) ) {
$arch = "i386"
$arch = "x64"
}
Else {
$arch = $env:R_ARCH
Expand Down Expand Up @@ -68,7 +68,7 @@ Function InstallRtools {
$gccPath = $env:GCC_PATH
}
$env:PATH = $RtoolsDrive + '\Rtools40\bin;' + $RtoolsDrive + '\Rtools40\mingw64\bin;' + $RtoolsDrive + '\Rtools40\' + $gccPath + '\bin;' + $env:PATH
$env:BINPREF=$RtoolsDrive + '/Rtools40/mingw64/bin/'
$env:BINPREF=$RtoolsDrive + '/Rtools40/mingw$(WIN)/bin/'
}

# create tools directory outside of Spark directory
Expand Down

0 comments on commit f92c883

Please sign in to comment.