maxrossi91 / moni

MONI: A Pangenomic Index for Finding MEMs
MIT License
37 stars 9 forks source link

Failed to compile #2

Open shenwei356 opened 1 year ago

shenwei356 commented 1 year ago

Hi Massimiliano, I failed to compile moni with the given installation step.

git clone https://github.com/maxrossi91/moni

mkdir build
cd build
cmake ..
make

[ 44%] Built target rlbwt2lcp
[ 44%] Building CXX object _deps/bwt2lcp-build/CMakeFiles/bwt2lcp.dir/bwt2lcp.cpp.o
In file included from /home/shenwei/Downloads/moni/build/_deps/bwt2lcp-src/internal/dna_bwt.hpp:15,
                 from /home/shenwei/Downloads/moni/build/_deps/bwt2lcp-src/internal/lcp.hpp:26,
                 from /home/shenwei/Downloads/moni/build/_deps/bwt2lcp-src/bwt2lcp.cpp:14:
/home/shenwei/Downloads/moni/build/_deps/bwt2lcp-src/internal/include.hpp:15:14: error: ‘uint64_t’ was not declared in this scope
   15 | typedef pair<uint64_t,uint64_t> range_t;
      |              ^~~~~~~~
/home/shenwei/Downloads/moni/build/_deps/bwt2lcp-src/internal/include.hpp:12:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstd
int>’?
   11 | #include <algorithm>
  +++ |+#include <cstdint>
   12 | 
/home/shenwei/Downloads/moni/build/_deps/bwt2lcp-src/internal/include.hpp:15:23: error: ‘uint64_t’ was not declared in this scope
   15 | typedef pair<uint64_t,uint64_t> range_t;
      |                       ^~~~~~~~
/home/shenwei/Downloads/moni/build/_deps/bwt2lcp-src/internal/include.hpp:15:23: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cst
dint>’?
/home/shenwei/Downloads/moni/build/_deps/bwt2lcp-src/internal/include.hpp:15:31: error: template argument 1 is invalid
   15 | typedef pair<uint64_t,uint64_t> range_t;
      |                               ^
/home/shenwei/Downloads/moni/build/_deps/bwt2lcp-src/internal/include.hpp:15:31: error: template argument 2 is invalid
/home/shenwei/Downloads/moni/build/_deps/bwt2lcp-src/internal/include.hpp:32:9: error: ‘uint64_t’ does not name a type
   32 |         uint64_t first_TERM;

Here's some information you might find useful.

$ uname -a
Linux mBio 6.1.55-1-MANJARO #1 SMP PREEMPT_DYNAMIC Sat Sep 23 12:13:56 UTC 2023 x86_64 GNU/Linux

$ cmake --version 
cmake version 3.27.7
$ gcc --version
gcc (GCC) 13.2.1 20230801
$ g++ --version
g++ (GCC) 13.2.1 20230801

Or, can you support installation with conda: https://github.com/bioconda/bioconda-recipes .

Thanks a lot.

Wei

maxrossi91 commented 1 year ago

Hi, Wei,

Thank you for reporting this. I will look at this in the weekend. In the meanwhile could you try to install it from the release assets? We have three ways to install from there, i.e, using

Bests,

Max

shenwei356 commented 1 year ago

Thanks, Max, the pre-built binaries work.

AndreaGuarracino commented 2 months ago

Similar problem. With

uname -a
Linux guarracino-ThinkPad-P14s-Gen-4 6.5.0-44-generic #44-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun  7 15:10:09 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

cmake --version
cmake version 3.27.4

gcc --version
gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ --version
g++ (Ubuntu 13.2.0-4ubuntu3) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

sudo apt-get update
sudo apt-get install -y build-essential cmake git python3 zlib1g-dev

git clone https://github.com/maxrossi91/moni
cd moni
mkdir build
cd build
cmake ..
make -j 16

I get:

[ 57%] Building CXX object _deps/sdsl-build/lib/CMakeFiles/sdsl.dir/wt_helper.cpp.o
In file included from /home/guarracino/git/moni/build/_deps/sdsl-build/lib/../include/sdsl/wt_helper.hpp:4,
                 from /home/guarracino/git/moni/build/_deps/sdsl-src/lib/wt_helper.cpp:1:
/home/guarracino/git/moni/build/_deps/sdsl-build/lib/../include/sdsl/int_vector.hpp:1402:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 1402 | inline auto
      |        ^~~~
/home/guarracino/git/moni/build/_deps/sdsl-build/lib/../include/sdsl/int_vector.hpp:1410:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 1410 | inline auto
      |        ^~~~
/home/guarracino/git/moni/build/_deps/sdsl-build/lib/../include/sdsl/int_vector.hpp:1418:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 1418 | inline auto
      |        ^~~~
/home/guarracino/git/moni/build/_deps/sdsl-build/lib/../include/sdsl/int_vector.hpp:1426:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 1426 | inline auto
      |        ^~~~
/home/guarracino/git/moni/build/_deps/sdsl-build/lib/../include/sdsl/int_vector.hpp:1434:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 1434 | inline auto
      |        ^~~~
/home/guarracino/git/moni/build/_deps/sdsl-build/lib/../include/sdsl/int_vector.hpp:1442:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 1442 | inline auto
      |        ^~~~
[ 57%] Linking CXX static library libbenchmark.a
[ 57%] Built target benchmark
[ 57%] Linking CXX static library libgtest.a
[ 57%] Built target gtest
[ 57%] Linking CXX static library libsdsl.a
[ 57%] Built target sdsl
make: *** [Makefile:156: all] Error 2

I was able to use moni with the pre-built binary, but now I would like a binary that incorporates #9 and I can't compile it! xD

maxrossi91 commented 2 months ago

When developing MONI I used gcc version 9.3.0. There might be issues when using more recent compilers, maybe due to old thirdparty projects.

You can try that and see if it works. I will try to make a new set of executables possibly in the weekend.

AndreaGuarracino commented 1 month ago

I share a hacky way to compile moni on my laptop; it might give you hints about the issues:

AndreaGuarracino commented 1 month ago

@maxrossi91, I've tried your new pre-built binary (moni-0.2.2) on our cluster, but


.../moni-0.2.2/bin/newscanNT.x
.../moni-0.2.2/bin/newscanNT.x: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by .../moni-0.2.2/bin/newscanNT.x)
maxrossi91 commented 1 month ago

@AndreaGuarracino thanks for pointing it out. It will take me some time to fix the current compile issues. In the meanwhile I released a Docker image in #13. Let me know if that might help as a workaround to your issue.

AndreaGuarracino commented 1 month ago

I can't help much, as I can't use Docker on our cluster ;( I could try it via conda, if you are going to deploy moni there too!

maxrossi91 commented 1 month ago

Apologies for not replying sooner. I am slowly trying to fix the compilation issues. Thanks for pushing MONI into bioconda.