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 -j8 && make pycaffe #765

Closed
PeterJiangwy opened this issue Jan 8, 2018 · 6 comments
Closed

make -j8 && make pycaffe #765

PeterJiangwy opened this issue Jan 8, 2018 · 6 comments

Comments

@PeterJiangwy
Copy link

PeterJiangwy commented Jan 8, 2018

CXX .build_release/src/caffe/proto/caffe.pb.cc
.........
linker command failed with exit code 1 (use -v to see invocation)
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1
I met this problem for 2 weeks, who can help me.

I use Mac, version is 10.13.2. Python is 2.7.
The MakeFile.config, I change Only_CPU.
And the setup.py I comment something about CUDA.

I'm a newer to caffe, And someone met the same problem with me, but I cannot follow his step, without detail solution.
It still cannot work, who can help me.

@pscheich
Copy link

pscheich commented Jan 8, 2018

can you paste your makefile and a few more lines from the terminal?

@PeterJiangwy
Copy link
Author

PeterJiangwy commented Jan 9, 2018

@pscheich, Here are the terminal and makefile.
the terminal is:
CXX src/caffe/layers/slice_layer.cpp
CXX src/caffe/parallel.cpp
CXX src/caffe/util/im2col.cpp
CXX src/caffe/util/db_lmdb.cpp
CXX src/caffe/util/db.cpp
CXX src/caffe/util/upgrade_proto.cpp
CXX src/caffe/util/benchmark.cpp
CXX src/caffe/util/cudnn.cpp
CXX src/caffe/util/math_functions.cpp
CXX src/caffe/util/hdf5.cpp
CXX src/caffe/util/signal_handler.cpp
CXX src/caffe/util/blocking_queue.cpp
CXX src/caffe/util/io.cpp
CXX src/caffe/util/db_leveldb.cpp
CXX src/caffe/util/insert_splits.cpp
CXX src/caffe/layer_factory.cpp
CXX src/caffe/blob.cpp
CXX src/caffe/layer.cpp
CXX src/caffe/solvers/nesterov_solver.cpp
CXX src/caffe/solvers/adam_solver.cpp
CXX src/caffe/solvers/sgd_solver.cpp
CXX src/caffe/solvers/adadelta_solver.cpp
CXX src/caffe/solvers/adagrad_solver.cpp
CXX src/caffe/solvers/rmsprop_solver.cpp
CXX src/caffe/internal_thread.cpp
CXX src/caffe/net.cpp
CXX src/caffe/data_reader.cpp
CXX src/caffe/solver.cpp
CXX src/caffe/syncedmem.cpp
CXX tools/extract_features.cpp
CXX tools/upgrade_solver_proto_text.cpp
CXX tools/caffe.cpp
CXX tools/convert_imageset.cpp
CXX tools/net_speed_benchmark.cpp
CXX tools/train_net.cpp
CXX tools/test_net.cpp
CXX tools/device_query.cpp
CXX tools/upgrade_net_proto_text.cpp
CXX tools/upgrade_net_proto_binary.cpp
CXX tools/compute_image_mean.cpp
CXX tools/finetune_net.cpp
CXX examples/mnist/convert_mnist_data.cpp
CXX examples/cpp_classification/classification.cpp
CXX examples/siamese/convert_mnist_siamese_data.cpp
CXX examples/cifar10/convert_cifar_data.cpp
CXX .build_release/src/caffe/proto/caffe.pb.cc
src/caffe/util/blocking_queue.cpp:50:7: warning: unused typedef 'INVALID_REQUESTED_LOG_SEVERITY' [-Wunused-local-typedef]
LOG_EVERY_N(INFO, 1000)<< log_on_wait;
^
/usr/local/include/glog/logging.h:943:30: note: expanded from macro 'LOG_EVERY_N'
INVALID_REQUESTED_LOG_SEVERITY);
^
1 warning generated.
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
ld: library not found for -lboost_python
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1
make: *** Waiting for unfinished jobs....
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .build_release/lib/libcaffe.a(cudnn_pooling_layer.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .build_release/lib/libcaffe.a(cudnn_lcn_layer.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .build_release/lib/libcaffe.a(cudnn_conv_layer.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .build_release/lib/libcaffe.a(cudnn_tanh_layer.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .build_release/lib/libcaffe.a(cudnn_softmax_layer.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .build_release/lib/libcaffe.a(cudnn_relu_layer.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .build_release/lib/libcaffe.a(cudnn_lrn_layer.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .build_release/lib/libcaffe.a(cudnn_sigmoid_layer.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .build_release/lib/libcaffe.a(cudnn.o) has no symbols

My Makefile.config is:
CPU_ONLY := 1
OPENCV_VERSION := 3
CUDA_DIR := /usr/local/cuda
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 := atlas
PYTHON_INCLUDE := /usr/include/python2.7
/usr/lib/python2.7/dist-packages/numpy/core/include
PYTHON_LIB := /usr/lib
print(numpy.core.file)'))/include
WITH_PYTHON_LAYER := 1
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

@PeterJiangwy
Copy link
Author

PeterJiangwy commented Jan 9, 2018

Above I have solved, because I don't install boost_python. But now when I make, it use python3, when make pycaffe is python2. It's so confusing.

@pscheich
Copy link

pscheich commented Jan 9, 2018

make caffe is successful?
whats the error from pycaffe?

@PeterJiangwy
Copy link
Author

PeterJiangwy commented Jan 10, 2018

/usr/local/include/boost/python/enum.hpp:85:26: error: use of undeclared identifier 'PyInt_AS_LONG'
T x = static_cast(PyInt_AS_LONG(obj));
^
1 error generated.

/usr/local/include/boost/python/enum1.hpp:84:26: error: use of undeclared identifier 'PyLong_AS_LONG'
T x = static_cast(PyLong_AS_LONG(obj));
^
1 error generated.

I'm python2, but it use python3.

@PeterJiangwy
Copy link
Author

I have reinstalled my OSx, It resolved.

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

2 participants