hpclab / quickrank

Official repository of QuickRank: A C++ suite of Learning to Rank algorithms.
http://quickrank.isti.cnr.it
Other
130 stars 23 forks source link

Compile error #13

Open Frozendevilfoy opened 5 years ago

Frozendevilfoy commented 5 years ago

I cannot clone the gitmodules auto, so I did it manully, but when I compile with make, I get the following error:

s4438236@moss:~/quickrank$ make
Scanning dependencies of target pugixml
[  1%] Building CXX object CMakeFiles/pugixml.dir/lib/pugixml/src/pugixml.cpp.o
Linking CXX static library libpugixml.a
[  1%] Built target pugixml
Scanning dependencies of target quickrank_common
[  3%] Building CXX object CMakeFiles/quickrank_common.dir/src/driver/driver.cc.o
In file included from /home/students/s4438236/quickrank/include/driver/driver.h:34:0,
                 from /home/students/s4438236/quickrank/src/driver/driver.cc:29:
/home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h: In member function ‘std::string ParamsMap::cleanUp(std::string)’:
/home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:327:54: error: no matching function for call to ‘regex_replace(std::string&, std::regex&, const char [1])’
     std::string clean = std::regex_replace(raw, e, "");
                                                      ^
/home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:327:54: note: candidates are:
In file included from /usr/include/c++/4.8.2/regex:62:0,
                 from /home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:35,
                 from /home/students/s4438236/quickrank/include/driver/driver.h:34,
                 from /home/students/s4438236/quickrank/src/driver/driver.cc:29:
/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:
In file included from /home/students/s4438236/quickrank/include/driver/driver.h:34:0,
                 from /home/students/s4438236/quickrank/src/driver/driver.cc:29:
/home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:327:54: note:   deduced conflicting types for parameter ‘_Bi_iter’ (‘std::basic_regex<char>’ and ‘const char*’)
     std::string clean = std::regex_replace(raw, e, "");
                                                      ^
In file included from /usr/include/c++/4.8.2/regex:62:0,
                 from /home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:35,
                 from /home/students/s4438236/quickrank/include/driver/driver.h:34,
                 from /home/students/s4438236/quickrank/src/driver/driver.cc:29:
/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:
In file included from /home/students/s4438236/quickrank/include/driver/driver.h:34:0,
                 from /home/students/s4438236/quickrank/src/driver/driver.cc:29:
/home/students/s4438236/quickrank/lib/paramsmap/paramsmap.h:327:54: note:   mismatched types ‘const std::basic_string<_Ch_type>’ and ‘const char [1]’
     std::string clean = std::regex_replace(raw, e, "");
                                                      ^
make[2]: *** [CMakeFiles/quickrank_common.dir/src/driver/driver.cc.o] Error 1
make[1]: *** [CMakeFiles/quickrank_common.dir/all] Error 2
make: *** [all] Error 2
UniqueLJH commented 5 years ago

your gcc is 4.8 version. gcc --version confirm your gcc version quickrank need gcc >= 4.9