maickrau / GraphAligner

MIT License
261 stars 32 forks source link

Error related to protobuf in installing GraphAligner #62

Closed wzboy1984 closed 2 years ago

wzboy1984 commented 2 years ago

Hi,

When I compiled GraphAligner with miniconda3, I encountered the following problem. Error information are shown below.

/home/wangz/miniconda3/envs/GraphAligner/bin/x86_64-conda-linux-gnu-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 -Wno-unused-parameter -IMEMfinder/src -Ijemalloc-config --includedir -DVERSION="\"Branch master commit 823ad4b05378436625fad9ea564b2dd0de1647c5 2022-05-12 16:47:48 +0200\"" In file included from src/Aligner.h:7, from src/AlignerMain.cpp:7: 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:7: src/vg.pb.h:27:10: fatal error: google/protobuf/inlined_string_field.h: No such file or directory 27 | #include <google/protobuf/inlined_string_field.h> | ^~~~~~~~~~~~ compilation terminated. make: *** [makefile:38: obj/AlignerMain.o] Error 1

The error information show that "inlined_string_field.h" file of protobuf library doesn't exist. I think that maybe the version of protobuf is wrong in conda, which is 3.14.0. And what is the right version of protobuf used in GraphAligner?

maickrau commented 2 years ago

The specific version should not be important as long as it's the exact same version for protoc and protobuf development libraries. The error message claims different versions were used even though it looks like you are using the conda environment which should have the same versions. Could you please activate the environment and then try make clean && make all just to double check that the vg.pb.* files get regenerated with the conda protoc version. If this doesn't work then try these and paste the output here:

conda list
which protoc
wzboy1984 commented 2 years ago

I tried running conda activate GraphAligner, then running make clean && make all in GraphAligner directory. The GraphAligner was compiled successfully.

Thanks for your reply.

conda list shows:

#packages in environment at /home/wangz/miniconda3/envs/GraphAligner:

#Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge binutils_impl_linux-64 2.36.1 h193b22a_2 conda-forge binutils_linux-64 2.36 hf3e587d_9 conda-forge boost 1.67.0 py36h3e44d54_0 conda-forge boost-cpp 1.67.0 h3a22d5f_0 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge ca-certificates 2021.10.8 ha878542_0 conda-forge gcc_impl_linux-64 11.2.0 h82a94d6_15 conda-forge gcc_linux-64 11.2.0 h39a9532_9 conda-forge gxx_impl_linux-64 11.2.0 h82a94d6_15 conda-forge gxx_linux-64 11.2.0 hacbe6df_9 conda-forge icu 58.2 hf484d3e_1000 conda-forge jemalloc 5.2.0 he1b5a44_0 conda-forge kernel-headers_linux-64 2.6.32 he073ed8_15 conda-forge ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge libblas 3.9.0 14_linux64_openblas conda-forge libboost 1.67.0 h46d08c1_4 defaults libcblas 3.9.0 14_linux64_openblas conda-forge libdivsufsort 2.0.2 hec16e2b_5 bioconda libffi 3.4.2 h7f98852_5 conda-forge libgcc-devel_linux-64 11.2.0 h0952999_15 conda-forge libgcc-ng 11.2.0 h1d223b6_15 conda-forge libgfortran-ng 11.2.0 h69a702a_15 conda-forge libgfortran5 11.2.0 h5c6108e_15 conda-forge libgomp 11.2.0 h1d223b6_15 conda-forge liblapack 3.9.0 14_linux64_openblas conda-forge libnsl 2.0.0 h7f98852_0 conda-forge libopenblas 0.3.20 pthreads_h78a6416_0 conda-forge libprotobuf 3.14.0 h780b84a_0 conda-forge libprotobuf-static 3.14.0 ha770c72_0 conda-forge libsanitizer 11.2.0 he4da1e4_15 conda-forge libstdcxx-devel_linux-64 11.2.0 h0952999_15 conda-forge libstdcxx-ng 11.2.0 he4da1e4_15 conda-forge libzlib 1.2.11 h166bdaf_1014 conda-forge make 4.3 hd18ef5c_1 conda-forge ncurses 6.3 h27087fc_1 conda-forge numpy 1.19.5 py36hfc0c790_2 conda-forge openssl 1.1.1n h166bdaf_0 conda-forge pip 21.3.1 pyhd8ed1ab_0 conda-forge pkg-config 0.29.2 h36c2ea0_1008 conda-forge protobuf 3.14.0 py36hc4f0c31_1 conda-forge python 3.6.15 hb7a2778_0_cpython conda-forge python_abi 3.6 2_cp36m conda-forge readline 8.1 h46c0cb4_0 conda-forge sdsl-lite 2.1.1 h4bd325d_1002 conda-forge setuptools 58.0.4 py36h5fab9bb_2 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sparsehash 2.0.4 h9c3ff4c_0 conda-forge sqlite 3.38.2 h4ff8645_0 conda-forge sysroot_linux-64 2.12 he073ed8_15 conda-forge tk 8.6.12 h27826a3_0 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge xz 5.2.5 h516909a_1 conda-forge zlib 1.2.11 h166bdaf_1014 conda-forge

which protoc shows:

~/miniconda3/envs/GraphAligner/bin/protoc