Compilation ERROR
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Summary:
I am starting to use Stan interface for R but have a compilation error
Description:
I installed Rtools on my C:/ drive and followed all the steps described here: https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Windows
Reproducible Steps:
> Sys.getenv('PATH')
[1] "C:\Program Files\R\R-3.5.1\bin\x64;c:\Rtools\bin;c:\Rtools\mingw_64\bin;"
> system('g++ -v')
Using built-in specs.
COLLECT_GCC=c:\Rtools\mingw_64\bin\G__~1.EXE
COLLECT_LTO_WRAPPER=c:/Rtools/mingw_64/bin/../libexec/gcc/x86_64-w64-mingw32/4.9.3/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-4.9.3/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/home/Jeroen/mingw-gcc-4.9.3/x86_64-493-posix-seh-rt_v3-s/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-static --disable-shared --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/home/Jeroen/mingw-gcc-4.9.3/prerequisites/x86_64-w64-mingw32-static --with-m...
Thread model: posix
gcc version 4.9.3 (x86_64-posix-seh, Built by MinGW-W64 project)
> system('where make')
c:\Rtools\bin\make.exe
Current Output:
And I get this error message at the last step:
fx <- inline::cxxfunction( signature(x = "integer", y = "numeric" ) , '
return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
' )
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lStanHeaders
collect2.exe: error: ld returned 1 exit status
> fx( 2L, 5 )
Error in .Primitive(".Call")(<pointer: (nil)>, x, y) :
NULL value passed as symbol address
RStan Version:
‘2.17.3’
R Version:
R version 3.5.1 (2018-07-02)
Operating System:
64 bit
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named; start with the Windows installation guide, the reported PATH and Rtools commands, and the inline::cxxfunction reproduction. Trace why the linker cannot find -lStanHeaders and verify the same example compiles and runs successfully without the NULL symbol-address error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100