Yggdrasil
Yggdrasil copied to clipboard
Add binaries for CmdStan and Stan
This would be nice to have since many PPLs want to test and benchmark against Stan.
Xref: https://github.com/StanJulia/CmdStan.jl/issues/92 @goedman @yebai @sethaxen
Yes, this would be quite nice. Mostly for installing CmdStan.jl, as in the issue you linked. It would be nice for testing too, but caching a cmdstan build for CI isn't that hard.
I'm looking into this, so far it seems that these tools don't like being cross-compiled.
it seems that these tools don't like being cross-compiled
Nor Python does, we had to lie to convince it to cross-compiler :joy:
What kind of problems are you seeing?
I'll know more after I finish looking through the 80,000 line stderr... but most of the errors seem to be "this thing isn't defined in std" or other errors in their vendored boost.
Also on Windows it seems to expect you to build with Rtools, but I haven't really tried much there yet.
or other errors in their vendored boost
:sob:
Ok, what you said doesn't sound particularly encouraging :disappointed:
It's been at least 10 years since I touched C++, but a couple of reasons why I have always hesitated to go there:
-
Supporting cmdstan on many different platforms has taken several years of effort and is still far from simple (e.g. the recent experiences with MacOS Catalina, on-going Windows Rtools chain issues and even occasionally versions of Linux).
-
Since cmdstan 2.21.0, compilation of a Stan Language program occurs in 2 steps. For C++ both the precompiled parts (on the first run) and the back-end parts require the same toolchain (at least on MacOS).
-
User defined functions still need to be compiled.
-
In the upcoming Stanc3, the Stan Language to C++ part of this process will be switched from C++ to OCaml. But I still expect all libraries need to be compiled with a matching compiler.
Are there other examples in the artifacts of a C++/Boost based binary that needs further linking? R clearly did it (and uses a more difficult setup than cmdstan as it uses Rcpp) but with very strict tool chain restrictions.
Are there other examples in the artifacts of a C++/Boost based binary that needs further linking?
With a quick search I fond the following builders using Boost: CGAL, HELICS, and mlpack
If anyone is interested in following along, @Wimmerer started the effort to build Stan in #2830.
It's been a while but recently someone (on Windows) asked questions about the conda route to install cmdstan and we've tested it and it works.
Not sure where this issue ended. The conda route is of course not a binary, but hopefully can help in some cases.
Cross compilation just wasn't a goal for the Stan devs. It might've been possible to get it building with an absolute ton of patches, but it wasn't feasible without upstream support.