stan-dev / pystan2

PyStan, the Python interface to Stan
GNU General Public License v3.0
920 stars 191 forks source link

compile problem on centos7 #583

Closed pseudotensor closed 5 years ago

pseudotensor commented 5 years ago

Summary:

Please provide a short couple sentence summary.

command 'gcc' failed with exit status 1

Description:

Describe the issue as clearly as possible.

fbprophet fails, and traced down to change just yesterday in dependency on pystan, where prophet was allowing >=2.14 and apparently 2.19 has major build changes.

Reproducible Steps:

Please report steps to reproduce the issue. If it's not possible to reproduce, please include a description of how you discovered the issue.

1) centos7 docker, with gcc, etc. 2) pip install pystan 3)

import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code) 

If you have a reproducible example, please include it.

Current Output:

The current output. Knowing what is the current behavior is useful.

[root@6c48cd41b7e9 ~]# python
Python 3.6.4 (default, Feb 15 2019, 01:46:58) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pystan
>>> 
>>> model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
>>> model = pystan.StanModel(model_code=model_code)  # this will take a minute
INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_5944b02c79788fa0db5b3a93728ca2bf NOW.
Traceback (most recent call last):
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
    extra_postargs)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/model.py", line 349, in __init__
    build_extension.run()
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
    depends=ext.depends)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/ccompiler.py", line 574, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
    raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
