build failures

64 views
Skip to first unread message

Ben Goodrich

unread,
Nov 30, 2015, 4:31:46 PM11/30/15
to stan development mailing list
I'm trying to sync rstan up with develop and running into some build failures. With clang++-3.7 or a recent g++, I get

** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared
object '/tmp/Rtmp9XgAUX/Rinst40966385420f/rstan/libs/rstan.so':
 
/tmp/Rtmp9XgAUX/Rinst40966385420f/rstan/libs/rstan.so: undefined symbol: _ZN4stan4lang15indexes_grammarIN5boost6spirit17line_pos_iteratorINSt3__111__wrap_iterIPKcEEEEEC1ERNS0_12variable_mapERNS5_18basic_stringstreamIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERNS0_18expression_grammarISA_EE
Error: loading failed

With clang++-3.8, I get an error earlier but that might be related

clang++-3.8 -std=c++11 -stdlib=libc++ -I/usr/share/R/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/usr/lib/R/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS  -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppEigen/include" -I"/usr/local/lib/R/site-library/BH/include" -I"/usr/local/lib/R/site-library/StanHeaders/include"   -fpic  -O2 -D_FORTIFY_SOURCE=2 -Wno-unused-variable -Wno-unused-function -Wno-unused-local-typedefs -c lang__grammars__expression07_grammar_inst.cpp -o lang__grammars__expression07_grammar_inst.o
In file included from chains.cpp:19:
In file included from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:4:
In file included from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4:
In file included from /usr/local/lib/R/site-library/RcppEigen/include/Eigen/Dense:1:
In file included from /usr/local/lib/R/site-library/RcppEigen/include/Eigen/Core:28:
In file included from /usr/include/c++/v1/complex:247:
In file included from /usr/include/c++/v1/sstream:174:
In file included from /usr/include/c++/v1/ostream:138:
In file included from /usr/include/c++/v1/ios:216:
In file included from /usr/include/c++/v1/__locale:15:
/usr/include/c++/v1/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)'
basic_string
<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
                                           
^
/usr/include/c++/v1/string:1326:40: note: previous declaration is here
    _LIBCPP_INLINE_VISIBILITY
explicit basic_string(const allocator_type& __a)
                                       
^
In file included from lang__ast_def.cpp:18:
In file included from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/lang/ast_def.cpp:5:
In file included from /usr/local/lib/R/site-library/BH/include/boost/variant/recursive_variant.hpp:36:
In file included from /usr/local/lib/R/site-library/BH/include/boost/variant/variant.hpp:21:
In file included from /usr/local/lib/R/site-library/BH/include/boost/type_index.hpp:29:
In file included from /usr/local/lib/R/site-library/BH/include/boost/type_index/stl_type_index.hpp:22:
In file included from /usr/local/lib/R/site-library/BH/include/boost/type_index/type_index_facade.hpp:14:
/usr/include/c++/v1/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)'
basic_string
<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
                                           
^
/usr/include/c++/v1/string:1326:40: note: previous declaration is here
    _LIBCPP_INLINE_VISIBILITY
explicit basic_string(const allocator_type& __a)
                                       
^
In file included from lang__grammars__expression07_grammar_inst.cpp:18:
In file included from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/lang/grammars/expression07_grammar_inst.cpp:1:
In file included from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/lang/grammars/expression07_grammar_def.hpp:4:
In file included from /usr/local/lib/R/site-library/BH/include/boost/lexical_cast.hpp:32:
In file included from /usr/local/lib/R/site-library/BH/include/boost/lexical_cast/try_lexical_convert.hpp:26:
/usr/include/c++/v1/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)'
basic_string
<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
                                           
^
/usr/include/c++/v1/string:1326:40: note: previous declaration is here
    _LIBCPP_INLINE_VISIBILITY
explicit basic_string(const allocator_type& __a)
                                       
^
In file included from lang__grammars__bare_type_grammar_inst.cpp:18:
In file included from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/lang/grammars/bare_type_grammar_inst.cpp:1:
In file included from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/lang/grammars/bare_type_grammar_def.hpp:4:
In file included from /usr/local/lib/R/site-library/BH/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/lib/R/site-library/BH/include/boost/spirit/home/qi.hpp:14:
In file included from /usr/local/lib/R/site-library/BH/include/boost/spirit/home/qi/action.hpp:14:
In file included from /usr/local/lib/R/site-library/BH/include/boost/spirit/home/qi/action/action.hpp:14:
In file included from /usr/local/lib/R/site-library/BH/include/boost/spirit/home/qi/meta_compiler.hpp:14:
In file included from /usr/local/lib/R/site-library/BH/include/boost/spirit/home/support/meta_compiler.hpp:19:
In file included from /usr/local/lib/R/site-library/BH/include/boost/proto/proto.hpp:13:
In file included from /usr/local/lib/R/site-library/BH/include/boost/proto/debug.hpp:12:
In file included from /usr/include/c++/v1/iostream:38:
In file included from /usr/include/c++/v1/ios:216:
In file included from /usr/include/c++/v1/__locale:15:
/usr/include/c++/v1/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)'
basic_string
<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
                                           
^
/usr/include/c++/v1/string:1326:40: note: previous declaration is here
    _LIBCPP_INLINE_VISIBILITY
explicit basic_string(const allocator_type& __a)
                                       
^
1 error generated.
/usr/lib/R/etc/Makeconf:143: recipe for target 'lang__ast_def.o' failed

Any ideas what could have changed in the past few months that would cause osmething like this?

Ben

Daniel Lee

unread,
Nov 30, 2015, 5:00:03 PM11/30/15
to stan-dev mailing list
This looks like the same error Allen has been patiently tracking down. My guess is that it's with Bob's indexing. How do I recreate this locally?

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

Ben Goodrich

unread,
Nov 30, 2015, 5:08:16 PM11/30/15
to stan development mailing list
On Monday, November 30, 2015 at 5:00:03 PM UTC-5, Daniel Lee wrote:
This looks like the same error Allen has been patiently tracking down. My guess is that it's with Bob's indexing. How do I recreate this locally?

Pull from https://github.com/stan-dev/rstan/pull/213 and try R CMD build /path/to/rstan/package

Ben

Daniel Lee

unread,
Nov 30, 2015, 5:18:31 PM11/30/15
to stan-dev mailing list
How do I change compilers for the build? It's working fine with the current version of clang++ for Mac.

Ben Goodrich

unread,
Nov 30, 2015, 5:20:52 PM11/30/15
to stan development mailing list
On Monday, November 30, 2015 at 5:18:31 PM UTC-5, Daniel Lee wrote:
How do I change compilers for the build? It's working fine with the current version of clang++ for Mac.

Specify CXX as something other than clang++ in the Makevars file described at

https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started#configuration

Ben

Daniel Lee

unread,
Nov 30, 2015, 5:38:36 PM11/30/15
to stan-dev mailing list
What version of g++ doesn't work?

Do older versions of g++, say 4.6, 4.7, 4.8, work?



Ben Goodrich

unread,
Nov 30, 2015, 5:59:42 PM11/30/15
to stan development mailing list
On Monday, November 30, 2015 at 5:38:36 PM UTC-5, Daniel Lee wrote:
What version of g++ doesn't work?

Do older versions of g++, say 4.6, 4.7, 4.8, work?

For me it fails with all versions of g++, but only if I use the binary version of R. For my self-compiled R, I can build rstan. So, it may be a Debian bug.

Ben
 
On Mon, Nov 30, 2015 at 5:20 PM, Ben Goodrich <goodri...@gmail.com> wrote:
On Monday, November 30, 2015 at 5:18:31 PM UTC-5, Daniel Lee wrote:
How do I change compilers for the build? It's working fine with the current version of clang++ for Mac.

Specify CXX as something other than clang++ in the Makevars file described at

https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started#configuration

Ben

--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+unsubscribe@googlegroups.com.

Jiqiang Guo

unread,
Nov 30, 2015, 7:52:27 PM11/30/15
to stan...@googlegroups.com
I am taking a look.  It might be just that there are files not complied into rstan.so. 

Jiqiang 
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.

Jiqiang Guo

unread,
Nov 30, 2015, 8:47:44 PM11/30/15
to stan...@googlegroups.com
I fixed the problem with https://github.com/stan-dev/rstan/commit/d2b24a9113894b7d4c4148bd13c9bb9ef9e180cd so now stanc in rstan can be built. 

But still the package cannot be built due to the refactor in writer.  @syclik, is there more refactor after your initial pull request?

Jiqiang 
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.

Daniel Lee

unread,
Nov 30, 2015, 8:49:36 PM11/30/15
to stan-dev mailing list
Thanks for find that! Wow.

Allen, I think this was the root cause of the problem with Pystan too.

Yes, there was. I'll update the pull request tonight.

On Mon, Nov 30, 2015 at 8:47 PM, Jiqiang Guo <guo...@gmail.com> wrote:
I fixed the problem with https://github.com/stan-dev/rstan/commit/d2b24a9113894b7d4c4148bd13c9bb9ef9e180cd so now stanc in rstan can be built. 

But still the package cannot be built due to the refactor in writer.  @syclik, is there more refactor after your initial pull request?

Jiqiang 

On Nov 30, 2015, at 5:59 PM, Ben Goodrich <goodri...@gmail.com> wrote:

On Monday, November 30, 2015 at 5:38:36 PM UTC-5, Daniel Lee wrote:
What version of g++ doesn't work?

