hahnlab / CAGEE

Computational Analysis of Gene Expression Evolution
Other
36 stars 2 forks source link

Emergent compilation errors #15

Closed jtourig closed 2 years ago

jtourig commented 2 years ago

When rebuilding CAGEE from the latest commit 3d0b82b, I'm suddenly getting a lot of compilation errors. Any idea what gives?

Installing CAGEE on RED / Carbonate from Github
    using system modules for depencies
    install prefix = /N/u/tourigny/Carbonate/usr/local/
    add'l CMAKE opts = 

  *** Press Ctrl-c to cancel ***
  Fetching and installing CAGEE from Github...
  Moved to /N/u/tourigny/Carbonate/usr/local/src
  Removed existing CAGEE dir
Cloning into 'CAGEE'...

  CAGEE repository downloaded to /N/u/tourigny/Carbonate/usr/local/src/CAGEE
  Loading dependency modules:
    boost cmake eigen
boost version 1.72.0 loaded.
cmake version 3.18.4 loaded.
eigen version 3.4.0 loaded.
  Building CAGEE from source with 12 procs...
  moved to /N/u/tourigny/Carbonate/usr/local/src/CAGEE
mkdir: created directory ‘build’
  moved to /N/u/tourigny/Carbonate/usr/local/src/CAGEE/build
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for getopt.h
-- Looking for getopt.h - found
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /N/soft/rhel7/intel/19.5/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64_lin/libmkl_intel_lp64.so;/N/soft/rhel7/intel/19.5/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64_lin/libmkl_intel_thread.so;/N/soft/rhel7/intel/19.5/compilers_and_libraries_2019.5.281/linux/mkl/lib/intel64_lin/libmkl_core.so;/N/soft/rhel7/intel/19.5/compilers_and_libraries_2019.5.281/linux/compiler/lib/intel64_lin/libiomp5.so;-lpthread;-lm;-ldl  
-- Found Boost: /N/soft/rhel7/boost/gnu/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake (found version "1.72.0") found components: program_options 
-- Found OpenMP_C: -fopenmp (found version "3.1") 
-- Found OpenMP_CXX: -fopenmp (found version "3.1") 
-- Found OpenMP: TRUE (found version "3.1")  
-- Configuring done
-- Generating done
-- Build files have been written to: /N/u/tourigny/Carbonate/usr/local/src/CAGEE/build
Scanning dependencies of target check_git
[  3%] Checking the git repository for changes...
[  3%] Built target check_git
Scanning dependencies of target git
[  6%] Building CXX object CMakeFiles/git.dir/git_version.cpp.o
[  9%] Linking CXX static library libgit.a
[  9%] Built target git
Scanning dependencies of target cagee
[ 12%] Building CXX object CMakeFiles/cagee.dir/main.cpp.o
[ 18%] Building CXX object CMakeFiles/cagee.dir/src/DiffMat.cpp.o
[ 18%] Building CXX object CMakeFiles/cagee.dir/src/cagee.cpp.o
[ 34%] Building CXX object CMakeFiles/cagee.dir/src/sigma.cpp.o
[ 34%] Building CXX object CMakeFiles/cagee.dir/src/user_data.cpp.o
[ 34%] Building CXX object CMakeFiles/cagee.dir/src/core.cpp.o
[ 34%] Building CXX object CMakeFiles/cagee.dir/src/optimizer_scorer.cpp.o
[ 34%] Building CXX object CMakeFiles/cagee.dir/src/gamma_core.cpp.o
[ 43%] Building CXX object CMakeFiles/cagee.dir/src/likelihood_ratio.cpp.o
[ 43%] Building CXX object CMakeFiles/cagee.dir/src/arguments.cpp.o
[ 43%] Building CXX object CMakeFiles/cagee.dir/src/easylogging++.cpp.o
[ 46%] Building CXX object CMakeFiles/cagee.dir/src/transcript_reconstructor.cpp.o
[ 50%] Building CXX object CMakeFiles/cagee.dir/src/rootdist_estimator.cpp.o
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/sigma.cpp: In function ‘void _DOCTEST_ANON_FUNC_0()’:
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/sigma.cpp:62:5: error: ‘unique_ptr’ was not declared in this scope
     unique_ptr<clade> p_tree(parse_newick("(A:1,B:3):7"));
     ^
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/sigma.cpp:62:21: error: expected primary-expression before ‘>’ token
     unique_ptr<clade> p_tree(parse_newick("(A:1,B:3):7"));
                     ^
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/sigma.cpp:62:57: error: there are no arguments to ‘p_tree’ that depend on a template parameter, so a declaration of ‘p_tree’ must be available [-fpermissive]
     unique_ptr<clade> p_tree(parse_newick("(A:1,B:3):7"));
                                                         ^
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/sigma.cpp:62:57: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/sigma.cpp: In function ‘void _DOCTEST_ANON_FUNC_1()’:
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/sigma.cpp:79:5: error: ‘unique_ptr’ was not declared in this scope
     unique_ptr<clade> p_tree(parse_newick("(A:1,B:3):7"));
     ^
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/sigma.cpp:79:21: error: expected primary-expression before ‘>’ token
     unique_ptr<clade> p_tree(parse_newick("(A:1,B:3):7"));
                     ^
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/sigma.cpp:79:57: error: there are no arguments to ‘p_tree’ that depend on a template parameter, so a declaration of ‘p_tree’ must be available [-fpermissive]
     unique_ptr<clade> p_tree(parse_newick("(A:1,B:3):7"));
                                                         ^
