Open tdhock opened 6 months ago
emacs1 conda env has boost 1.70.0 (April 2019) conda install boost to fresh env has 1.82.0 (April 2023) boost::math::constants::two_div_root_pi was apparently added in Sep 2019 https://github.com/boostorg/math/commit/417d10c7e448763dfdb6c65b152bb89dac404c01
is it looking for boost in BH package, or in system library?
Because BH (≥ 1.78.0.0) is listed in LinkingTo, I expected that roxde2ll should use that version of Boost, and not my system/conda version (which is too old, and gives me an error).
The compilation command that fails on my system is:
/packages/gcc/12.2.0-nnbserq/bin/g++ -std=gnu++17
-I"/home/th798/R/R-devel/include" -DNDEBUG
-I'/projects/genomic-ml/R/R-devel/library/Rcpp/include'
-I'/projects/genomic-ml/R/R-devel/library/RcppEigen/include'
-I'/projects/genomic-ml/R/R-devel/library/StanHeaders/include'
-I'/projects/genomic-ml/R/R-devel/library/BH/include'
-I'/projects/genomic-ml/R/R-devel/library/RcppParallel/include'
-I/home/th798/.conda/envs/emacs1/include
-I/home/th798/include
-fopenmp -D_isrxode2parse_
-DBOOST_DISABLE_ASSERTS -DBOOST_NO_CXX11_STATIC_ASSERT
-DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION
-D_HAS_AUTO_PTR_ETC=0 -D_REENTRANT
-isystem"/projects/genomic-ml/R/R-devel/library/BH/include"
-isystem"/projects/genomic-ml/R/R-devel/library/RcppEigen/include"
-isystem'/projects/genomic-ml/R/R-devel/library/RcppParallel/include'
-D_REENTRANT -DSTAN_THREADS
-isystem'/projects/genomic-ml/R/R-devel/library/StanHeaders/include/src'
-isystem"/projects/genomic-ml/R/R-devel/library/Rcpp/include" -fpic
-I/packages/gcc/12.2.0-nnbserq/include -I/packages/zstd/1.5.2-cs5ansz/include
-I/packages/zlib/1.2.13-po6bkge/include -I/packages/mpc/1.2.1-nnfoiwh/include
-I/packages/mpfr/4.1.0-yfsqqka/include -I/packages/gmp/6.2.1-7ydtie6/include
-c llikBeta.cpp -o llikBeta.o
In file included from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/rev/core/operator_addition.hpp:10,
from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/rev/core.hpp:28,
from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/rev.hpp:8,
from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math.hpp:19,
from llik2.h:7,
from llikBeta.cpp:1:
/projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/prim/fun/constants.hpp:169:31: error: 'two_div_root_pi' is not a member of 'boost::math::constants'; did you mean 'one_div_root_pi'?
169 | = boost::math::constants::two_div_root_pi<double>();
| ^~~~~~~~~~~~~~~
| one_div_root_pi
/projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/prim/fun/constants.hpp:169:47: error: expected primary-expression before 'double'
169 | = boost::math::constants::two_div_root_pi<double>();
| ^~~~~~
In file included from /home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/traits.hpp:21,
from /home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/storage.hpp:26,
from /home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/vector.hpp:21,
from /home/th798/.conda/envs/emacs1/include/boost/numeric/odeint/util/ublas_wrapper.hpp:23,
from /home/th798/.conda/envs/emacs1/include/boost/numeric/odeint.hpp:25,
from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/prim/functor/ode_rk45.hpp:9,
from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/prim/functor/integrate_ode_rk45.hpp:6,
from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/prim/functor.hpp:16,
from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/rev/fun.hpp:200,
from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/rev.hpp:10:
/home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/detail/iterator.hpp:111:21: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations]8;;]
111 | public std::iterator<IC, T> {
| ^~~~~~~~
In file included from /packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_algobase.h:65,
from /packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/specfun.h:45,
from /packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/cmath:1935,
from /packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/complex:44,
from /projects/genomic-ml/R/R-devel/library/RcppEigen/include/Eigen/Core:96,
from /projects/genomic-ml/R/R-devel/library/RcppEigen/include/Eigen/Dense:1,
from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22,
from /projects/genomic-ml/R/R-devel/library/StanHeaders/include/stan/math/rev.hpp:4:
/packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
/home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/detail/iterator.hpp:149:21: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations]8;;]
149 | public std::iterator<IC, T> {
| ^~~~~~~~
/packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
/home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/detail/iterator.hpp:204:21: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations]8;;]
204 | public std::iterator<IC, T> {
| ^~~~~~~~
/packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
make: *** [/home/th798/R/R-devel/etc/Makeconf:200: llikBeta.o] Error 1
ERROR: compilation failed for package ‘rxode2ll’
* removing ‘/projects/genomic-ml/R/R-devel/library/rxode2ll’
Man gcc says -I and -isystem flags are searched in left to right order, and it looks like BH/include comes before .conda/envs/emacs1/include
The command below works though... difference seems to be the g++ version?
g++ -std=gnu++17
-I"/home/th798/lib64/R/include" -DNDEBUG
-I'/projects/genomic-ml/lib64/R/library/Rcpp/include'
-I'/projects/genomic-ml/lib64/R/library/RcppEigen/include'
-I'/projects/genomic-ml/lib64/R/library/StanHeaders/include'
-I'/projects/genomic-ml/lib64/R/library/BH/include'
-I'/projects/genomic-ml/lib64/R/library/RcppParallel/include'
-I/home/th798/.conda/envs/emacs1/include
-I/home/th798/include
-fopenmp -D_isrxode2parse_
-DBOOST_DISABLE_ASSERTS -DBOOST_NO_CXX11_STATIC_ASSERT
-DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION
-D_HAS_AUTO_PTR_ETC=0 -D_REENTRANT
-isystem"/projects/genomic-ml/lib64/R/library/BH/include"
-isystem"/projects/genomic-ml/lib64/R/library/RcppEigen/include"
-isystem'/projects/genomic-ml/lib64/R/library/RcppParallel/include'
-D_REENTRANT -DSTAN_THREADS -D_HAS_AUTO_PTR_ETC=0
-isystem'/projects/genomic-ml/lib64/R/library/StanHeaders/include/src'
-isystem"/projects/genomic-ml/lib64/R/library/Rcpp/include"
-fpic -g -O2 -c llikBeta.cpp -o llikBeta.o
below i start with the command that works, and change just g++ to spack g++, and now there is a warning instead of an error, why?
(boost) th798@cn48:~/R/rxode2ll/src$ g++ -std=gnu++17 -I"/home/th798/lib64/R/include" -DNDEBUG -I'/projects/genomic-ml/lib64/R/library/Rcpp/include' -I'/projects/genomic-ml/lib64/R/library/RcppEigen/include' -I'/projects/genomic-ml/lib64/R/library/StanHeaders/include' -I'/projects/genomic-ml/lib64/R/library/BH/include' -I'/projects/genomic-ml/lib64/R/library/RcppParallel/include' -I/home/th798/.conda/envs/emacs1/include -I/home/th798/include -fopenmp -D_isrxode2parse_ -DBOOST_DISABLE_ASSERTS -DBOOST_NO_CXX11_STATIC_ASSERT -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -D_HAS_AUTO_PTR_ETC=0 -D_REENTRANT -isystem"/projects/genomic-ml/lib64/R/library/BH/include" -isystem"/projects/genomic-ml/lib64/R/library/RcppEigen/include" -isystem'/projects/genomic-ml/lib64/R/library/RcppParallel/include' -D_REENTRANT -DSTAN_THREADS -D_HAS_AUTO_PTR_ETC=0 -isystem'/projects/genomic-ml/lib64/R/library/StanHeaders/include/src' -isystem"/projects/genomic-ml/lib64/R/library/Rcpp/include" -fpic -g -O2 -c llikBeta.cpp -o llikBeta.o
(boost) th798@cn48:~/R/rxode2ll/src$ /packages/gcc/12.2.0-nnbserq/bin/g++ -std=gnu++17 -I"/home/th798/lib64/R/include" -DNDEBUG -I'/projects/genomic-ml/lib64/R/library/Rcpp/include' -I'/projects/genomic-ml/lib64/R/library/RcppEigen/include' -I'/projects/genomic-ml/lib64/R/library/StanHeaders/include' -I'/projects/genomic-ml/lib64/R/library/BH/include' -I'/projects/genomic-ml/lib64/R/library/RcppParallel/include' -I/home/th798/.conda/envs/emacs1/include -I/home/th798/include -fopenmp -D_isrxode2parse_ -DBOOST_DISABLE_ASSERTS -DBOOST_NO_CXX11_STATIC_ASSERT -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -D_HAS_AUTO_PTR_ETC=0 -D_REENTRANT -isystem"/projects/genomic-ml/lib64/R/library/BH/include" -isystem"/projects/genomic-ml/lib64/R/library/RcppEigen/include" -isystem'/projects/genomic-ml/lib64/R/library/RcppParallel/include' -D_REENTRANT -DSTAN_THREADS -D_HAS_AUTO_PTR_ETC=0 -isystem'/projects/genomic-ml/lib64/R/library/StanHeaders/include/src' -isystem"/projects/genomic-ml/lib64/R/library/Rcpp/include" -fpic -g -O2 -c llikBeta.cpp -o llikBeta.o
In file included from /home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/traits.hpp:21,
from /home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/storage.hpp:26,
from /home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/vector.hpp:21,
from /home/th798/.conda/envs/emacs1/include/boost/numeric/odeint/util/ublas_wrapper.hpp:23,
from /home/th798/.conda/envs/emacs1/include/boost/numeric/odeint.hpp:25,
from /projects/genomic-ml/lib64/R/library/StanHeaders/include/stan/math/prim/functor/ode_rk45.hpp:9,
from /projects/genomic-ml/lib64/R/library/StanHeaders/include/stan/math/prim/functor/integrate_ode_rk45.hpp:6,
from /projects/genomic-ml/lib64/R/library/StanHeaders/include/stan/math/prim/functor.hpp:16,
from /projects/genomic-ml/lib64/R/library/StanHeaders/include/stan/math/rev/fun.hpp:8,
from /projects/genomic-ml/lib64/R/library/StanHeaders/include/stan/math/rev.hpp:10,
from /projects/genomic-ml/lib64/R/library/StanHeaders/include/stan/math.hpp:19,
from llik2.h:7,
from llikBeta.cpp:1:
/home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/detail/iterator.hpp:111:21: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations]8;;]
111 | public std::iterator<IC, T> {
| ^~~~~~~~
In file included from /packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_algobase.h:65,
from /packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/specfun.h:45,
from /packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/cmath:1935,
from /packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/complex:44,
from /projects/genomic-ml/lib64/R/library/RcppEigen/include/Eigen/Core:96,
from /projects/genomic-ml/lib64/R/library/RcppEigen/include/Eigen/Dense:1,
from /projects/genomic-ml/lib64/R/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22,
from /projects/genomic-ml/lib64/R/library/StanHeaders/include/stan/math/rev.hpp:4:
/packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
/home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/detail/iterator.hpp:149:21: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations]8;;]
149 | public std::iterator<IC, T> {
| ^~~~~~~~
/packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
/home/th798/.conda/envs/emacs1/include/boost/numeric/ublas/detail/iterator.hpp:204:21: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations]8;;]
204 | public std::iterator<IC, T> {
| ^~~~~~~~
/packages/gcc/12.2.0-nnbserq/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
Can't hurt to cc @mattfidler -- any idea what might be behind the failure to compile+install {rxode2ll}?
It is StanHeaders
with boost
. If you are using an old version of R, you likely need to match the version of boost that StanHeaders
used at the time. For me, I have had to downgrade boost
for old version of windows toolchains on old compilers. However if you are using the most recent version of R, the most recent versions of boost
and StanHeaders
work.
Since this is really outside my package (I simply use it). I cannot provide any more details here.
looks like there is something that requires a newer version of boost?