2016-09-08 65 views
2

不確定referencies我裝朱古力沒有任何問題,但是當我試圖建立朱古力,LSTM我有下一個問題:Archlinux |向Caffe-LSTM構建

[ 86%] Linking CXX executable train_net 
../lib/libcaffe.so: undefined reference to `H5LTget_dataset_ndims' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_int' 
../lib/libcaffe.so: undefined reference to `H5LTfind_dataset' 
../lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<double>*>::pop(std::string const&)' 
../lib/libcaffe.so: undefined reference to `google::base::CheckOpMessageBuilder::NewString()' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_double' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_int' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_float' 
../lib/libcaffe.so: undefined reference to `google::protobuf::internal::NameOfEnum(google::protobuf::EnumDescriptor const*, int)' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_float' 
../lib/libcaffe.so: undefined reference to `H5LTget_dataset_info' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_string' 
../lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<float>*>::pop(std::string const&)' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_double' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_string' 
collect2: error: ld returned 1 exit status 
make[2]: *** [tools/CMakeFiles/test_net.dir/build.make:127: tools/test_net] Error 1 
make[1]: *** [CMakeFiles/Makefile2:510: tools/CMakeFiles/test_net.dir/all] Error 2 
../lib/libcaffe.so: undefined reference to `H5LTget_dataset_ndims' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_int' 
../lib/libcaffe.so: undefined reference to `H5LTfind_dataset' 
../lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<double>*>::pop(std::string const&)' 
../lib/libcaffe.so: undefined reference to `google::base::CheckOpMessageBuilder::NewString()' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_double' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_int' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_float' 
../lib/libcaffe.so: undefined reference to `google::protobuf::internal::NameOfEnum(google::protobuf::EnumDescriptor const*, int)' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_float' 
../lib/libcaffe.so: undefined reference to `H5LTget_dataset_info' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_string' 
../lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<float>*>::pop(std::string const&)' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_double' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_string' 
collect2: error: ld returned 1 exit status 
make[2]: *** [tools/CMakeFiles/train_net.dir/build.make:127: tools/train_net] Error 1 
make[1]: *** [CMakeFiles/Makefile2:548: tools/CMakeFiles/train_net.dir/all] Error 2 
In file included from /usr/include/boost/type_traits/ice.hpp:15:0, 
       from /usr/include/boost/python/detail/def_helper.hpp:9, 
       from /usr/include/boost/python/class.hpp:29, 
       from /usr/include/boost/python.hpp:18, 
       from /home/standnail/Git/caffe-lstm/tools/caffe.cpp:2: 
/usr/include/boost/type_traits/detail/ice_or.hpp:17:71: note: #pragma message: NOTE: Use of this header (ice_or.hpp) is deprecated 
# pragma message("NOTE: Use of this header (ice_or.hpp) is deprecated") 
                    ^
In file included from /usr/include/boost/type_traits/ice.hpp:16:0, 
       from /usr/include/boost/python/detail/def_helper.hpp:9, 
       from /usr/include/boost/python/class.hpp:29, 
       from /usr/include/boost/python.hpp:18, 
       from /home/standnail/Git/caffe-lstm/tools/caffe.cpp:2: 
/usr/include/boost/type_traits/detail/ice_and.hpp:18:72: note: #pragma message: NOTE: Use of this header (ice_and.hpp) is deprecated 
# pragma message("NOTE: Use of this header (ice_and.hpp) is deprecated") 
                     ^
In file included from /usr/include/boost/type_traits/ice.hpp:17:0, 
       from /usr/include/boost/python/detail/def_helper.hpp:9, 
       from /usr/include/boost/python/class.hpp:29, 
       from /usr/include/boost/python.hpp:18, 
       from /home/standnail/Git/caffe-lstm/tools/caffe.cpp:2: 
