rstan install fails

232 views
Skip to first unread message

Joshua N Pritikin

unread,
Aug 2, 2014, 1:59:47 AM8/2/14
to stan-...@googlegroups.com
I tried,

source('http://mc-stan.org/rstan/install.R', echo = TRUE, max.deparse.length = 2000)
install_rstan()

Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/joshua/R/x86_64-pc-linux-gnu-library/3.0/rstan/libs/rstan.so':
/home/joshua/R/x86_64-pc-linux-gnu-library/3.0/rstan/libs/rstan.so: undefined symbol: _ZN4stan5agrad18var_nochain_stack_E
Error: loading failed
Execution halted

R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Platform: x86_64-pc-linux-gnu (64-bit)

--
Joshua N. Pritikin
Department of Psychology
University of Virginia
485 McCormick Rd, Gilmer Hall Room 102
Charlottesville, VA 22904
http://people.virginia.edu/~jnp3bc

Emmanuel Charpentier

unread,
Aug 2, 2014, 2:23:27 AM8/2/14
to stan-...@googlegroups.com
I'e been burned by this one (in some special circumstances). See https://groups.google.com/forum/#!topic/stan-users/Qbkuu51QZvU and
https://groups.google.com/forum/#!topic/stan-users/KNnlgfjmxwk ...

HTH,

--
Emmanuel Charpentier

Joshua N Pritikin

unread,
Aug 2, 2014, 2:34:21 AM8/2/14
to stan-...@googlegroups.com
On Fri, Aug 01, 2014 at 11:23:27PM -0700, Emmanuel Charpentier wrote:
> I'e been burned by this one (in some special circumstances). See
> https://groups.google.com/forum/#!topic/stan-users/Qbkuu51QZvU and
> https://groups.google.com/forum/#!topic/stan-users/KNnlgfjmxwk ...

Wow, stan doesn't build without optimization? OK, I deliberately removed
optimization because I like to use the debugger on occasion. I can put
it back.

BTW, how do you debug your stuff?

Bob Carpenter

unread,
Aug 2, 2014, 12:21:11 PM8/2/14
to stan-...@googlegroups.com
Stan's compiler doesn't build *under Windows* without optimization.
The problem with -O0 is that the debug info being generated blows
out the memory of their rather lame C++ toolchain. We've had to
implement several painful workarounds even to get the optimized
versions to compile under Windows.

None of the dev team uses Windows for development, so we use it
for our integration server just to make sure it's getting tested.
We're going to add continuous integration for Linux and Mac OS soon,
though it's never caused us a problem --- basically if something
can be made to work on Windows, it has worked everywhere else.

Everyone uses different debugging tactics. I'm still a fan of
debug-by-printf. I almost always find it easier than using
a step-through debugger. I do find debuggers really useful to
get a feel for the call chain in code I'm not familiar with.
I believe others use gdb, Xcode, and various memory profiling
tools for leaks. I think most of our profiling has been in Xcode,
though that's just because I don't know what the linux users use.

- Bob
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Joshua N Pritikin

unread,
Aug 2, 2014, 8:34:25 PM8/2/14
to stan-...@googlegroups.com
On Sat, Aug 02, 2014 at 12:21:08PM -0400, Bob Carpenter wrote:
> Stan's compiler doesn't build *under Windows* without optimization.
> The problem with -O0 is that the debug info being generated blows
> out the memory of their rather lame C++ toolchain. We've had to
> implement several painful workarounds even to get the optimized
> versions to compile under Windows.

But the rstan install failed for me with Ubuntu Linux and -O0.

I guess I don't need rstan myself, but it might be a failure that you
want to investigate.

> Everyone uses different debugging tactics. I'm still a fan of
> debug-by-printf. I almost always find it easier than using
> a step-through debugger.

:-)

Alright, well, I see that the stan core can be built with -O0 so I'm
happy enough.

Jiqiang Guo

unread,
Aug 2, 2014, 9:02:22 PM8/2/14
to stan-...@googlegroups.com
rstan cannot be built with O0 using g++ (see here https://travis-ci.org/stan-dev/rstan/builds/31240900, where rstan was built with combinations of clang/gcc and optimization O0 and O3).  This is a different issue than we can only build stan with O0 on windows.  This is a problem for rstan for quite some time, maybe since we have rstan.  One difference for rstan (essentially stanc) is that we are building a shared library, but we are building an executable in stan.  But I cannot really figure out what is the underlying problem.  

Jiqiang 


Reply all
Reply to author
Forward
0 new messages