2016-09-08 2 views
2

と未定義referenciesは、私は何の問題もなくカフェを設置したが、私はカフェ-LSTMを構築しようとしているとき、私は次の問題があります。archlinuxの作業Archlinux |カフェ・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 

をし、すべてのパッケージがインストールされています。私は

cmakeの-DBLAS =オープン../caffe-lstm/

とmake.configファイルに固定

BLASのようopenblasにBLASを設定:=オープン

上に構築gcc4.9.3およびg ++ 5.4.0

+1

依存関係をインストールまたはビルドしていないか、CMakeスクリプトが壊れています。開発者の一人に相談してください。 – usr1234567

答えて

0

問題はprotobufとcudaにありました。私はこの後にprotobuf2.5とcuda8をインストールしました。問題はありません。

ヒント: Protobufはgitまたはsourceforgeからダウンロードしてコンパイルする必要があります。クダと同じこと。 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