REViewer icon indicating copy to clipboard operation
REViewer copied to clipboard

Issues building from source with cmake

Open sheinasim opened this issue 2 years ago • 5 comments

Hi there!

I'm trying to install this in my local space on an HPC and I'm getting this error both when I clone the repo and when I download the latest release:

make[4]: *** [thirdparty/graph-tools/CMakeFiles/graphtools.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [reviewer-prefix/src/reviewer-stamp/reviewer-build] Error 2
make[1]: *** [CMakeFiles/reviewer.dir/all] Error 2
make: *** [all] Error 2

I'm setting up the environment using conda. Any thoughts as to what is causing the error?

Thanks! Sheina

sheinasim avatar Oct 22 '22 03:10 sheinasim

Hi sheinasim! Sorry it's taken me a few days to get to this. Would you mind posting the full contents of your build process?

sclamons avatar Oct 25 '22 15:10 sclamons

Hello @sclamons!

Thank you for your reply. I actually found a workaround by installing it locally to my laptop instead of the HPC.

I did actually end up with another issue, is there a way to create the BAMlet file and the .vcf from long read data? ExpansionHunter requires paired reads, and ultimately, I'd like to use REViewer to visualize my repeats (less so to characterize repeat variants).

Thanks! Sheina

sheinasim avatar Oct 26 '22 01:10 sheinasim

ReViewer was built to handle short reads, not long reads. I'm legitimately not sure what will happen if you throw long read data at it!

I assume you've tried running Expansion Hunter on your long read data?

On Tue, Oct 25, 2022, 6:32 PM Sheina Sim @.***> wrote:

Hello @sclamons https://github.com/sclamons!

Thank you for your reply. I actually found a workaround by installing it locally to my laptop instead of the HPC.

I did actually end up with another issue, is there a way to create the BAMlet file and the .vcf from long read data? ExpansionHunter requires paired reads, and ultimately, I'd like to use REViewer to visualize my repeats (less so to characterize repeat variants).

Thanks! Sheina

— Reply to this email directly, view it on GitHub https://github.com/Illumina/REViewer/issues/57#issuecomment-1291352424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM7DU47J24NMXU2NXJ666DWFCCZXANCNFSM6AAAAAARLVFGUQ . You are receiving this because you were mentioned.Message ID: @.***>

sclamons avatar Oct 26 '22 14:10 sclamons

Yes, I tried but it skips all the reads that aren't paired. So all the reads :)

sheinasim avatar Oct 28 '22 21:10 sheinasim

There are two issues causing this error:

  • First is #include <limits> missing in GraphCoordinates.cpp - same as here https://github.com/Illumina/ExpansionHunter/issues/168
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp: In constructor ‘graphtools::GraphCoordinates::GraphCoordinatesImpl::GraphCoordinatesImpl(const graphtools::Graph*)’:
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:52:40: error: ‘numeric_limits’ is not a member of ‘std’
   52 |                 size_t min_dist = std::numeric_limits<size_t>::max();
      |                                        ^~~~~~~~~~~~~~
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:52:61: error: expected primary-expression before ‘>’ token
   52 |                 size_t min_dist = std::numeric_limits<size_t>::max();
      |                                                             ^
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:52:64: error: ‘::max’ has not been declared; did you mean ‘std::max’?
   52 |                 size_t min_dist = std::numeric_limits<size_t>::max();
      |                                                                ^~~
      |                                                                std::max
In file included from /usr/include/c++/11/algorithm:62,
                 from /usr/include/c++/11/regex:38,
                 from /soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/include/graphalign/GraphAlignment.hh:28,
                 from /soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/include/graphcore/GraphCoordinates.hh:23,
                 from /soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:21:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:67:38: error: ‘numeric_limits’ is not a member of ‘std’
   67 |                 if (min_dist != std::numeric_limits<size_t>::max())
      |                                      ^~~~~~~~~~~~~~
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:67:59: error: expected primary-expression before ‘>’ token
   67 |                 if (min_dist != std::numeric_limits<size_t>::max())
      |                                                           ^
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:67:62: error: ‘::max’ has not been declared; did you mean ‘std::max’?
   67 |                 if (min_dist != std::numeric_limits<size_t>::max())
      |                                                              ^~~
      |                                                              std::max
In file included from /usr/include/c++/11/algorithm:62,
                 from /usr/include/c++/11/regex:38,
                 from /soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/include/graphalign/GraphAlignment.hh:28,
                 from /soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/include/graphcore/GraphCoordinates.hh:23,
                 from /soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:21:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp: In member function ‘uint64_t graphtools::GraphCoordinates::distance(uint64_t, uint64_t) const’:
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:197:28: error: ‘numeric_limits’ is not a member of ‘std’
  197 |     uint64_t result = std::numeric_limits<uint64_t>::max();
      |                            ^~~~~~~~~~~~~~
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:197:51: error: expected primary-expression before ‘>’ token
  197 |     uint64_t result = std::numeric_limits<uint64_t>::max();
      |                                                   ^
/soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:197:54: error: ‘::max’ has not been declared; did you mean ‘std::max’?
  197 |     uint64_t result = std::numeric_limits<uint64_t>::max();
      |                                                      ^~~
      |                                                      std::max
In file included from /usr/include/c++/11/algorithm:62,
                 from /usr/include/c++/11/regex:38,
                 from /soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/include/graphalign/GraphAlignment.hh:28,
                 from /soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/include/graphcore/GraphCoordinates.hh:23,
                 from /soft/REViewer-0.2.7-src/reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp:21:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
make[5]: *** [thirdparty/graph-tools/CMakeFiles/graphtools.dir/build.make:286: thirdparty/graph-tools/CMakeFiles/graphtools.dir/src/graphcore/GraphCoordinates.cpp.o] Error 1
  • Second is catch2 error - same as here https://github.com/catchorg/Catch2/issues/2178
In file included from /usr/include/signal.h:328,
                 from /soft/REViewer-0.2.7-src/build/install/include/catch2/catch.hpp:8031,
                 from /soft/REViewer-0.2.7-src/reviewer/tests/UnitTests.cpp:22:
/soft/REViewer-0.2.7-src/build/install/include/catch2/catch.hpp:10815:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10815 |     static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
      |                                                          ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
                 from /usr/include/signal.h:328,
                 from /soft/REViewer-0.2.7-src/build/install/include/catch2/catch.hpp:8031,
                 from /soft/REViewer-0.2.7-src/reviewer/tests/UnitTests.cpp:22:
/usr/include/unistd.h:640:17: note: ‘long int sysconf(int)’ declared here
  640 | extern long int sysconf (int __name) __THROW;
      |                 ^~~~~~~
In file included from /soft/REViewer-0.2.7-src/reviewer/tests/UnitTests.cpp:22:
/soft/REViewer-0.2.7-src/build/install/include/catch2/catch.hpp:10874:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10874 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
      |                                             ^~~~~~~~~~~~
make[5]: *** [CMakeFiles/UnitTests.dir/build.make:76: CMakeFiles/UnitTests.dir/tests/UnitTests.cpp.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:218: CMakeFiles/UnitTests.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/reviewer.dir/build.make:86: reviewer-prefix/src/reviewer-stamp/reviewer-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:198: CMakeFiles/reviewer.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Fixes:

sed -i '/catchorg/s/2.12.4/2.13.5/' CMakeLists.txt
sed -i '/^#include <cassert>/a #include <limits>' reviewer/thirdparty/graph-tools/src/graphcore/GraphCoordinates.cpp

@egor-dolzhenko @sclamons Can anyone add these or similar fixes? There is ever a PR https://github.com/Illumina/REViewer/pull/45 for one of them.

Stikus avatar Dec 08 '23 11:12 Stikus