Stan package broken

  • Done
  • quality assurance status badge
Details
3 participants
  • Sarah Morgensen
  • Kyle Andrews
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Kyle Andrews
Severity
normal

Debbugs page

Kyle Andrews wrote 4 years ago
(address . bug-guix@gnu.org)
878s2q1ef4.fsf@gmail.com
Hello,

I tried to run a "Hello World" stan model using the r-rstan package.

#+BEGIN_SRC R
stancode="data {
int<lower=0> N;
vector[N] x;
vector[N] y;
}
parameters {
real alpha;
real beta;
real<lower=0> sigma;
}
model {
y ~ normal(alpha + beta * x, sigma);
}
"
stan_lm = stan(model_code = stancode)
#+END_SRC

Running that code I get the error:

#+BEGIN_EXAMPLE
Error in dyn.load(libLFile) :
unable to load shared object '/tmp/Rtmp1AXXXr/file1ffd36a95fa3.so':
/gnu/store/741057r2x06zwg6zcmqmdyv51spm6n9i-gfortran-7.5.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /tmp/Rtmp1AXXXr/file1ffd36a95fa3.so)
Error in sink(type = "output") : invalid connection
#+END_EXAMPLE

I setup my environment with:

: guix environment --ad-hoc r-rstan r-rstanarm r
Sarah Morgensen wrote 4 years ago
(name . Kyle Andrews)(address . kyle.c.andrews@gmail.com)(address . 49314@debbugs.gnu.org)
86lf5xr48e.fsf@mgsn.dev
Hello,

Thanks for the bug report.

Kyle Andrews <kyle.c.andrews@gmail.com> writes:

[...]

Toggle quote (5 lines)
> #+BEGIN_EXAMPLE
> Error in dyn.load(libLFile) :
> unable to load shared object '/tmp/Rtmp1AXXXr/file1ffd36a95fa3.so':
> /gnu/store/741057r2x06zwg6zcmqmdyv51spm6n9i-gfortran-7.5.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /tmp/Rtmp1AXXXr/file1ffd36a95fa3.so)

This kind of error typically occurs when something is compiled with a
newer version of GCC/glibc and then linked with an older version. Do you
happen to have a gcc or gcc-toolchain installed in your profile (and
does removing it solve this issue)?

Toggle quote (7 lines)
> Error in sink(type = "output") : invalid connection
> #+END_EXAMPLE
>
> I setup my environment with:
>
> : guix environment --ad-hoc r-rstan r-rstanarm r

Alternatively, you could try

guix environment --pure --ad-hoc r-rstan r-rstanarm r bash coreutils

(Using --pure prevents packages from your profile being used.)

--
Sarah
Maxim Cournoyer wrote 3 years ago
(name . Kyle Andrews)(address . kyle.c.andrews@gmail.com)(address . 49314-done@debbugs.gnu.org)
8735f6a2x6.fsf@gmail.com
Hi,

Kyle Andrews <kyle.c.andrews@gmail.com> writes:

Toggle quote (36 lines)
> Hello,
>
> I tried to run a "Hello World" stan model using the r-rstan package.
>
> #+BEGIN_SRC R
> stancode="data {
> int<lower=0> N;
> vector[N] x;
> vector[N] y;
> }
> parameters {
> real alpha;
> real beta;
> real<lower=0> sigma;
> }
> model {
> y ~ normal(alpha + beta * x, sigma);
> }
> "
> stan_lm = stan(model_code = stancode)
> #+END_SRC
>
>
> Running that code I get the error:
>
> #+BEGIN_EXAMPLE
> Error in dyn.load(libLFile) :
> unable to load shared object '/tmp/Rtmp1AXXXr/file1ffd36a95fa3.so':
> /gnu/store/741057r2x06zwg6zcmqmdyv51spm6n9i-gfortran-7.5.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /tmp/Rtmp1AXXXr/file1ffd36a95fa3.so)
> Error in sink(type = "output") : invalid connection
> #+END_EXAMPLE
>
> I setup my environment with:
>
> : guix environment --ad-hoc r-rstan r-rstanarm r

I've tried exercising some of the things shown at
shell r-rstan r-rstanarm r-minimal' and it seems to work. I'm on Guix
commit 17892c5.

Closing.

Thanks for the report!

Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49314@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49314
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help