Do older versions of g++, say 4.6, 4.7, 4.8, work?

For me it fails with all versions of g++, but only if I use the binary version of R. For my self-compiled R, I can build rstan. So, it may be a Debian bug.

Ben
 
On Mon, Nov 30, 2015 at 5:20 PM, Ben Goodrich <goodri...@gmail.com> wrote:
On Monday, November 30, 2015 at 5:18:31 PM UTC-5, Daniel Lee wrote:
How do I change compilers for the build? It's working fine with the current version of clang++ for Mac.

Specify CXX as something other than clang++ in the Makevars file described at

https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started#configuration

Ben

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

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

Bob Carpenter

unread,
Nov 30, 2015, 8:50:59 PM11/30/15
to stan...@googlegroups.com
Awesome! I was really worried about this one.

- Bob

> On Nov 30, 2015, at 8:47 PM, Jiqiang Guo <guo...@gmail.com> wrote:
>
> I fixed the problem with https://github.com/stan-dev/rstan/commit/d2b24a9113894b7d4c4148bd13c9bb9ef9e180cd so now stanc in rstan can be built.
>
> But still the package cannot be built due to the refactor in writer. @syclik, is there more refactor after your initial pull request?
>
> Jiqiang
>> On Nov 30, 2015, at 5:59 PM, Ben Goodrich <goodri...@gmail.com> wrote:
>>
>> On Monday, November 30, 2015 at 5:38:36 PM UTC-5, Daniel Lee wrote:
>> What version of g++ doesn't work?
>>
>> Do older versions of g++, say 4.6, 4.7, 4.8, work?
>>
>> For me it fails with all versions of g++, but only if I use the binary version of R. For my self-compiled R, I can build rstan. So, it may be a Debian bug.
>>
>> Ben
>>
>> On Mon, Nov 30, 2015 at 5:20 PM, Ben Goodrich <goodri...@gmail.com> wrote:
>> On Monday, November 30, 2015 at 5:18:31 PM UTC-5, Daniel Lee wrote:
>> How do I change compilers for the build? It's working fine with the current version of clang++ for Mac.
>>
>> Specify CXX as something other than clang++ in the Makevars file described at
>>
>> https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started#configuration
>>
>> Ben
>>
>> --
>> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.

Daniel Lee

unread,
Nov 30, 2015, 11:01:48 PM11/30/15
to stan-dev mailing list
I'm going to bed now. I'll try to have it done in the morning before the meeting.


Daniel

Ben Goodrich

unread,
Dec 1, 2015, 1:22:24 AM12/1/15
to stan development mailing list
On Monday, November 30, 2015 at 11:01:48 PM UTC-5, Daniel Lee wrote:
I'm going to bed now. I'll try to have it done in the morning before the meeting.

I got it a little bit farther, but it still does not build any models.

Daniel Lee

unread,
Dec 1, 2015, 11:49:25 AM12/1/15
to stan-dev mailing list
Ben, I got it working! But I had to comment out the advi stuff. I had to pull it out cause there's a new argument and I'm not quite sure how to do it easily.

Hopefully the pull request gets us close: https://github.com/stan-dev/rstan/pull/213



Ben Goodrich

unread,
Dec 1, 2015, 1:12:51 PM12/1/15
to stan development mailing list
On Tuesday, December 1, 2015 at 11:49:25 AM UTC-5, Daniel Lee wrote:
Ben, I got it working! But I had to comment out the advi stuff. I had to pull it out cause there's a new argument and I'm not quite sure how to do it easily.

Hopefully the pull request gets us close: https://github.com/stan-dev/rstan/pull/213

OK, I can probably manage from here.

Ben

Daniel Lee

unread,
Dec 1, 2015, 1:38:40 PM12/1/15
to stan-dev mailing list
I think Travis has changed their default git submodule behavior. We need to update the submodule.

Daniel Lee

unread,
Dec 1, 2015, 1:41:37 PM12/1/15
to stan-dev mailing list
Or... this one could be because the StanHeaders package is out of date.

Ben Goodrich

unread,
Dec 1, 2015, 1:52:12 PM12/1/15
to stan development mailing list
On Tuesday, December 1, 2015 at 1:41:37 PM UTC-5, Daniel Lee wrote:
Or... this one could be because the StanHeaders package is out of date.

I think it is going to be fine once I merge this PR into develop. Your last commit makes it build and run MCMC for me locally. I have another old branch that supported adaptive ADVI as of September.

Ben

Daniel Lee

unread,
Dec 1, 2015, 1:58:11 PM12/1/15
to stan-dev mailing list
The advi code is inside stan_fit.hpp, it's just commented out. (I don't know how it got there, but it wasn't compiling... I figured out that the argument order was changed, but there were other things that I didn't have the patience for at the moment.)



Reply all
Reply to author
Forward
0 new messages