baidu / fast_rgf

Multi-core implementation of Regularized Greedy Forest
MIT License
465 stars 111 forks source link

cmake error #9

Open eloiup opened 7 years ago

eloiup commented 7 years ago

download ->

cd build/
 cmake ..

outputs:

[ 52%] Linking CXX executable forest_train
CMakeFiles/forest_train.dir/forest_train.cpp.o: In function `TestOutput<unsigned short, int, unsigned char>::print_outputs(rgf::DecisionForest<unsigned short, int, unsigned char>&, int, int)':
forest_train.cpp:(.text._ZN10TestOutputItihE13print_outputsERN3rgf14DecisionForestItihEEii[_ZN10TestOutputItihE13print_outputsERN3rgf14DecisionForestItihEEii]+0xadd): undefined reference to `pthread_create'
../forest/libforest.a(forest.cpp.o): In function `rgf::DecisionForest<float, int, float>::apply(rgf::DataPoint<float, int, float>&, unsigned int, int)':
forest.cpp:(.text._ZN3rgf14DecisionForestIfifE5applyERNS_9DataPointIfifEEji[_ZN3rgf14DecisionForestIfifE5applyERNS_9DataPointIfifEEji]+0x3fe): undefined reference to `pthread_create'
../forest/libforest.a(forest.cpp.o): In function `rgf::DecisionForest<int, int, int>::apply(rgf::DataPoint<int, int, int>&, unsigned int, int)':
forest.cpp:(.text._ZN3rgf14DecisionForestIiiiE5applyERNS_9DataPointIiiiEEji[_ZN3rgf14DecisionForestIiiiE5applyERNS_9DataPointIiiiEEji]+0x3fe): undefined reference to `pthread_create'
../forest/libforest.a(forest.cpp.o): In function `rgf::DecisionForest<unsigned short, int, unsigned char>::apply(rgf::DataPoint<unsigned short, int, unsigned char>&, unsigned int, int)':
forest.cpp:(.text._ZN3rgf14DecisionForestItihE5applyERNS_9DataPointItihEEji[_ZN3rgf14DecisionForestItihE5applyERNS_9DataPointItihEEji]+0x3fe): undefined reference to `pthread_create'
../forest/libforest.a(forest.cpp.o): In function `void rgf::MapReduceRunner::run_threads<rgf::DecisionForest<unsigned short, int, unsigned char>::train(rgf::DataSet<unsigned short, int, unsigned char>&, double*, rgf::DecisionTree<unsigned short, int, unsigned char>::TrainParam&, rgf::DecisionForest<unsigned short, int, unsigned char>::TrainParam&, rgf::DataSet<unsigned short, int, unsigned char>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, rgf::DataDiscretization<int, int, int, int>*)::TrainEvalMR>(rgf::DecisionForest<unsigned short, int, unsigned char>::train(rgf::DataSet<unsigned short, int, unsigned char>&, double*, rgf::DecisionTree<unsigned short, int, unsigned char>::TrainParam&, rgf::DecisionForest<unsigned short, int, unsigned char>::TrainParam&, rgf::DataSet<unsigned short, int, unsigned char>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, rgf::DataDiscretization<int, int, int, int>*)::TrainEvalMR&, int, int, bool)':
forest.cpp:(.text._ZN3rgf15MapReduceRunner11run_threadsIZNS_14DecisionForestItihE5trainERNS_7DataSetItihEEPdRNS_12DecisionTreeItihE10TrainParamERNS3_10TrainParamES6_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_18DataDiscretizationIiiiiEEE11TrainEvalMREEvRT_iib[_ZN3rgf15MapReduceRunner11run_threadsIZNS_14DecisionForestItihE5trainERNS_7DataSetItihEEPdRNS_12DecisionTreeItihE10TrainParamERNS3_10TrainParamES6_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_18DataDiscretizationIiiiiEEE11TrainEvalMREEvRT_iib]+0x11b): undefined reference to `pthread_create'
../forest/libforest.a(forest.cpp.o):forest.cpp:(.text._ZN3rgf15MapReduceRunner11run_threadsIZNS_14DecisionForestIiiiE5trainERNS_7DataSetIiiiEEPdRNS_12DecisionTreeIiiiE10TrainParamERNS3_10TrainParamES6_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_18DataDiscretizationIiiiiEEE11TrainEvalMREEvRT_iib[_ZN3rgf15MapReduceRunner11run_threadsIZNS_14DecisionForestIiiiE5trainERNS_7DataSetIiiiEEPdRNS_12DecisionTreeIiiiE10TrainParamERNS3_10TrainParamES6_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_18DataDiscretizationIiiiiEEE11TrainEvalMREEvRT_iib]+0x11b): more undefined references to `pthread_create' follow
collect2: error: ld returned 1 exit status
src/exe/CMakeFiles/forest_train.dir/build.make:96: recipe for target 'src/exe/forest_train' failed
make[2]: *** [src/exe/forest_train] Error 1
CMakeFiles/Makefile2:204: recipe for target 'src/exe/CMakeFiles/forest_train.dir/all' failed
make[1]: *** [src/exe/CMakeFiles/forest_train.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

any hints/advices?