dnanexus-rnd / GLnexus

Scalable gVCF merging and joint variant calling for population sequencing projects
Apache License 2.0
145 stars 37 forks source link

install failure, how can I solve this problem? #169

Closed scotty323 closed 4 years ago

scotty323 commented 5 years ago

tao@ubuntu:~/GLnexus⟫ sudo make -j$(nproc) [ 8%] Built target catch [ 16%] Built target capnp [ 32%] Built target spdlog [ 32%] Built target yaml-cpp [ 40%] Built target fcmm [ 48%] Built target htslib [ 56%] Built target CTPL [ 64%] Built target rocksdb [ 82%] Built target glnexus [ 83%] Linking CXX executable glnexus_cli [ 84%] Linking CXX executable unit_tests /usr/bin/ld: cannot find -lsnappy /usr/bin/ld: cannot find -lzstd collect2: error: ld returned 1 exit status CMakeFiles/glnexus_cli.dir/build.make:98: recipe for target 'glnexus_cli' failed make[2]: [glnexus_cli] Error 1 CMakeFiles/Makefile2:387: recipe for target 'CMakeFiles/glnexus_cli.dir/all' failed make[1]: [CMakeFiles/glnexus_cli.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... /usr/bin/ld: cannot find -lsnappy /usr/bin/ld: cannot find -lzstd collect2: error: ld returned 1 exit status CMakeFiles/unit_tests.dir/build.make:436: recipe for target 'unit_tests' failed make[2]: [unit_tests] Error 1 CMakeFiles/Makefile2:983: recipe for target 'CMakeFiles/unit_tests.dir/all' failed make[1]: [CMakeFiles/unit_tests.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: [all] Error 2

---------------please see above errors------ how can I install successfully?

mlin commented 5 years ago

Hi, it looks like some of the dependent libraries aren't installed.

/usr/bin/ld: cannot find -lsnappy
/usr/bin/ld: cannot find -lzstd

Are you able to use the precompiled binaries on the Releases page? That's the easiest way. Otherwise there are some pointers in the Build & test section of the readme.

choishingwan commented 5 years ago

Hi, I have similar problem when installing the tool (we can't use the binary as we don't have the GLIBC 2.18)

Using g++ version 8.3.0 and cmake 3.14.1 we got the following error:

[ 65%] GLnexus: generating cap'n proto C++ and H files
external/bin/capnp compile: capnp/serialize/defs.capnp: no such file
Try 'external/bin/capnp compile --help' for more information.
make[2]: *** [capnp/serialize/defs.capnp.c++] Error 1
make[1]: *** [CMakeFiles/glnexus.dir/all] Error 2

Are we missing some dependency? Thank you

mlin commented 5 years ago

Hi, glibc 2.18 is already five years old and I'm afraid we're just not able to prioritize backward compatibility with even older environments :disappointed:

The specific error you showed is strange though, as it seems to claim non-existence of a file which certainly is in the source tree. Please double-check if it's there in your local copy. If so, I don't know why it can't find it but hopefully that's at least a lead for further troubleshooting.

choishingwan commented 5 years ago

We are currently asking our server admin to install glibc 2.18.

Strangely, the file is located in the source tree, which is strange.

ls capnp/serialize/defs.capnp
capnp/serialize/defs.capnp

And the file content is

@0x926cdc189d296294;

using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("GLnexus::capnp");

### BCFBucket (for internal database use)
struct BCFBucketSkipEntry {
    recordIndex @0 : UInt32;
    posBeg @1 : Int64;
}
struct BCFBucket {
    records @0 : List(Data);
    skips @1 : List(BCFBucketSkipEntry);
}

If it helps retyping make will give the following message

[  8%] Built target rocksdb
[ 16%] Built target fcmm
[ 24%] Built target catch
[ 32%] Built target yaml-cpp
[ 40%] Built target htslib
[ 48%] Built target capnp
[ 56%] Built target spdlog
[ 64%] Built target CTPL
[ 65%] GLnexus: generating cap'n proto C++ and H files
external/bin/capnp compile: capnp/serialize/defs.capnp: no such file
Try 'external/bin/capnp compile --help' for more information.
make[2]: *** [capnp/serialize/defs.capnp.c++] Error 1
make[1]: *** [CMakeFiles/glnexus.dir/all] Error 2
make: *** [all] Error 2

And the git hash is 5ef3ae9bf5262247c2599aa6ea0dd217dbb2f658

choishingwan commented 5 years ago

Figured out the problem. Was trying to do cmake in a separated directory instead of root. Once I did cmake in the root directory, the same error disappeared.

At the end managed to compile the software using

cmake .
cmake --build . -j 1 --parallel 1
mlin commented 4 years ago

Closing this issue for now, but please ping the thread if we can help further