smithlabcode / methpipe

A pipeline for analyzing DNA methylation data from bisulfite sequencing.
http://smithlabresearch.org/methpipe
67 stars 27 forks source link

problem with installing methpipe on HPC server #188

Closed BenvanderVeer closed 3 years ago

BenvanderVeer commented 3 years ago

Hi there,

I tried to install methpipe on a high performance clomputing (HPC) server. Because I am not the administrator, I cannot install the software system wide. I installed both the zlib library and HTSlib using conda. I run the configuration script to install it "in some reasonable place".

When I try to run make, I get this error:

make  all-recursive
make[1]: Entering directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build'
Making all in src/smithlab_cpp
make[2]: Entering directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build/src/smithlab_cpp'
make  all-am
make[3]: Entering directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build/src/smithlab_cpp'
  CXX      OptionParser.lo
../../../src/smithlab_cpp/OptionParser.cpp: In function 'void read_config_file(const string&, std::vector<std::basic_string<char> >&)':
../../../src/smithlab_cpp/OptionParser.cpp:371:54: error: no matching function for call to 'regex_replace(std::string&, std::regex, const char [1])'
     line = regex_replace(line, regex(outer_space), "");
                                                      ^
../../../src/smithlab_cpp/OptionParser.cpp:371:54: note: candidates are:
In file included from /usr/include/c++/4.8.2/regex:62:0,
                 from ../../../src/smithlab_cpp/OptionParser.cpp:35:
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(const basic_string<_Ch_type>& __s,
     ^
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note:   template argument deduction/substitution failed:
../../../src/smithlab_cpp/OptionParser.cpp:371:54: note:   mismatched types 'const std::basic_string<_Ch_type>' and 'const char [1]'
     line = regex_replace(line, regex(outer_space), "");
                                                      ^
In file included from /usr/include/c++/4.8.2/regex:62:0,
                 from ../../../src/smithlab_cpp/OptionParser.cpp:35:
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
     ^
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note:   template argument deduction/substitution failed:
../../../src/smithlab_cpp/OptionParser.cpp:371:54: note:   deduced conflicting types for parameter '_Bi_iter' ('std::basic_regex<char>' and 'const char*')
     line = regex_replace(line, regex(outer_space), "");
                                                      ^
../../../src/smithlab_cpp/OptionParser.cpp:372:55: error: no matching function for call to 'regex_replace(std::string&, std::regex, const char [2])'
     line = regex_replace(line, regex(inner_space), " ");
                                                       ^
../../../src/smithlab_cpp/OptionParser.cpp:372:55: note: candidates are:
In file included from /usr/include/c++/4.8.2/regex:62:0,
                 from ../../../src/smithlab_cpp/OptionParser.cpp:35:
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(const basic_string<_Ch_type>& __s,
     ^
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note:   template argument deduction/substitution failed:
../../../src/smithlab_cpp/OptionParser.cpp:372:55: note:   mismatched types 'const std::basic_string<_Ch_type>' and 'const char [2]'
     line = regex_replace(line, regex(inner_space), " ");
                                                       ^
In file included from /usr/include/c++/4.8.2/regex:62:0,
                 from ../../../src/smithlab_cpp/OptionParser.cpp:35:
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
     ^
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note:   template argument deduction/substitution failed:
../../../src/smithlab_cpp/OptionParser.cpp:372:55: note:   deduced conflicting types for parameter '_Bi_iter' ('std::basic_regex<char>' and 'const char*')
     line = regex_replace(line, regex(inner_space), " ");
                                                       ^
../../../src/smithlab_cpp/OptionParser.cpp:389:64: error: no matching function for call to 'regex_replace(std::string&, std::regex, const char [1])'
       option_value = regex_replace(line, regex(outer_space), "");
                                                                ^
../../../src/smithlab_cpp/OptionParser.cpp:389:64: note: candidates are:
In file included from /usr/include/c++/4.8.2/regex:62:0,
                 from ../../../src/smithlab_cpp/OptionParser.cpp:35:
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(const basic_string<_Ch_type>& __s,
     ^
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note:   template argument deduction/substitution failed:
../../../src/smithlab_cpp/OptionParser.cpp:389:64: note:   mismatched types 'const std::basic_string<_Ch_type>' and 'const char [1]'
       option_value = regex_replace(line, regex(outer_space), "");
                                                                ^
In file included from /usr/include/c++/4.8.2/regex:62:0,
                 from ../../../src/smithlab_cpp/OptionParser.cpp:35:
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
     ^
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note:   template argument deduction/substitution failed:
../../../src/smithlab_cpp/OptionParser.cpp:389:64: note:   deduced conflicting types for parameter '_Bi_iter' ('std::basic_regex<char>' and 'const char*')
       option_value = regex_replace(line, regex(outer_space), "");
                                                                ^
make[3]: *** [Makefile:506: OptionParser.lo] Error 1
make[3]: Leaving directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build/src/smithlab_cpp'
make[2]: *** [Makefile:380: all] Error 2
make[2]: Leaving directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build/src/smithlab_cpp'
make[1]: *** [Makefile:1102: all-recursive] Error 1
make[1]: Leaving directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build'
make: *** [Makefile:622: all] Error 2

What am I doing wrong?

best, Ben

terencewtli commented 3 years ago

Hi,

I believe this error has to do with your compiler being too old. Can you try using GCC 5.8 or newer?

andrewdavidsmith commented 3 years ago

I’m sure our documentation says we don’t do gcc4.8. If not, we’ll fix it. No hpc should have that as default for their users these days. You could install your own compiler, or tell your sys admin they are a decade behind. I’d do the latter. Our software needs the 2011 standard for c++.

On Jul 28, 2021, at 1:29 AM, BenvanderVeer @.***> wrote:

 Hi there,

I tried to install methpipe on a high performance clomputing (HPC) server. Because I am not the administrator, I cannot install the software system wide. I installed both the zlib library and HTSlib using conda. I run the configuration script to install it "in some reasonable place".

When I try to run make, I get this error:

make all-recursive make[1]: Entering directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build' Making all in src/smithlab_cpp make[2]: Entering directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build/src/smithlab_cpp' make all-am make[3]: Entering directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build/src/smithlab_cpp' CXX OptionParser.lo ../../../src/smithlab_cpp/OptionParser.cpp: In function 'void read_config_file(const string&, std::vector<std::basic_string >&)': ../../../src/smithlab_cpp/OptionParser.cpp:371:54: error: no matching function for call to 'regex_replace(std::string&, std::regex, const char [1])' line = regex_replace(line, regex(outer_space), ""); ^ ../../../src/smithlab_cpp/OptionParser.cpp:371:54: note: candidates are: In file included from /usr/include/c++/4.8.2/regex:62:0, from ../../../src/smithlab_cpp/OptionParser.cpp:35: /usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type) regex_replace(const basic_string<_Ch_type>& s, ^ /usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template argument deduction/substitution failed: ../../../src/smithlab_cpp/OptionParser.cpp:371:54: note: mismatched types 'const std::basic_string<_Ch_type>' and 'const char [1]' line = regex_replace(line, regex(outer_space), ""); ^ In file included from /usr/include/c++/4.8.2/regex:62:0, from ../../../src/smithlab_cpp/OptionParser.cpp:35: /usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type) regex_replace(_Out_iter out, _Bi_iter first, _Bi_iter last, ^ /usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template argument deduction/substitution failed: ../../../src/smithlab_cpp/OptionParser.cpp:371:54: note: deduced conflicting types for parameter '_Bi_iter' ('std::basic_regex' and 'const char') line = regex_replace(line, regex(outer_space), ""); ^ ../../../src/smithlab_cpp/OptionParser.cpp:372:55: error: no matching function for call to 'regex_replace(std::string&, std::regex, const char [2])' line = regex_replace(line, regex(inner_space), " "); ^ ../../../src/smithlab_cpp/OptionParser.cpp:372:55: note: candidates are: In file included from /usr/include/c++/4.8.2/regex:62:0, from ../../../src/smithlab_cpp/OptionParser.cpp:35: /usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type) regex_replace(const basic_string<_Ch_type>& s, ^ /usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template argument deduction/substitution failed: ../../../src/smithlab_cpp/OptionParser.cpp:372:55: note: mismatched types 'const std::basic_string<_Ch_type>' and 'const char [2]' line = regex_replace(line, regex(inner_space), " "); ^ In file included from /usr/include/c++/4.8.2/regex:62:0, from ../../../src/smithlab_cpp/OptionParser.cpp:35: /usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type) regex_replace(_Out_iter out, _Bi_iter first, _Bi_iter last, ^ /usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template argument deduction/substitution failed: ../../../src/smithlab_cpp/OptionParser.cpp:372:55: note: deduced conflicting types for parameter '_Bi_iter' ('std::basic_regex' and 'const char') line = regex_replace(line, regex(inner_space), " "); ^ ../../../src/smithlab_cpp/OptionParser.cpp:389:64: error: no matching function for call to 'regex_replace(std::string&, std::regex, const char [1])' option_value = regex_replace(line, regex(outer_space), ""); ^ ../../../src/smithlab_cpp/OptionParser.cpp:389:64: note: candidates are: In file included from /usr/include/c++/4.8.2/regex:62:0, from ../../../src/smithlab_cpp/OptionParser.cpp:35: /usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type) regex_replace(const basic_string<_Ch_type>& __s, ^ /usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template argument deduction/substitution failed: ../../../src/smithlab_cpp/OptionParser.cpp:389:64: note: mismatched types 'const std::basic_string<_Ch_type>' and 'const char [1]' option_value = regex_replace(line, regex(outer_space), ""); ^ In file included from /usr/include/c++/4.8.2/regex:62:0, from ../../../src/smithlab_cpp/OptionParser.cpp:35: /usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type) regex_replace(_Out_iter out, _Bi_iter first, _Bi_iter __last, ^ /usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template argument deduction/substitution failed: ../../../src/smithlab_cpp/OptionParser.cpp:389:64: note: deduced conflicting types for parameter '_Bi_iter' ('std::basic_regex' and 'const char*') option_value = regex_replace(line, regex(outer_space), ""); ^ make[3]: [Makefile:506: OptionParser.lo] Error 1 make[3]: Leaving directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build/src/smithlab_cpp' make[2]: [Makefile:380: all] Error 2 make[2]: Leaving directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build/src/smithlab_cpp' make[1]: [Makefile:1102: all-recursive] Error 1 make[1]: Leaving directory '/vsc-hard-mounts/leuven-data/328/vsc32808/install/methpipe-4.1.1/build' make: [Makefile:622: all] Error 2

What am I doing wrong?

best, Ben

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

BenvanderVeer commented 3 years ago

Hi! I managed to get it working!

I am fairly new to installing software where I need to compile it myself, so I couldn't figure out whatsoever what the error message was trying to tell me.

Thanks for the input, and I apologize for asking questions that are actually too obvious!

best, Ben

andrewdavidsmith commented 3 years ago

@BenvanderVeer can you indicate (for others) which approach allowed you to get it working so quickly? Was another compiler already on the system? Did you have some quick way to get one? Or just build a new compiler from source in your user space and set all env variables?

BenvanderVeer commented 3 years ago

On my system (VSC, the Vlaamse Super Computer), there were many different compilers installed, I just needed to load the module with the correct one. The gcc4.8 compiler was the default one.

I used the Gnu Scientific library and the GCC 6.4.0, with the command below, which did the job. (Offcourse this will be different for every system).

$ module load GSL/2.4-GCCcore-6.4.0

best, Ben