Compilation Error "Skipping Incompatible" /libstdc++.a when searching for -lstdc++

265 views
Skip to first unread message

Shauna Sweet

unread,
Mar 31, 2016, 7:44:34 AM3/31/16
to Stan users mailing list
Hello all,

I'm getting the following error, running R 3.2.4 revised and RTools33....

Error in compileCode(f, code, language = language, verbose = verbose) :
  Compilation ERROR, function(s)/method(s) not created! c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/libstdc++.dll.a when searching for -lstdc++
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/libstdc++.a when searching for -lstdc++
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3\libstdc++.a when searching for -lstdc++
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/libstdc++.dll.a when searching for -lstdc++
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../.

Does anyone have any suggestions? They would be greatly appreciated. My code is also attached.
IRT STAN CODE - 2b.R

Ben Goodrich

unread,
Mar 31, 2016, 9:12:25 AM3/31/16
to Stan users mailing list
On Thursday, March 31, 2016 at 7:44:34 AM UTC-4, Shauna Sweet wrote:
I'm getting the following error, running R 3.2.4 revised and RTools33....

It may be possible to get this to work, but it isn't recommended. R 3.2.4 was compiled with RTools32 and some of the Rcpp stuff links to R. R 3.3.0 will be compiled with RTools33, in which case using RTools32 for rstan may well be impossible.

That said, you may be able to just do this in R if you are using RTools33

Sys.setenv(PATH = paste("C:/Rtools/bin", Sys.getenv("PATH"), sep=";"))
Sys.setenv(BINPREF = "C:/Rtools/mingw_$(WIN)/bin/")

See https://github.com/rwinlib/r-base/wiki/Testing-Packages-with-Experimental-R-Devel-Build-for-Windows
 
Ben
 

Shauna Sweet

unread,
Mar 31, 2016, 9:24:10 AM3/31/16
to Stan users mailing list
Thanks, Ben.

I ran that code and also re-installed Strawberry Perl (I was running an older version) and that seems to have solved it...

Now I just need to figure out what is causing R to run out of memory, unable to allocate vector... :-/

Thank you!
Reply all
Reply to author
Forward
0 new messages