Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make runtest failed #6813

Open
outlookerr opened this issue Aug 6, 2019 · 2 comments

Comments

@outlookerr
Copy link

commented Aug 6, 2019

I have finished make all successfully,but I met the error during the make runtest.

I/usr/include/python2.7 -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/lib/x86_64-linux-gnu/hdf5/serial/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -I/opt/intel/mkl/include -Wall -Wno-sign-compare -L/usr/lib64 -L/usr/local/lib -L/usr/lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/hdf5/serial -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib -L/opt/intel/mkl/lib/intel64 -L.build_release/lib -lcudart -lcublas -lcurand -lglog -lgflags -lprotobuf -lleveldb -lsnappy -llmdb -lboost_system -lhdf5_hl -lhdf5 -lm -lopencv_core -lopencv_highgui -lopencv_imgproc -lboost_thread -lstdc++ -lcudnn -lmkl_rt -lcaffe -Wl,-rpath,$ORIGIN/../lib
.build_release/src/caffe/test/test_gradient_based_solver.o:在函数‘caffe::MakeTempDir(std::__cxx11::basic_string<char, std::char_traits, std::allocator >)’中:
test_gradient_based_solver.cpp:(.text._ZN5caffe11MakeTempDirEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5caffe11MakeTempDirEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x77):对‘boost::filesystem::detail::temp_directory_path(boost::system::error_code
)’未定义的引用
test_gradient_based_solver.cpp:(.text._ZN5caffe11MakeTempDirEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5caffe11MakeTempDirEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xab):对‘boost::filesystem::path::operator/=(boost::filesystem::path const&)’未定义的引用
test_gradient_based_solver.cpp:(.text._ZN5caffe11MakeTempDirEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5caffe11MakeTempDirEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x128):对‘boost::filesystem::detail::unique_path(boost::filesystem::path const&, boost::system::error_code*)’未定义的引用
test_gradient_based_solver.cpp:(.text._ZN5caffe11MakeTempDirEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5caffe11MakeTempDirEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x166):对‘boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*)’未定义的引用
.build_release/src/caffe/test/test_hdf5_output_layer.o:在函数‘caffe::MakeTempFilename(std::__cxx11::basic_string<char, std::char_traits, std::allocator >)’中:
test_hdf5_output_layer.cpp:(.text._ZN5caffe16MakeTempFilenameEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5caffe16MakeTempFilenameEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x86):对‘boost::filesystem::detail::temp_directory_path(boost::system::error_code
)’未定义的引用
test_hdf5_output_layer.cpp:(.text._ZN5caffe16MakeTempFilenameEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5caffe16MakeTempFilenameEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xb9):对‘boost::filesystem::path::operator/=(boost::filesystem::path const&)’未定义的引用
test_hdf5_output_layer.cpp:(.text._ZN5caffe16MakeTempFilenameEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5caffe16MakeTempFilenameEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x134):对‘boost::filesystem::detail::unique_path(boost::filesystem::path const&, boost::system::error_code*)’未定义的引用
collect2: error: ld returned 1 exit status
Makefile:540: recipe for target '.build_release/test/test_all.testbin' failed
make: *** [.build_release/test/test_all.testbin] Error 1

Tried solutions

I have tried to installed boost,but it does not work well.

System configuration

This is my Makefile.config

cuDNN acceleration switch (uncomment to build with cuDNN).

USE_CUDNN := 1

CPU-only switch (uncomment to build without GPU support).

CPU_ONLY := 1

uncomment to disable IO dependencies and corresponding data layers

USE_OPENCV := 0
USE_LEVELDB := 0
USE_LMDB := 0

uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)

You should not set this flag if you will be reading LMDBs with any

possibility of simultaneous read and write

ALLOW_LMDB_NOLOCK := 1

Uncomment if you're using OpenCV 3

OPENCV_VERSION := 3

To customize your choice of compiler, uncomment and set the following.

N.B. the default for Linux is g++ and the default for OSX is clang++

CUSTOM_CXX := g++

CUDA directory contains bin/ and lib/ directories that we need.

CUDA_DIR := /usr/local/cuda

On Ubuntu 14.04, if cuda tools are installed via

"sudo apt-get install nvidia-cuda-toolkit" then use this instead:

CUDA_DIR := /usr

CUDA architecture setting: going with all of them.

For CUDA < 6.0, comment the *_50 lines for compatibility.

CUDA_ARCH := -gencode arch=compute_20,code=sm_20
-gencode arch=compute_20,code=sm_21
-gencode arch=compute_30,code=sm_30
-gencode arch=compute_35,code=sm_35
-gencode arch=compute_50,code=sm_50
-gencode arch=compute_50,code=compute_50

BLAS choice:

atlas for ATLAS (default)

mkl for MKL

open for OpenBlas

BLAS := mkl

Custom (MKL/ATLAS/OpenBLAS) include and lib directories.

Leave commented to accept the defaults for your choice of BLAS

(which should work)!

BLAS_INCLUDE := /opt/intel/mkl/include
BLAS_LIB := /opt/intel/mkl/lib/intel64

Homebrew puts openblas in a directory that is not on the standard search path

BLAS_INCLUDE := $(shell brew --prefix openblas)/include

BLAS_LIB := $(shell brew --prefix openblas)/lib

This is required only if you will compile the matlab interface.

MATLAB directory should contain the mex binary in /bin.

MATLAB_DIR := /usr/local

MATLAB_DIR := /Applications/MATLAB_R2012b.app

NOTE: this is required only if you will compile the python interface.

We need to be able to find Python.h and numpy/arrayobject.h.

PYTHON_INCLUDE := /usr/include/python2.7 /usr/lib64/python2.7/site-packages/numpy/core/include

Anaconda Python distribution is quite popular. Include path:

Verify anaconda location, sometimes it's in root.

ANACONDA_HOME := $(HOME)/anaconda

PYTHON_INCLUDE := $(ANACONDA_HOME)/include \

	# $(ANACONDA_HOME)/include/python2.7 \
	# $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \

We need to be able to find libpythonX.X.so or .dylib.

PYTHON_LIB := /usr/lib64

PYTHON_LIB := $(ANACONDA_HOME)/lib

Homebrew installs numpy in a non standard path (keg only)

PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.file)'))/include

PYTHON_LIB += $(shell brew --prefix numpy)/lib

Uncomment to support layers written in Python (will link against Python libs)

WITH_PYTHON_LAYER := 1

Whatever else you find you need goes here.

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include /usr/lib/x86_64-linux-gnu/hdf5/serial/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial

If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies

INCLUDE_DIRS += $(shell brew --prefix)/include

LIBRARY_DIRS += $(shell brew --prefix)/lib

Uncomment to use pkg-config to specify OpenCV library paths.

(Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)

USE_PKG_CONFIG := 1

BUILD_DIR := build
DISTRIBUTE_DIR := distribute

Uncomment for debugging. Does not work on OSX due to #171

DEBUG := 1

The ID of the GPU that 'make runtest' will use to run unit tests.

TEST_GPUID := 0

enable pretty build (comment to see full commands)

#Q ?= @

Thanks!

@outlookerr

This comment has been minimized.

Copy link
Author

commented Aug 6, 2019

‘未定义的引用’ means ‘undefined reference’

@outlookerr

This comment has been minimized.

Copy link
Author

commented Aug 7, 2019

when I cmake
Boost 1.46 found
but my version of libboost is 1.58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.