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

Error: 'make all' #2855

Closed
ycliu1217 opened this issue Aug 4, 2015 · 6 comments
Closed

Error: 'make all' #2855

ycliu1217 opened this issue Aug 4, 2015 · 6 comments

Comments

@ycliu1217
Copy link

I ran

cp Makefile.config.example Makefile.config
make all

as suggested on the website to complete the installation.
I use Ubuntu 14.04 with CUDA and OpenBlas.

The error messages showed as follows

CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
.build_release/lib/libcaffe.so: undefined reference to caffe::curandGetErrorString(curandStatus)

.build_release/lib/libcaffe.so: undefined reference to caffe::BaseConvolutionLayer<double>::weight_gpu_gemm(double const*, double const*, double*)

.build_release/lib/libcaffe.so: undefined reference to caffe::BaseConvolutionLayer<double>::forward_gpu_bias(double*, double const*)

.build_release/lib/libcaffe.so: undefined reference to caffe::BaseConvolutionLayer<float>::forward_gpu_bias(float*, float const*)

.build_release/lib/libcaffe.so: undefined reference to caffe::cudnn::dataType<double>::zero

.build_release/lib/libcaffe.so: undefined reference to caffe::cudnn::dataType<double>::one

.build_release/lib/libcaffe.so: undefined reference to caffe::BaseConvolutionLayer<float>::backward_gpu_gemm(float const*, float const*, float*)

.build_release/lib/libcaffe.so: undefined reference to caffe::cublasGetErrorString(cublasStatus_t)

.build_release/lib/libcaffe.so: undefined reference to caffe::BaseConvolutionLayer<double>::forward_gpu_gemm(double const*, double const*, double*, bool)

.build_release/lib/libcaffe.so: undefined reference to caffe::BaseConvolutionLayer<double>::backward_gpu_gemm(double const*, double const*, double*)

.build_release/lib/libcaffe.so: undefined reference to caffe::BaseConvolutionLayer<double>::backward_gpu_bias(double*, double const*)

.build_release/lib/libcaffe.so: undefined reference to caffe::BaseConvolutionLayer<float>::forward_gpu_gemm(float const*, float const*, float*, bool)

.build_release/lib/libcaffe.so: undefined reference to caffe::cudnn::dataType<float>::zero

.build_release/lib/libcaffe.so: undefined reference to caffe::BaseConvolutionLayer<float>::weight_gpu_gemm(float const*, float const*, float*)

.build_release/lib/libcaffe.so: undefined reference to caffe::BaseConvolutionLayer<float>::backward_gpu_bias(float*, float const*)

.build_release/lib/libcaffe.so: undefined reference to caffe::cudnn::dataType<float>::one

collect2: error: ld returned 1 exit status

make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1

I only modified Makefile.config.
The modified Makefile.config shown as follows

USE_CUDNN := 1
CUSTOM_CXX := g++
CUDA_DIR := /usr/local/cuda
-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 := OpenBlas
PYTHON_INCLUDE := /usr/include/python2.7
/usr/lib/python2.7/dist-packages/numpy/core/include
PYTHON_LIB := /usr/lib
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
BUILD_DIR := build
DISTRIBUTE_DIR := distribute
TEST_GPUID := 0
Q ?= @

I googled but there seemed no similar issues.

I have no idea about it.

Can anyone give me some help?
Thanks!

@IMG-PRCSNG
Copy link

Did you make modifications to the source code?
And can you reformat the comment as it is very difficult to read through.
Add three back-ticks at the beginning and at the end of the error part so that it becomes more readable (back-tick = ``` . Add three of these at the start and at the end)

@ycliu1217
Copy link
Author

@IMG-PRCSNG Thanks for you reminding. I added line and back-ticks to separate the error messages.

@IMG-PRCSNG
Copy link

Well, just in case, you are compiling with a wrong flag to blas.
For using open blas, you must set BLAS := open ( and not OpenBlas ).
Similar errors were encountered in #2348 and #2353.
I am not saying this is the solution, but you can try cleaning your previous build and follow the steps in the referenced issues. Kindly let me know what happens.

@ycliu1217
Copy link
Author

@IMG-PRCSNG
I used the method in #2348 .
Input the commands as follows

mkdir build
cd build
cmake ..
make all

The process was done without error.
Then I changed to the caffe folder to execute make all.
But the errors still existed.

And BLAS := OpenBlas was changed to BLAS := open.

@seanbell
Copy link

seanbell commented Aug 5, 2015

If you're using cmake, you don't also use the Makefile (in the root caffe directory). You use one or the other.

Also, please ask this question on the caffe-users list.

Please do not post usage, installation, or modeling questions, or other requests for help to Issues.
Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.

@shilpi2015
Copy link

I am getting following error for ~/caffe$ sudo make all
...
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0
CXX tools/finetune_net.cpp
CXX/LD -o .build_release/tools/finetune_net.bin
CXX tools/upgrade_net_proto_binary.cpp
CXX/LD -o .build_release/tools/upgrade_net_proto_binary.bin
.build_release/lib/libcaffe.so: undefined reference to cudnnSetActivationDescriptor' .build_release/lib/libcaffe.so: undefined reference to cudnnCreateActivationDescriptor'
.build_release/lib/libcaffe.so: undefined reference to `cudnnDestroyActivationDescriptor'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/upgrade_net_proto_binary.bin] Error 1

Anyone pl help how to resolve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants