krlmlr / r-appveyor

Tools for using R with AppVeyor (https://appveyor.com)
132 stars 60 forks source link

fix krlmlr/r-appveyor#42 #43

Closed wush978 closed 8 years ago

wush978 commented 8 years ago

The PR for #42

wush978 commented 8 years ago

I think it works now. The test log does use the gcc-4.6.3 as shown in https://ci.appveyor.com/project/krlmlr/r-appveyor/build/1.0.805#L135

krlmlr commented 8 years ago

Thanks!

krlmlr commented 8 years ago

@wush978: For some reason, the "fakepackage" used for testing fails when building with GCC_PATH=mingw_32: https://ci.appveyor.com/project/krlmlr/r-appveyor/build/1.0.826#L252. Any idea what might be wrong here?

RcppExports.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in
wush978 commented 8 years ago

@krlmlr: I'll check it out this weekend.

wush978 commented 8 years ago

@krlmlr

Because the new tool chain gcc-4.9.3 on windows does not support multilib, so we need to use different compiler for 32bit and 64bit. I am still wondering how to set PATH or other environment variables properly to make R use two compilers.

Reference: https://github.com/rwinlib/r-base#migration-steps-for-cran

wush978 commented 8 years ago

Maybe we should solve this issue via:

  1. Remove c:\Rtools\gcc-4.6.3\bin from the environment variable PATH.
  2. Edit the compiler PATH to C:\Program Files\R\R-3.2.2\etc\i386\Makeconf and C:\Program Files\R\R-3.2.2\etc\x64\Makeconf properly.
    • The variable BINPREF should be set to the directory of the compiler

For example, for gcc-4.6, the content of both C:\Program Files\R\R-3.2.2\etc\i386\Makeconf and C:\Program Files\R\R-3.2.2\etc\x64\Makeconf should be:

## Things which are substituted by fixed/Makefile (and also -O3 -> -O2)
WIN = 32
BINPREF = c:/Rtools/gcc-4.6.3/bin/
# SYMPAT = 's/^.* [BCDRT] _/ /p' for 32-bit

For gcc-4.9.3, the content of C:\Program Files\R\R-3.2.2\etc\i386\Makeconf should be:

## Things which are substituted by fixed/Makefile (and also -O3 -> -O2)
WIN = 32
BINPREF = c:/Rtools/mingw_32/bin/
# SYMPAT = 's/^.* [BCDRT] _/ /p' for 32-bit

And the content of C:\Program Files\R\R-3.2.2\etc\x64\Makeconf should be:

## Things which are substituted by fixed/Makefile (and also -O2 -> -O2)
WIN = 64
BINPREF = c:/Rtools/mingw_64/bin/
# SYMPAT = 's/^.* [BCDRT] _/ /p' for 32-bit

I do not know if this is the recommended way to solve the issue. How about asking them on r-sig-windows?

krlmlr commented 8 years ago

Current master uses --no-multiarch and enables other tweaks, see README.