>>> model = pystan.StanModel(model_code=model_code, verbose=True)
INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_5944b02c79788fa0db5b3a93728ca2bf NOW.
INFO:pystan:OS: linux, Python: 3.6.4 (default, Feb 15 2019, 01:46:58) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)], Cython 0.28.3
Compiling /tmp/tmp0ba7mgez/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249.pyx because it changed.
[1/1] Cythonizing /tmp/tmp0ba7mgez/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249.pyx
building 'stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249' extension
creating /tmp/tmp0ba7mgez/tmp
creating /tmp/tmp0ba7mgez/tmp/tmp0ba7mgez
gcc -pthread -Wno-unused-result -Wsign-compare -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/tmp/tmp0ba7mgez -I/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan -I/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/src -I/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math -I/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/eigen_3.3.3 -I/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0 -I/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/sundials_4.1.0/include -I/opt/h2oai/dai/python/lib/python3.6/site-packages/numpy/core/include -I/opt/h2oai/dai/python/include/python3.6m -c /tmp/tmp0ba7mgez/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249.cpp -o /tmp/tmp0ba7mgez/tmp/tmp0ba7mgez/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249.o -O2 -ftemplate-depth-256 -Wno-unused-function -Wno-uninitialized -std=c++1y
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
In file included from /opt/h2oai/dai/python/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from /tmp/tmp0ba7mgez/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249.cpp:642:
/opt/h2oai/dai/python/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^
In file included from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/fun/ordered_constrain.hpp:6:0,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat.hpp:41,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/src/stan/model/log_prob_grad.hpp:4,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/src/stan/model/test_gradients.hpp:7,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/src/stan/services/diagnose/diagnose.hpp:10,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan_fit.hpp:22,
                 from /tmp/tmp0ba7mgez/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249.cpp:646:
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:31:32: error: 'std::index_sequence' has not been declared
                           std::index_sequence<I...> i) {
                                ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:31:46: error: expected ',' or '...' before '<' token
                           std::index_sequence<I...> i) {
                                              ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp: In function 'constexpr auto stan::math::internal::apply(const F&, const Tuple&)':
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:49:27: error: 'make_index_sequence' is not a member of 'std'
   return apply_impl(f, t, std::make_index_sequence<std::tuple_size<Tuple>{}>{});
                           ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:49:27: note: suggested alternative:
In file included from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/fusion/container/vector/vector.hpp:28:0,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/fusion/container/vector/vector10.hpp:25,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/fusion/view/transform_view/transform_view.hpp:22,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/fusion/algorithm/transformation/transform.hpp:11,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/fusion/view/zip_view/detail/begin_impl.hpp:14,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/fusion/view/zip_view/zip_view.hpp:16,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/fusion/view/zip_view.hpp:12,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/fusion/include/zip_view.hpp:11,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/numeric/odeint/util/resize.hpp:26,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/numeric/odeint/util/state_wrapper.hpp:26,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/numeric/odeint/util/ublas_wrapper.hpp:33,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/numeric/odeint.hpp:25,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/prim/arr/functor/integrate_ode_rk45.hpp:17,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/prim/arr.hpp:45,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat.hpp:327,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat.hpp:12,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/src/stan/model/log_prob_grad.hpp:4,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/src/stan/model/test_gradients.hpp:7,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/src/stan/services/diagnose/diagnose.hpp:10,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan_fit.hpp:22,
                 from /tmp/tmp0ba7mgez/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249.cpp:646:
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/boost/fusion/support/detail/index_sequence.hpp:59:12: note:   'boost::fusion::detail::make_index_sequence'
     struct make_index_sequence
            ^
In file included from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/fun/ordered_constrain.hpp:6:0,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat.hpp:41,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/src/stan/model/log_prob_grad.hpp:4,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/src/stan/model/test_gradients.hpp:7,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/src/stan/services/diagnose/diagnose.hpp:10,
                 from /opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan_fit.hpp:22,
                 from /tmp/tmp0ba7mgez/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249.cpp:646:
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:49:77: error: expected primary-expression before '{' token
   return apply_impl(f, t, std::make_index_sequence<std::tuple_size<Tuple>{}>{});
                                                                             ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:49:77: error: expected ')' before '{' token
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp: At global scope:
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:151:9: error: expected type-specifier
       = std::result_of_t<F(decltype(is_var_), decltype(value_of(Targs()))...)>;
         ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:156:42: error: 'FReturnType' was not declared in this scope
   std::array<int, internal::compute_dims<FReturnType>::value> M_;
                                          ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:156:53: error: template argument 1 is invalid
   std::array<int, internal::compute_dims<FReturnType>::value> M_;
                                                     ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:156:61: error: template argument 2 is invalid
   std::array<int, internal::compute_dims<FReturnType>::value> M_;
                                                             ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp: In member function 'std::vector<stan::math::var> stan::math::adj_jac_vari<F, Targs>::build_return_varis_and_vars(const std::vector<double>&)':
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:349:9: error: invalid types 'int[int]' for array subscript
     M_[0] = val_y.size();
         ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:350:32: error: invalid types 'int[int]' for array subscript
     std::vector<var> var_y(M_[0]);
                                ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp: In member function 'Eigen::Matrix<stan::math::var, R, C> stan::math::adj_jac_vari<F, Targs>::build_return_varis_and_vars(const Eigen::Matrix<double, R, C>&)':
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:375:9: error: invalid types 'int[int]' for array subscript
     M_[0] = val_y.rows();
         ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:376:9: error: invalid types 'int[int]' for array subscript
     M_[1] = val_y.cols();
         ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:377:40: error: invalid types 'int[int]' for array subscript
     Eigen::Matrix<var, R, C> var_y(M_[0], M_[1]);
                                        ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:377:47: error: invalid types 'int[int]' for array subscript
     Eigen::Matrix<var, R, C> var_y(M_[0], M_[1]);
                                               ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp: In member function 'void stan::math::adj_jac_vari<F, Targs>::chain()':
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:530:5: error: 'FReturnType' was not declared in this scope
     FReturnType y_adj;
     ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:530:17: error: expected ';' before 'y_adj'
     FReturnType y_adj;
                 ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:532:38: error: 'y_adj' was not declared in this scope
     internal::build_y_adj(y_vi_, M_, y_adj);
                                      ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:536:26: error: expansion pattern 'auto&&' contains no argument packs
         [this](auto&&... args) { this->accumulate_adjoints(args...); },
                          ^
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp: In lambda function:
/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/stan/lib/stan_math/stan/math/rev/mat/functor/adj_jac_apply.hpp:536:60: error: 'args' was not declared in this scope
         [this](auto&&... args) { this->accumulate_adjoints(args...); },
                                                            ^
/tmp/tmp0ba7mgez/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249.cpp: In function 'PyObject* __pyx_pf_70stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249_2_call_sampler(PyObject*, PyObject*, PyObject*, PyObject*)':
/tmp/tmp0ba7mgez/stanfit4anon_model_5944b02c79788fa0db5b3a93728ca2bf_132596967282494249.cpp:9469:71: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     __pyx_t_12 = ((__pyx_t_9 != __pyx_v_fitptr->param_names_oi().size()) != 0);
                                                                       ^
Traceback (most recent call last):
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
    extra_postargs)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/h2oai/dai/python/lib/python3.6/site-packages/pystan/model.py", line 349, in __init__
    build_extension.run()
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
    depends=ext.depends)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/ccompiler.py", line 574, in compile
    self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
  File "/opt/h2oai/dai/python/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
    raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