[ 53%] Building CXX object CMakeFiles/cagee.dir/src/base_model.cpp.o
make[2]: *** [CMakeFiles/cagee.dir/src/sigma.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp: In lambda function:
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:78:23: error: call of overloaded ‘isnan(double&)’ is ambiguous
         return isnan(d) ? -numeric_limits<double>::infinity() : d;
                       ^
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:78:23: note: candidates are:
In file included from /usr/include/features.h:375:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
                 from /usr/include/c++/4.8.2/cmath:41,
                 from /N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:1:
/usr/include/bits/mathcalls.h:235:1: note: int isnan(double)
 __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
 ^
In file included from /N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:1:0:
/usr/include/c++/4.8.2/cmath:626:3: note: constexpr bool std::isnan(long double)
   isnan(long double __x)
   ^
/usr/include/c++/4.8.2/cmath:622:3: note: constexpr bool std::isnan(double)
   isnan(double __x)
   ^
/usr/include/c++/4.8.2/cmath:618:3: note: constexpr bool std::isnan(float)
   isnan(float __x)
   ^
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp: In lambda function:
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:84:106: error: call of overloaded ‘isinf(double&)’ is ambiguous
     double likelihood = accumulate(full.begin(), full.end(), 0.0, [](double a, double b) { return isinf(b) ? a : a+b; }); // sum over all sizes (Felsenstein's approach)
                                                                                                          ^
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:84:106: note: candidates are:
In file included from /usr/include/features.h:375:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
                 from /usr/include/c++/4.8.2/cmath:41,
                 from /N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:1:
/usr/include/bits/mathcalls.h:202:1: note: int isinf(double)
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
 ^
In file included from /N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:1:0:
/usr/include/c++/4.8.2/cmath:608:3: note: constexpr bool std::isinf(long double)
   isinf(long double __x)
   ^
/usr/include/c++/4.8.2/cmath:604:3: note: constexpr bool std::isinf(double)
   isinf(double __x)
   ^
/usr/include/c++/4.8.2/cmath:600:3: note: constexpr bool std::isinf(float)
   isinf(float __x)
   ^
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp: In lambda function:
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:110:97: error: call of overloaded ‘isnan(double&)’ is ambiguous
     if (all_of(priors.begin(), priors.end(), [](double prior) { return prior <= 0 || isnan(prior); }))
                                                                                                 ^
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:110:97: note: candidates are:
In file included from /usr/include/features.h:375:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
                 from /usr/include/c++/4.8.2/cmath:41,
                 from /N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:1:
/usr/include/bits/mathcalls.h:235:1: note: int isnan(double)
 __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
 ^
In file included from /N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:1:0:
/usr/include/c++/4.8.2/cmath:626:3: note: constexpr bool std::isnan(long double)
   isnan(long double __x)
   ^
/usr/include/c++/4.8.2/cmath:622:3: note: constexpr bool std::isnan(double)
   isnan(double __x)
   ^
/usr/include/c++/4.8.2/cmath:618:3: note: constexpr bool std::isnan(float)
   isnan(float __x)
   ^
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:6:
/usr/include/c++/4.8.2/bits/stl_algo.h: In instantiation of ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = __gnu_cxx::__normal_iterator<double*, std::vector<double> >; _OIter = __gnu_cxx::__normal_iterator<double*, std::vector<double> >; _UnaryOperation = compute_prior_likelihood(const std::vector<double>&, const std::vector<double>&)::__lambda0]’:
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:79:10:   required from here
/usr/include/c++/4.8.2/bits/stl_algo.h:4926:12: error: void value not ignored as it ought to be
  *__result = __unary_op(*__first);
            ^
In file included from /usr/include/c++/4.8.2/numeric:62:0,
                 from /N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:2:
/usr/include/c++/4.8.2/bits/stl_numeric.h: In instantiation of ‘_Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation) [with _InputIterator = __gnu_cxx::__normal_iterator<double*, std::vector<double> >; _Tp = double; _BinaryOperation = compute_prior_likelihood(const std::vector<double>&, const std::vector<double>&)::__lambda1]’:
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:84:120:   required from here
/usr/include/c++/4.8.2/bits/stl_numeric.h:154:9: error: void value not ignored as it ought to be
  __init = __binary_op(__init, *__first);
         ^
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:6:
/usr/include/c++/4.8.2/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__find_if_not(_RandomAccessIterator, _RandomAccessIterator, _Predicate, std::random_access_iterator_tag) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<double*, std::vector<double> >; _Predicate = base_model::infer_family_likelihoods(const user_data&, const sigma_squared*, const std::gamma_distribution<double>&)::__lambda2]’:
/usr/include/c++/4.8.2/bits/stl_algo.h:317:38:   required from ‘_InputIterator std::__find_if_not(_InputIterator, _InputIterator, _Predicate) [with _InputIterator = __gnu_cxx::__normal_iterator<double*, std::vector<double> >; _Predicate = base_model::infer_family_likelihoods(const user_data&, const sigma_squared*, const std::gamma_distribution<double>&)::__lambda2]’
/usr/include/c++/4.8.2/bits/stl_algo.h:787:56:   required from ‘_IIter std::find_if_not(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<double*, std::vector<double> >; _Predicate = base_model::infer_family_likelihoods(const user_data&, const sigma_squared*, const std::gamma_distribution<double>&)::__lambda2]’
/usr/include/c++/4.8.2/bits/stl_algo.h:730:64:   required from ‘bool std::all_of(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<double*, std::vector<double> >; _Predicate = base_model::infer_family_likelihoods(const user_data&, const sigma_squared*, const std::gamma_distribution<double>&)::__lambda2]’
/N/u/tourigny/Carbonate/usr/local/src/CAGEE/src/base_model.cpp:110:101:   required from here
/usr/include/c++/4.8.2/bits/stl_algo.h:273:29: error: void value not ignored as it ought to be
    if (!bool(__pred(*__first)))
                             ^
/usr/include/c++/4.8.2/bits/stl_algo.h:277:29: error: void value not ignored as it ought to be
    if (!bool(__pred(*__first)))
                             ^
/usr/include/c++/4.8.2/bits/stl_algo.h:281:29: error: void value not ignored as it ought to be
    if (!bool(__pred(*__first)))
                             ^
/usr/include/c++/4.8.2/bits/stl_algo.h:285:29: error: void value not ignored as it ought to be
    if (!bool(__pred(*__first)))
                             ^
/usr/include/c++/4.8.2/bits/stl_algo.h:293:29: error: void value not ignored as it ought to be
    if (!bool(__pred(*__first)))
                             ^
/usr/include/c++/4.8.2/bits/stl_algo.h:297:29: error: void value not ignored as it ought to be
    if (!bool(__pred(*__first)))
                             ^
/usr/include/c++/4.8.2/bits/stl_algo.h:301:29: error: void value not ignored as it ought to be
    if (!bool(__pred(*__first)))
                             ^
make[2]: *** [CMakeFiles/cagee.dir/src/base_model.cpp.o] Error 1
make[1]: *** [CMakeFiles/cagee.dir/all] Error 2
make: *** [all] Error 2

  ERROR: Problem(s) building CAGEE

  EXITING...
jtourig commented 2 years ago

Resolved by adding -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ to CMake call; it was apparently trying to run from /usr/bin/c++, which pointed to gcc v4.8.5. No idea why this emerged as a problem now.