/usr/include/boost/type_traits/detail/ice_not.hpp:17:72: note: #pragma message: NOTE: Use of this header (ice_not.hpp) is deprecated 
# pragma message("NOTE: Use of this header (ice_not.hpp) is deprecated") 
                     ^
In file included from /usr/include/boost/type_traits/ice.hpp:18:0, 
       from /usr/include/boost/python/detail/def_helper.hpp:9, 
       from /usr/include/boost/python/class.hpp:29, 
       from /usr/include/boost/python.hpp:18, 
       from /home/standnail/Git/caffe-lstm/tools/caffe.cpp:2: 
/usr/include/boost/type_traits/detail/ice_eq.hpp:17:71: note: #pragma message: NOTE: Use of this header (ice_eq.hpp) is deprecated 
# pragma message("NOTE: Use of this header (ice_eq.hpp) is deprecated") 
                    ^
[ 86%] Linking CXX executable caffe 
../lib/libcaffe.so: undefined reference to `H5LTget_dataset_ndims' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_int' 
../lib/libcaffe.so: undefined reference to `H5LTfind_dataset' 
../lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<double>*>::pop(std::string const&)' 
../lib/libcaffe.so: undefined reference to `google::base::CheckOpMessageBuilder::NewString()' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_double' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_int' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_float' 
../lib/libcaffe.so: undefined reference to `google::protobuf::internal::NameOfEnum(google::protobuf::EnumDescriptor const*, int)' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_float' 
../lib/libcaffe.so: undefined reference to `H5LTget_dataset_info' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_string' 
../lib/libcaffe.so: undefined reference to `caffe::BlockingQueue<caffe::Batch<float>*>::pop(std::string const&)' 
../lib/libcaffe.so: undefined reference to `H5LTread_dataset_double' 
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_string' 
collect2: error: ld returned 1 exit status 
make[2]: *** [tools/CMakeFiles/caffe.bin.dir/build.make:127: tools/caffe] Error 1 
make[1]: *** [CMakeFiles/Makefile2:472: tools/CMakeFiles/caffe.bin.dir/all] Error 2 
make: *** [Makefile:128: all] Error 2 

上的archlinux工作,並安裝所有軟件包。我設置BLAS到openblas像

cmake的-DBLAS =開放../caffe-lstm/

,並固定在make.config文件

BLAS:=開放

建立於gcc4.9.3g ++ 5.4.0

+1

要麼你沒有安裝或建立一個依賴項或者CMake腳本被破壞。請詢問其中一位開發人員。 – usr1234567

回答

0

問題出在protobuf和cuda上。在這之後,我安裝了protobuf2.5和cuda8,我沒有任何問題。

提示: Protobuf應該從git或sourceforge下載並編譯它。與cuda一樣的東西。 Caffe不喜歡來自存儲庫的下載庫。

3

我有同樣的問題,試圖編譯caffe-fast-rcnn,但我注意到,我沒有問題與相同的配置(protobuf和cuda版本)編譯官方caffe版本。因此,比較兩個版本,我通過添加一行到CAFFE_ROOT修正了該問題/ cmake的/ Dependencies.cmake:

# ---[ HDF5 
find_package(HDF5 COMPONENTS HL REQUIRED) 
include_directories(SYSTEM ${HDF5_INCLUDE_DIRS} ${HDF5_HL_INCLUDE_DIR}) 
list(APPEND Caffe_LINKER_LIBS ${HDF5_LIBRARIES}) 
list(APPEND Caffe_LINKER_LIBS ${HDF5_HL_LIBRARIES}) #added 

這個問題在目前的朱古力版本已得到糾正,但你仍然可以找到它,如果你嘗試編譯基於舊版本的叉..

Ps:我使用cmake構建。

+1

該解決方案解決了在我的Ubuntu機器上構建NVCaffe(NVIDIA Caffe)時出現的相同問題。 –

+0

同樣在這裏:能夠用上述修補程序構建NVCaffe – M2X