>>> 

Expected Output:

Describe what you expect the output to be. Knowing the correct behavior is also very useful.

Compile without error.

PyStan Version:

2.19, but 2.14-2.18 work fine.

Python Version:

3.6.4

Operating System:

x86 centos7

work-around for fbprophet is to install pystan<=2.18, e.g. 2.14 works fine.

pseudotensor commented 5 years ago

Google suggests need C++14 features, which centos7 doesn't have it (would need to rebuild gcc, which is non-trivial due to dependencies).

However, didn't have this issue with prior versions of pystan as of yesterday.

Something happened at April 7, 20:24 through 21:43 PST, as our build system shows.

ahartikainen commented 5 years ago

Stan 2.19 needs C++14 compatible compiler

See https://pystan.readthedocs.io/en/latest/whats_new.html#v2-19-0-0-31-mar-2019

PyPI was updated yesterday to pystan 2.19.

ahartikainen commented 5 years ago

Can you install 2.18 or 2.17?

pseudotensor commented 5 years ago

Yes, 2.18 is good. But just so you know, noone who has centos/redhat (which is alot of actual users out there) won't be able to use 2.19 etc. that require these compiler features.

ahartikainen commented 5 years ago

Good to know. These compiler options are handled and decided in the main Stan lib.

cc @seantalts do we have some solutions for centos/redhat users?

riddell-stan commented 5 years ago

You'll have to install a newer version of gcc. I think instructions for doing this should be easy to find.

(We actually install a newer version of gcc on a centos docker image in order to build the Python wheels for Linux -- so I know it's possible.)

On 5/9/19 4:23 AM, Ari Hartikainen wrote:

Good to know. These compiler options are handled and decided in the main Stan lib.

cc @seantalts https://github.com/seantalts do we have some solutions for centos/redhat users?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/583#issuecomment-490807158, or mute the thread https://github.com/notifications/unsubscribe-auth/AJQUBVUFXRZK5O22RYS2G73PUPNQ3ANCNFSM4HEGWSOQ.

seantalts commented 5 years ago

Yep. And for the record, you can always "install" packages in your home directory and set your own PATH on Linux (e.g. this post doing so with clang some years ago on SO).

pseudotensor commented 5 years ago

I suppose you are saying there was some major reason to switch to C++14 features, or are you saying there was no good reason and weren't aware of this issue of lack of support on centos/redhat and you are just giving a solution now that you can't go back?

seantalts commented 5 years ago

There are major reasons we switched to C++1y if that helps.

On Thu, May 9, 2019 at 16:14 pseudotensor notifications@github.com wrote:

I suppose you are saying there was some major reason to switch to C++14 features, or are you saying there was no good reason and weren't aware of this issue of lack of support on centos/redhat and you are just giving a solution now that you can't go back?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stan-dev/pystan/issues/583#issuecomment-491049165, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGET3AGDGXY7XMK2CMEBJLPUSAY3ANCNFSM4HEGWSOQ .

fcamuz commented 5 years ago

I get the same error on Majowe, when I try to install fbprophet. It seems pystan installed succesfully however, when I test, it does not work properly and throws the same error. I have tried to downgrade it however, it gives following error. Please help.

ERROR: Cannot uninstall 'pystan'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

ahartikainen commented 5 years ago

Please create a new issue if you have a problem with macOS Mojave.

andirey commented 4 years ago

INFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_861b75c6337e237650a61ae58c4385ef NOW. error: command '/usr/bin/clang' failed with exit status 1

==

clang --version Apple LLVM version 9.1.0 (clang-902.0.39.1) Target: x86_64-apple-darwin17.3.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

How to fix it?

ahartikainen commented 4 years ago

Hi, please create a new issue if you have compilation problems.