Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to compile #2

Open
shenwei356 opened this issue Oct 19, 2023 · 9 comments
Open

Failed to compile #2

shenwei356 opened this issue Oct 19, 2023 · 9 comments

Comments

@shenwei356
Copy link

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
Copy link
Owner

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
Copy link
Author

Thanks, Max, the pre-built binaries work.

@AndreaGuarracino
Copy link
Contributor

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
Copy link
Owner

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
Copy link
Contributor

AndreaGuarracino commented Sep 20, 2024

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

  • Add include <array> to include/common/common.hpp
  • mkdir build && cd build && cmake .. && make
  • Wait for the errors
  • Add #include <cstdint> to _deps/bwt2lcp-src/internal/include.hpp
  • Add #include <utility> to _deps/shaped_slp-src/external/sux/sux/util/Vector.hpp
  • make

@AndreaGuarracino
Copy link
Contributor

@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
Copy link
Owner

@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.

@maxrossi91 maxrossi91 reopened this Sep 24, 2024
@AndreaGuarracino
Copy link
Contributor

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants