maickrau / GraphAligner

MIT License
256 stars 30 forks source link

Can't install via bioconda #25

Closed TypAnna closed 2 years ago

TypAnna commented 3 years ago

Hi!

I have successfully downloaded miniconda and set up bioconda (I have added the appropriate channels as per https://bioconda.github.io/user/install.html) , and have been able to use it to install other packages included in bioconda, so I know that bioconda works. However - when I try to install GraphAligner via conda install -c bioconda graphaligner I get the error that the package cannot be found, see the full error message below. I visited your page on bioconda, i.e. https://anaconda.org/bioconda/graphaligner, and tried with your other command listed there - conda install -c bioconda/label/cf201901 graphaligner - but unfortunately get the samme error. As you can see below, bioconda is listed under Current channels. I'm using conda version 4.9.0. Do you know what might be wrong? Could it be a config file or something similar?

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - graphaligner

Current channels:

  - https://conda.anaconda.org/bioconda/label/cf201901/osx-64
  - https://conda.anaconda.org/bioconda/label/cf201901/noarch
  - https://conda.anaconda.org/bioconda/osx-64
  - https://conda.anaconda.org/bioconda/noarch
  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

PS I tried installing GraphAligner by cloning your repo, but failed on the step source activate GraphAligner where I get the error source: Error encountered while sourcing file 'activate': source: No such file or directory.

Many thanks!

maickrau commented 3 years ago

Hi, the bioconda version of GraphAligner currently supports only Linux, no Mac. The error on source activate GraphAligner sounds like the previous step (conda env create -f CondaEnvironment.yml) failed to create the required environment. Does conda info --envs list an environment named GraphAligner?

TypAnna commented 3 years ago

Ah okay. No, conda info --envs does not list an environment named GraphAligner. You are right, conda env create -f CondaEnvironment.yml is not successful. I get the error ResolvePackageNotFound(full error shown below). I have successfully downloaded all tools listed (boost, mummer, protobuf and protoc, sdsl, jemalloc and sparsehash), except for mummer which I was not able to install. So it makes sense that mummer is listed below, altho I dont understand why there are so many packages it could not find :/.


Solving environment: failed

ResolvePackageNotFound: 
  - pkg-config==0.29.2=h1bed415_8
  - python==3.6.6=hc3d631a_0
  - pyyaml==3.13=py36h14c3975_0
  - libboost==1.67.0=h46d08c1_4
  - gcc_impl_linux-64==7.2.0=habb00fd_3
  - cryptography==2.2.2=py36h14c3975_0
  - bcrypt==3.1.4=py36h14c3975_0
  - libgcc-ng==8.2.0=hdf63c60_1
  - mummer4==4.0.0beta2=pl526hf484d3e_4
  - openssl==1.0.2r=h14c3975_0
  - zlib==1.2.11=ha838bed_2
  - numpy-base==1.15.0=py36h3dfced4_0
  - gcc_linux-64==7.2.0=h550dcbe_27
  - mkl_random==1.0.1=py36h4414c95_1
  - binutils==2.31=0
  - libgfortran-ng==7.2.0=hdf63c60_3
  - mpfr==4.0.1=hdf1c602_3
  - gxx_linux-64==7.2.0=h550dcbe_27
  - libffi==3.2.1=hd88cf55_4
  - mkl_fft==1.0.4=py36h4414c95_1
  - protobuf==3.6.0=py36hf484d3e_0
  - xz==5.2.4=h14c3975_4
  - wrapt==1.10.11=py36h14c3975_2
  - binutils_linux-64==7.2.0=had2808c_27
  - tk==8.6.7=hc745277_3
  - psutil==5.4.6=py36h14c3975_0
  - sqlite==3.24.0=h84994c4_0
  - icu==58.2=h9c2bf20_1
  - libstdcxx-ng==8.2.0=hdf63c60_1
  - sdsl-lite==2.1.1=hc9558a2_1001
  - yaml==0.1.7=had09818_2
  - ncurses==6.1=hf484d3e_0
  - gxx_impl_linux-64==7.2.0=hdf63c60_3
  - perl==5.26.2=h14c3975_0
  - binutils_impl_linux-64==2.28.1=had2808c_3
  - pynacl==1.2.1=py36h14c3975_0
  - jemalloc==5.0.1=hf484d3e_1
  - cffi==1.11.5=py36h9745a5d_0
  - gmp==6.1.2=h6c8ec71_1
  - py-boost==1.67.0=py36h04863e7_4
  - numpy==1.15.0=py36h1b885b7_0
  - readline==7.0=ha6073c6_4
  - libprotobuf==3.6.0=hdbcaa40_0
  - bzip2==1.0.6=h14c3975_5
  - libsodium==1.0.16=h1bed415_0
  - libedit==3.1.20170329=h6b74fdf_2
  - pandas==0.23.3=py36h04863e7_0
  - mpc==1.1.0=h10f8cd9_1
Kinggerm commented 3 years ago

Hi @maickrau

Thanks for the great tool. What do you think are the obstacles that prevent compiling GraphAligner in macOS? I'm interested to contribute to making it also work in macOS if it's not too complicated.

jflot commented 3 years ago

I could install almost all the required tools using conda (on MacOS 11.2.2): conda install mummer conda install boost conda install protobuf conda install sdsl-lite conda install jemalloc conda install sparsehash It all worked except for protoc, hence I thought I would try compiling GraphAligner from source. $ make bin/GraphAligner c++ -c -o obj/AlignerMain.o src/AlignerMain.cpp -Wall -Wextra -std=c++17 -O3 -g -Iconcurrentqueue -IBBHash -Izstr/src -Iparallel-hashmap/parallel_hashmap/ pkg-config --cflags protobuf pkg-config --cflags libsparsehash pkg-config --cflags mummer -fopenmp -Wno-unused-parameter -DVERSION="\"Branch master commit b0a858bd873a4072f578a2e58b5f43966079dae4 2021-04-07 15:16:35 -0400\"" Package mummer was not found in the pkg-config search path. Perhaps you should add the directory containing `mummer.pc' to the PKG_CONFIG_PATH environment variable No package 'mummer' found clang: error: unsupported option '-fopenmp' make: *** [obj/AlignerMain.o] Error 1

I do have a folder /usr/local/lib/pkgconfig, but it does not contain any mummer.pc file. This is weird as my installation of mummer via conda seems to be working fine.

Kinggerm commented 3 years ago

I do have a folder /usr/local/lib/pkgconfig, but it does not contain any mummer.pc file.

I have the same issue, have you worked it out?

jflot commented 3 years ago

Unfortunately not, I am still stuck at the very same point.

jflot commented 3 years ago

I tried again and made some progress. I uninstalled mummer from the conda environment (conda remove mummer) then installed the latest release directly from source (https://github.com/mummer4/mummer/releases/tag/v4.0.0rc1 using the usual configure; make; sudo make install commands). This time a mummer.pc file was created but I still had the same error message as previously. Once I updated the $PKG_CONFIG_PATH environment, however (export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/), it got rid of the "No package 'mummer' found" error.


$ make bin/GraphAligner
c++ -c -o obj/AlignerMain.o src/AlignerMain.cpp -Wall -Wextra -std=c++17 -O3 -g -Iconcurrentqueue -IBBHash -Izstr/src -Iparallel-hashmap/parallel_hashmap/ `pkg-config --cflags protobuf` `pkg-config --cflags libsparsehash` `pkg-config --cflags mummer` -fopenmp -Wno-unused-parameter -DVERSION="\"Branch master commit 02c8e2628bba16425dc58cdf67199319f0a7a304 2021-04-23 09:06:36 -0400\""
clang: error: unsupported option '-fopenmp'
make: *** [obj/AlignerMain.o] Error 1```
jflot commented 3 years ago

I managed to pass the clang problem by compiling using GNU c++-10: make CXX=c++-10 bin/GraphAligner, however I am running into yet another problem, this time with the parallel_hashmap dependency:

$ make CXX=c++-10 bin/GraphAligner
c++-10 -c -o obj/AlignerMain.o src/AlignerMain.cpp -Wall -Wextra -std=c++17 -O3 -g -Iconcurrentqueue -IBBHash -Izstr/src -Iparallel-hashmap/parallel_hashmap/ `pkg-config --cflags protobuf` `pkg-config --cflags libsparsehash` `pkg-config --cflags mummer` -fopenmp -Wno-unused-parameter -DVERSION="\"Branch master commit 02c8e2628bba16425dc58cdf67199319f0a7a304 2021-04-23 09:06:36 -0400\""
In file included from src/AlignmentGraph.h:10,
                 from src/Aligner.h:6,
                 from src/AlignerMain.cpp:8:
parallel-hashmap/parallel_hashmap/phmap.h: In function 'size_t phmap::container_internal::RandomSeed()':
parallel-hashmap/parallel_hashmap/phmap.h:2311:39: error: variable 'std::atomic<long unsigned int> counter' has initializer but incomplete type
jflot commented 2 years ago

Further progress: adding #include <atomic>in the headers of parallel-hashmap/parallel_hashmap/phmap.h solved the error mentioned above. However, there are new errors: $ make CXX=c++-11 bin/GraphAligner c++-11 -c -o obj/AlignerMain.o src/AlignerMain.cpp -Wall -Wextra -std=c++17 -O3 -g -Iconcurrentqueue -IBBHash -Izstr/src -Iparallel-hashmap/parallel_hashmap/ pkg-config --cflags protobuf pkg-config --cflags libsparsehash pkg-config --cflags mummer -fopenmp -Wno-unused-parameter -DVERSION="\"Branch master commit 02c8e2628bba16425dc58cdf67199319f0a7a304 2021-04-23 09:06:36 -0400\"" In file included from src/Aligner.h:7, from src/AlignerMain.cpp:8: src/vg.pb.h:17:2: error: #error This file was generated by an older version of protoc which is 17 | #error This file was generated by an older version of protoc which is | ^~~~~ src/vg.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please 18 | #error incompatible with your Protocol Buffer headers. Please | ^~~~~ src/vg.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. 19 | #error regenerate this file with a newer version of protoc. | ^~~~~ In file included from src/Aligner.h:7, from src/AlignerMain.cpp:8: src/vg.pb.h:249:17: error: 'vg::Graph vg::Graph::New() const' marked 'final', but is not virtual 249 | inline Graph New() const final { | ^~~ src/vg.pb.h:435:16: error: 'vg::Node vg::Node::New() const' marked 'final', but is not virtual 435 | inline Node New() const final { | ^~~ src/vg.pb.h:608:16: error: 'vg::Edge vg::Edge::New() const' marked 'final', but is not virtual 608 | inline Edge New() const final { | ^~~ src/vg.pb.h:789:16: error: 'vg::Edit vg::Edit::New() const' marked 'final', but is not virtual 789 | inline Edit New() const final { | ^~~ src/vg.pb.h:955:19: error: 'vg::Mapping vg::Mapping::New() const' marked 'final', but is not virtual 955 | inline Mapping New() const final { | ^~~ src/vg.pb.h:1132:20: error: 'vg::Position vg::Position::New() const' marked 'final', but is not virtual 1132 | inline Position New() const final { | ^~~ src/vg.pb.h:1309:16: error: 'vg::Path vg::Path::New() const' marked 'final', but is not virtual 1309 | inline Path New() const final { | ^~~ src/vg.pb.h:1495:21: error: 'vg::Alignment vg::Alignment::New() const' marked 'final', but is not virtual 1495 | inline Alignment New() const final { | ^~~ src/vg.pb.h:2134:30: error: 'vg::MultipathAlignment vg::MultipathAlignment::New() const' marked 'final', but is not virtual 2134 | inline MultipathAlignment New() const final { | ^~~ src/vg.pb.h:2444:19: error: 'vg::Subpath vg::Subpath::New() const' marked 'final', but is not virtual 2444 | inline Subpath New() const final { | ^~~ src/vg.pb.h:2626:21: error: 'vg::KmerMatch vg::KmerMatch::New() const' marked 'final', but is not virtual 2626 | inline KmerMatch New() const final { | ^~~ src/vg.pb.h:2803:22: error: 'vg::BasePileup vg::BasePileup::New() const' marked 'final', but is not virtual 2803 | inline BasePileup New() const final { | ^~~ src/vg.pb.h:2987:22: error: 'vg::NodePileup vg::NodePileup::New() const' marked 'final', but is not virtual 2987 | inline NodePileup New() const final { | ^~~ src/vg.pb.h:3144:22: error: 'vg::EdgePileup vg::EdgePileup::New() const' marked 'final', but is not virtual 3144 | inline EdgePileup New() const final { | ^~~ src/vg.pb.h:3330:18: error: 'vg::Pileup vg::Pileup::New() const' marked 'final', but is not virtual 3330 | inline Pileup New() const final { | ^~~ src/vg.pb.h:3496:17: error: 'vg::Snarl vg::Snarl::New() const' marked 'final', but is not virtual 3496 | inline Snarl New() const final { | ^~~ src/vg.pb.h:3755:17: error: 'vg::Visit vg::Visit::New() const' marked 'final', but is not virtual 3755 | inline Visit New() const final { | ^~~ src/vg.pb.h:3923:26: error: 'vg::SnarlTraversal vg::SnarlTraversal::New() const' marked 'final', but is not virtual 3923 | inline SnarlTraversal New() const final { | ^~~ src/vg.pb.h:4087:17: error: 'vg::Locus vg::Locus::New() const' marked 'final', but is not virtual 4087 | inline Locus New() const final { | ^~~ src/vg.pb.h:4336:20: error: 'vg::Genotype vg::Genotype::New() const' marked 'final', but is not virtual 4336 | inline Genotype New() const final { | ^~~ src/vg.pb.h:4542:19: error: 'vg::Support vg::Support::New() const' marked 'final', but is not virtual 4542 | inline Support New() const final { | ^~~ src/vg.pb.h:4729:27: error: 'vg::LocationSupport vg::LocationSupport::New() const' marked 'final', but is not virtual 4729 | inline LocationSupport New() const final { | ^~~ src/vg.pb.h:4923:23: error: 'vg::Translation vg::Translation::New() const' marked 'final', but is not virtual 4923 | inline Translation New() const final { | ^~~ src/vg.pb.h: In member function 'void vg::Node::clear_id()': src/vg.pb.h:5279:9: error: 'PROTOBUFLONGLONG' was not declared in this scope 5279 | id = PROTOBUF_LONGLONG(0); | ^~~~~ src/vg.pb.h: In member function 'void vg::Edge::clear_from()': src/vg.pb.h:5303:11: error: 'PROTOBUFLONGLONG' was not declared in this scope 5303 | from = PROTOBUF_LONGLONG(0); | ^~~~~ src/vg.pb.h: In member function 'void vg::Edge::clear_to()': src/vg.pb.h:5323:9: error: 'PROTOBUFLONGLONG' was not declared in this scope 5323 | to = PROTOBUF_LONGLONG(0); | ^~~~~ src/vg.pb.h: In member function 'void vg::Mapping::clear_rank()': src/vg.pb.h:5634:11: error: 'PROTOBUFLONGLONG' was not declared in this scope 5634 | rank = PROTOBUF_LONGLONG(0); | ^~~~~ src/vg.pb.h: In member function 'void vg::Position::clear_node_id()': src/vg.pb.h:5658:14: error: 'PROTOBUF_LONGLONG' was not declared in this scope 5658 | nodeid = PROTOBUF_LONGLONG(0); | ^~~~~ src/vg.pb.h: In member function 'void vg::Position::clear_offset()': src/vg.pb.h:5678:13: error: 'PROTOBUFLONGLONG' was not declared in this scope 5678 | offset = PROTOBUF_LONGLONG(0); | ^~~~~ src/vg.pb.h: In member function 'void vg::Path::clear_length()': src/vg.pb.h:5903:13: error: 'PROTOBUFLONGLONG' was not declared in this scope 5903 | length = PROTOBUF_LONGLONG(0); | ^~~~~ In file included from src/Aligner.h:7, from src/AlignerMain.cpp:8: src/vg.pb.h: In member function 'void vg::KmerMatch::clear_node_id()': src/vg.pb.h:8038:14: error: 'PROTOBUF_LONGLONG' was not declared in this scope 8038 | nodeid = PROTOBUF_LONGLONG(0); | ^~~~~ src/vg.pb.h: In member function 'void vg::NodePileup::clear_node_id()': src/vg.pb.h:8268:14: error: 'PROTOBUF_LONGLONG' was not declared in this scope 8268 | nodeid = PROTOBUF_LONGLONG(0); | ^~~~~ src/vg.pb.h: In member function 'void vg::Visit::clear_node_id()': src/vg.pb.h:9015:14: error: 'PROTOBUF_LONGLONG' was not declared in this scope 9015 | nodeid = PROTOBUF_LONGLONG(0); | ^~~~~ src/vg.pb.h: In member function 'void vg::LocationSupport::clear_node_id()': src/vg.pb.h:9979:32: error: 'PROTOBUF_LONGLONG' was not declared in this scope 9979 | oneoflocation.nodeid = PROTOBUF_LONGLONG(0); | ^~~~~ src/vg.pb.h: In member function 'google::protobuf::int64 vg::LocationSupport::_internal_node_id() const': src/vg.pb.h:9987:10: error: 'PROTOBUF_LONGLONG' was not declared in this scope 9987 | return PROTOBUF_LONGLONG(0); | ^~~~~ make: *** [obj/AlignerMain.o] Error 1

jflot commented 2 years ago

The protobuf problem can be solved by installing an older version: conda create -n GraphAlignerenv mummer boost protobuf=3.15.0 sdsl-lite jemalloc sparsehash. Now I am stuck a bit farther: c++-11 -c -o obj/vg.pb.o src/vg.pb.cc -Wall -Wextra -std=c++17 -O3 -g -Iconcurrentqueue -IBBHash -Izstr/src -Iparallel-hashmap/parallel_hashmap/ pkg-config --cflags protobuf pkg-config --cflags libsparsehash pkg-config --cflags mummer -fopenmp -Wno-unused-parameter src/vg.pb.cc:804:126: error: 'init_priority' attribute is not supported on this platform 804 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_vg_2eproto(&descriptor_table_vg_2eproto); | ^ In file included from /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/io/coded_stream.h:146, from src/vg.pb.h:23, from src/vg.pb.cc:4: /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/parse_context.h: In instantiation of 'const char google::protobuf::internal::EpsCopyInputStream::AppendUntilEnd(const char, const A&) [with A = google::protobuf::internal::EpsCopyInputStream::AppendString(const char, std::string)::<lambda(const char*, ptrdiff_t)>]': /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/parse_context.h:365:26: required from here /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/stubs/logging.h:161:48: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits] 161 | #define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B)) | ^ /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/stubs/logging.h:151:5: note: in definition of macro 'GOOGLE_LOG_IF' 151 | !(CONDITION) ? (void)0 : GOOGLE_LOG(LEVEL) | ^~~~~ /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/stubs/logging.h:161:31: note: in expansion of macro 'GOOGLE_CHECK' 161 | #define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B)) | ^~~~ /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/stubs/logging.h:201:26: note: in expansion of macro 'GOOGLE_CHECK_GE' 201 | #define GOOGLE_DCHECK_GE GOOGLE_CHECK_GE | ^~~~~~~ /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/parse_context.h:351:7: note: in expansion of macro 'GOOGLE_DCHECK_GE' 351 | GOOGLE_DCHECK_GE(chunk_size, static_cast(0)); | ^~~~ make: *** [obj/vg.pb.o] Error 1

jflot commented 2 years ago

The protobuf problem can be solved by installing an older version: conda create -n GraphAlignerenv mummer boost protobuf=3.15.0 sdsl-lite jemalloc sparsehash. Now I am stuck a bit farther: c++-11 -c -o obj/vg.pb.o src/vg.pb.cc -Wall -Wextra -std=c++17 -O3 -g -Iconcurrentqueue -IBBHash -Izstr/src -Iparallel-hashmap/parallel_hashmap/ pkg-config --cflags protobuf pkg-config --cflags libsparsehash pkg-config --cflags mummer -fopenmp -Wno-unused-parameter src/vg.pb.cc:804:126: error: 'init_priority' attribute is not supported on this platform 804 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_vg_2eproto(&descriptor_table_vg_2eproto); | ^ In file included from /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/io/coded_stream.h:146, from src/vg.pb.h:23, from src/vg.pb.cc:4: /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/parse_context.h: In instantiation of 'const char google::protobuf::internal::EpsCopyInputStream::AppendUntilEnd(const char, const A&) [with A = google::protobuf::internal::EpsCopyInputStream::AppendString(const char, std::string)::<lambda(const char*, ptrdiff_t)>]': /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/parse_context.h:365:26: required from here /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/stubs/logging.h:161:48: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits] 161 | #define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B)) | ^ /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/stubs/logging.h:151:5: note: in definition of macro 'GOOGLE_LOG_IF' 151 | !(CONDITION) ? (void)0 : GOOGLE_LOG(LEVEL) | ^~~~~ /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/stubs/logging.h:161:31: note: in expansion of macro 'GOOGLE_CHECK' 161 | #define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B)) | ^~~~ /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/stubs/logging.h:201:26: note: in expansion of macro 'GOOGLE_CHECK_GE' 201 | #define GOOGLE_DCHECK_GE GOOGLE_CHECK_GE | ^~~~~~~ /Users/jff/miniconda3/envs/GraphAlignerenv/include/google/protobuf/parse_context.h:351:7: note: in expansion of macro 'GOOGLE_DCHECK_GE' 351 | GOOGLE_DCHECK_GE(chunk_size, static_cast(0)); | ^~~~ make: *** [obj/vg.pb.o] Error 1

Kinggerm commented 2 years ago

Looks related to this issue https://github.com/maickrau/GraphAligner/pull/53

maickrau commented 2 years ago

Version 1.0.16 should now be installable via bioconda and compilable on mac osx, please open a new issue if it doesn't work.