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

link error at tk1 #669

Closed
wangxingxing opened this issue Jul 11, 2014 · 13 comments
Closed

link error at tk1 #669

wangxingxing opened this issue Jul 11, 2014 · 13 comments

Comments

@wangxingxing
Copy link

I try compile caffe on the nvidia tk1(https://developer.nvidia.com/jetson-tk1), i had compile successful on pc, but when i try compile same code at tk1 it had some link conflict. The pc and tk1 have some configure:
OS:ubuntu 14.04
opencv 2.8.4
cuda 6.0
i haven't get a clue for this error.

/usr/bin/g++-4.6 -shared -o build/lib/libcaffe.so build/src/caffe/proto/caffe_pretty_print.pb.o build/src/caffe/proto/caffe.pb.o build/src/caffe/syncedmem.o build/src/caffe/solver.o build/src/caffe/layers/neuron_layer.o build/src/caffe/layers/accuracy_layer.o build/src/caffe/layers/image_data_layer.o build/src/caffe/layers/multinomial_logistic_loss_layer.o build/src/caffe/layers/pooling_layer.o build/src/caffe/layers/eltwise_product_layer.o build/src/caffe/layers/loss_layer.o build/src/caffe/layers/window_data_layer.o build/src/caffe/layers/hdf5_output_layer.o build/src/caffe/layers/euclidean_loss_layer.o build/src/caffe/layers/tanh_layer.o build/src/caffe/layers/dropout_layer.o build/src/caffe/layers/power_layer.o build/src/caffe/layers/relu_layer.o build/src/caffe/layers/sigmoid_layer.o build/src/caffe/layers/softmax_loss_layer.o build/src/caffe/layers/infogain_loss_layer.o build/src/caffe/layers/hdf5_data_layer.o build/src/caffe/layers/lrn_layer.o build/src/caffe/layers/memory_data_layer.o build/src/caffe/layers/inner_product_layer.o build/src/caffe/layers/conv_layer.o build/src/caffe/layers/hinge_loss_layer.o build/src/caffe/layers/im2col_layer.o build/src/caffe/layers/data_layer.o build/src/caffe/layers/concat_layer.o build/src/caffe/layers/sigmoid_cross_entropy_loss_layer.o build/src/caffe/layers/flatten_layer.o build/src/caffe/layers/softmax_layer.o build/src/caffe/layers/bnll_layer.o build/src/caffe/layers/split_layer.o build/src/caffe/net.o build/src/caffe/common.o build/src/caffe/util/upgrade_proto.o build/src/caffe/util/benchmark.o build/src/caffe/util/im2col.o build/src/caffe/util/math_functions.o build/src/caffe/util/io.o build/src/caffe/util/insert_splits.o build/src/caffe/layer_factory.o build/src/caffe/blob.o build/src/caffe/layers/pooling_layer.cuo build/src/caffe/layers/relu_layer.cuo build/src/caffe/layers/concat_layer.cuo build/src/caffe/layers/conv_layer.cuo build/src/caffe/layers/softmax_layer.cuo build/src/caffe/layers/sigmoid_layer.cuo build/src/caffe/layers/softmax_loss_layer.cuo build/src/caffe/layers/hdf5_data_layer.cuo build/src/caffe/layers/window_data_layer.cuo build/src/caffe/layers/data_layer.cuo build/src/caffe/layers/flatten_layer.cuo build/src/caffe/layers/inner_product_layer.cuo build/src/caffe/layers/eltwise_product_layer.cuo build/src/caffe/layers/image_data_layer.cuo build/src/caffe/layers/im2col_layer.cuo build/src/caffe/layers/tanh_layer.cuo build/src/caffe/layers/bnll_layer.cuo build/src/caffe/layers/dropout_layer.cuo build/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cuo build/src/caffe/layers/split_layer.cuo build/src/caffe/layers/power_layer.cuo build/src/caffe/layers/lrn_layer.cuo build/src/caffe/layers/hdf5_output_layer.cuo build/src/caffe/util/math_functions.cuo build/src/caffe/util/im2col.cuo -pthread -fPIC -DNDEBUG -O2 -I/usr/local/include/python2.7 -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -Ibuild/src -I./src -I./include -I/usr/local/cuda/include -L/usr/local/lib -L/usr/local/lib -L/usr/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib -lcudart -lcublas -lcurand -lpthread -lglog -lprotobuf -lleveldb -lsnappy -lboost_system -lhdf5_hl -lhdf5 -lopencv_core -lopencv_highgui -lopencv_imgproc -lcblas -latlas -Wall

build/src/caffe/layers/pooling_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::PoolingLayer<float>' build/src/caffe/layers/pooling_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/pooling_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::PoolingLayer'
build/src/caffe/layers/pooling_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/pooling_layer.cuo:(.rodata+0x1c): multiple definition of typeinfo name for caffe::PoolingLayer<double>' build/src/caffe/layers/pooling_layer.o:(.rodata+0x1c): first defined here build/src/caffe/layers/pooling_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::PoolingLayer'
build/src/caffe/layers/pooling_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/relu_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::ReLULayer<float>' build/src/caffe/layers/relu_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/relu_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::ReLULayer'
build/src/caffe/layers/relu_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/relu_layer.cuo:(.rodata+0x18): multiple definition of typeinfo name for caffe::ReLULayer<double>' build/src/caffe/layers/relu_layer.o:(.rodata+0x18): first defined here build/src/caffe/layers/relu_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::ReLULayer'
build/src/caffe/layers/relu_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/concat_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::ConcatLayer<float>' build/src/caffe/layers/concat_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/concat_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::ConcatLayer'
build/src/caffe/layers/concat_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/concat_layer.cuo:(.rodata+0x1c): multiple definition of typeinfo name for caffe::ConcatLayer<double>' build/src/caffe/layers/concat_layer.o:(.rodata+0x1c): first defined here build/src/caffe/layers/concat_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::ConcatLayer'
build/src/caffe/layers/concat_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/conv_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::ConvolutionLayer<float>' build/src/caffe/layers/conv_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/conv_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::ConvolutionLayer'
build/src/caffe/layers/conv_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/conv_layer.cuo:(.rodata+0x20): multiple definition of typeinfo name for caffe::ConvolutionLayer<double>' build/src/caffe/layers/conv_layer.o:(.rodata+0x20): first defined here build/src/caffe/layers/conv_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::ConvolutionLayer'
build/src/caffe/layers/conv_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/softmax_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::SoftmaxLayer<float>' build/src/caffe/layers/softmax_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/softmax_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::SoftmaxLayer'
build/src/caffe/layers/softmax_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/softmax_layer.cuo:(.rodata+0x1c): multiple definition of typeinfo name for caffe::SoftmaxLayer<double>' build/src/caffe/layers/softmax_layer.o:(.rodata+0x1c): first defined here build/src/caffe/layers/softmax_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::SoftmaxLayer'
build/src/caffe/layers/softmax_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/sigmoid_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::SigmoidLayer<float>' build/src/caffe/layers/sigmoid_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/sigmoid_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::SigmoidLayer'
build/src/caffe/layers/sigmoid_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/sigmoid_layer.cuo:(.rodata+0x1c): multiple definition of typeinfo name for caffe::SigmoidLayer<double>' build/src/caffe/layers/sigmoid_layer.o:(.rodata+0x1c): first defined here build/src/caffe/layers/sigmoid_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::SigmoidLayer'
build/src/caffe/layers/sigmoid_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/softmax_loss_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::SoftmaxWithLossLayer<float>' build/src/caffe/layers/softmax_loss_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/softmax_loss_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::SoftmaxWithLossLayer'
build/src/caffe/layers/softmax_loss_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/softmax_loss_layer.cuo:(.rodata+0x24): multiple definition of typeinfo name for caffe::SoftmaxWithLossLayer<double>' build/src/caffe/layers/softmax_loss_layer.o:(.rodata+0x24): first defined here build/src/caffe/layers/softmax_loss_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::SoftmaxWithLossLayer'
build/src/caffe/layers/softmax_loss_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/hdf5_data_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::HDF5DataLayer<float>' build/src/caffe/layers/hdf5_data_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/hdf5_data_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::HDF5DataLayer'
build/src/caffe/layers/hdf5_data_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/hdf5_data_layer.cuo:(.rodata+0x1c): multiple definition of typeinfo name for caffe::HDF5DataLayer<double>' build/src/caffe/layers/hdf5_data_layer.o:(.rodata+0x1c): first defined here build/src/caffe/layers/hdf5_data_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::HDF5DataLayer'
build/src/caffe/layers/hdf5_data_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/window_data_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::WindowDataLayer<float>' build/src/caffe/layers/window_data_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/window_data_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::WindowDataLayer'
build/src/caffe/layers/window_data_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/window_data_layer.cuo:(.rodata+0x20): multiple definition of typeinfo name for caffe::WindowDataLayer<double>' build/src/caffe/layers/window_data_layer.o:(.rodata+0x20): first defined here build/src/caffe/layers/window_data_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::WindowDataLayer'
build/src/caffe/layers/window_data_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/data_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::DataLayer<float>' build/src/caffe/layers/data_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/data_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::DataLayer'
build/src/caffe/layers/data_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/data_layer.cuo:(.rodata+0x18): multiple definition of typeinfo name for caffe::DataLayer<double>' build/src/caffe/layers/data_layer.o:(.rodata+0x18): first defined here build/src/caffe/layers/data_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::DataLayer'
build/src/caffe/layers/data_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/flatten_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::FlattenLayer<float>' build/src/caffe/layers/flatten_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/flatten_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::FlattenLayer'
build/src/caffe/layers/flatten_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/flatten_layer.cuo:(.rodata+0x1c): multiple definition of typeinfo name for caffe::FlattenLayer<double>' build/src/caffe/layers/flatten_layer.o:(.rodata+0x1c): first defined here build/src/caffe/layers/flatten_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::FlattenLayer'
build/src/caffe/layers/flatten_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/inner_product_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::InnerProductLayer<float>' build/src/caffe/layers/inner_product_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/inner_product_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::InnerProductLayer'
build/src/caffe/layers/inner_product_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/inner_product_layer.cuo:(.rodata+0x20): multiple definition of typeinfo name for caffe::InnerProductLayer<double>' build/src/caffe/layers/inner_product_layer.o:(.rodata+0x20): first defined here build/src/caffe/layers/inner_product_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::InnerProductLayer'
build/src/caffe/layers/inner_product_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/eltwise_product_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::EltwiseProductLayer<float>' build/src/caffe/layers/eltwise_product_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/eltwise_product_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::EltwiseProductLayer'
build/src/caffe/layers/eltwise_product_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/eltwise_product_layer.cuo:(.rodata+0x24): multiple definition of typeinfo name for caffe::EltwiseProductLayer<double>' build/src/caffe/layers/eltwise_product_layer.o:(.rodata+0x24): first defined here build/src/caffe/layers/eltwise_product_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::EltwiseProductLayer'
build/src/caffe/layers/eltwise_product_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/image_data_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::ImageDataLayer<float>' build/src/caffe/layers/image_data_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/image_data_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::ImageDataLayer'
build/src/caffe/layers/image_data_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/image_data_layer.cuo:(.rodata+0x1c): multiple definition of typeinfo name for caffe::ImageDataLayer<double>' build/src/caffe/layers/image_data_layer.o:(.rodata+0x1c): first defined here build/src/caffe/layers/image_data_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::ImageDataLayer'
build/src/caffe/layers/image_data_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/im2col_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::Im2colLayer<float>' build/src/caffe/layers/im2col_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/im2col_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::Im2colLayer'
build/src/caffe/layers/im2col_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/im2col_layer.cuo:(.rodata+0x1c): multiple definition of typeinfo name for caffe::Im2colLayer<double>' build/src/caffe/layers/im2col_layer.o:(.rodata+0x1c): first defined here build/src/caffe/layers/im2col_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::Im2colLayer'
build/src/caffe/layers/im2col_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/tanh_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::TanHLayer<float>' build/src/caffe/layers/tanh_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/tanh_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::TanHLayer'
build/src/caffe/layers/tanh_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/tanh_layer.cuo:(.rodata+0x18): multiple definition of typeinfo name for caffe::TanHLayer<double>' build/src/caffe/layers/tanh_layer.o:(.rodata+0x18): first defined here build/src/caffe/layers/tanh_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::TanHLayer'
build/src/caffe/layers/tanh_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/bnll_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::BNLLLayer<float>' build/src/caffe/layers/bnll_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/bnll_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::BNLLLayer'
build/src/caffe/layers/bnll_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/bnll_layer.cuo:(.rodata+0x18): multiple definition of typeinfo name for caffe::BNLLLayer<double>' build/src/caffe/layers/bnll_layer.o:(.rodata+0x18): first defined here build/src/caffe/layers/bnll_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::BNLLLayer'
build/src/caffe/layers/bnll_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/dropout_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::DropoutLayer<float>' build/src/caffe/layers/dropout_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/dropout_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::DropoutLayer'
build/src/caffe/layers/dropout_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/dropout_layer.cuo:(.rodata+0x1c): multiple definition of typeinfo name for caffe::DropoutLayer<double>' build/src/caffe/layers/dropout_layer.o:(.rodata+0x1c): first defined here build/src/caffe/layers/dropout_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::DropoutLayer'
build/src/caffe/layers/dropout_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::SigmoidCrossEntropyLossLayer<float>' build/src/caffe/layers/sigmoid_cross_entropy_loss_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::SigmoidCrossEntropyLossLayer'
build/src/caffe/layers/sigmoid_cross_entropy_loss_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cuo:(.rodata+0x2c): multiple definition of typeinfo name for caffe::SigmoidCrossEntropyLossLayer<double>' build/src/caffe/layers/sigmoid_cross_entropy_loss_layer.o:(.rodata+0x2c): first defined here build/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::SigmoidCrossEntropyLossLayer'
build/src/caffe/layers/sigmoid_cross_entropy_loss_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/split_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::SplitLayer<float>' build/src/caffe/layers/split_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/split_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::SplitLayer'
build/src/caffe/layers/split_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/split_layer.cuo:(.rodata+0x18): multiple definition of typeinfo name for caffe::SplitLayer<double>' build/src/caffe/layers/split_layer.o:(.rodata+0x18): first defined here build/src/caffe/layers/split_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::SplitLayer'
build/src/caffe/layers/split_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/power_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::PowerLayer<float>' build/src/caffe/layers/power_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/power_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::PowerLayer'
build/src/caffe/layers/power_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/power_layer.cuo:(.rodata+0x18): multiple definition of typeinfo name for caffe::PowerLayer<double>' build/src/caffe/layers/power_layer.o:(.rodata+0x18): first defined here build/src/caffe/layers/power_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::PowerLayer'
build/src/caffe/layers/power_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/lrn_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::LRNLayer<float>' build/src/caffe/layers/lrn_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/lrn_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::LRNLayer'
build/src/caffe/layers/lrn_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/lrn_layer.cuo:(.rodata+0x18): multiple definition of typeinfo name for caffe::LRNLayer<double>' build/src/caffe/layers/lrn_layer.o:(.rodata+0x18): first defined here build/src/caffe/layers/lrn_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::LRNLayer'
build/src/caffe/layers/lrn_layer.o:(.data.rel.ro+0xc): first defined here
build/src/caffe/layers/hdf5_output_layer.cuo:(.rodata+0x0): multiple definition of typeinfo name for caffe::HDF5OutputLayer<float>' build/src/caffe/layers/hdf5_output_layer.o:(.rodata+0x0): first defined here build/src/caffe/layers/hdf5_output_layer.cuo:(.data.rel.ro+0x0): multiple definition oftypeinfo for caffe::HDF5OutputLayer'
build/src/caffe/layers/hdf5_output_layer.o:(.data.rel.ro+0x0): first defined here
build/src/caffe/layers/hdf5_output_layer.cuo:(.rodata+0x20): multiple definition of typeinfo name for caffe::HDF5OutputLayer<double>' build/src/caffe/layers/hdf5_output_layer.o:(.rodata+0x20): first defined here build/src/caffe/layers/hdf5_output_layer.cuo:(.data.rel.ro+0xc): multiple definition oftypeinfo for caffe::HDF5OutputLayer'
build/src/caffe/layers/hdf5_output_layer.o:(.data.rel.ro+0xc): first defined here
collect2: ld returned 1 exit status
make: *** [build/lib/libcaffe.so] Error 1

@carlodelmundo-zz
Copy link

I'm also having this problem. I have the exact same hardware configuration (NVIDIA Tegra K1) on Ubuntu 14.04 with CUDA 6.0. Note: OP and I are running on the ARM platform (though, I don't necessarily understand why that would matter.)

wangxingxing, I'm thinking it could be a mismatch between g++/CUDA. I'm going to try changing to another version of g++ (lower than 4.6) to see

Here's my current configuration:

  1. g++ 4.6.4
  2. nvcc release 6.0, V6.0.1

@carlodelmundo-zz
Copy link

  1. I tried with g++-4.3 and it didn't work. Still having 'multiple definition' link errors with the templated functions.
  2. I tried using the cmake branch and tried building. It gives the same errors.

@carlodelmundo-zz
Copy link

There is an issue with g++ (4.4, 4.6, 4.8) for explicit template specializations on the ARMv7l architecture.

I looked at the *.cpp, *.hpp that was giving us linking errors and I've hacked up some dummy code that demonstrates the issue. You can download the example files here: homes.cs.washington.edu/~cdel/templates.tgz

If compiling the example on x86_64 machines (with either g++ or clang), a *.so library will be created and EVERYTHING IS OK.

If compiling the example on ARMv7l machines like the NVIDIA Tegra K1 (with g++), the multiple definitions error persists.

If compiling the example on ARMv7l machines (with clang), the *.so builds and EVERYTHING IS OK.

My suggestion would be to find a way to circumvent the broken g++ toolchain on ARMv7l and use clang. I haven't tried this yet, but I'm probably going to in the next few days to see if it works (Though, I suspect clang/CUDA will not compile OR using clang instead of g++ with Caffe is non-trivial.)

TL;DR - g++ is broken for ARMv7l because of a bug in template specialization in multiple files (see tarball example).

@wangxingxing
Copy link
Author

caffe is runing now,but i don't know what reason of this link error.
1 install clang, sudo apt-get install clang
2 replace g++ in Makefile to clang++
3 make, you can see cpu part of caffe can compile success,but when compile cuda part will have error
3 replace clang++ in Makefile to g++-4.6(only g++-4.6 can compile success at pc)
4 make, it compile all success and you can run net_speed_benchmark.bin under build/tools
net_speed_benchmark
./build/tools/net_speed_benchmark.bin ./examples/imagenet/imagenet_deploy.prototxt 1 GPU 0
Ths caffe can run 30 frame per seconds.

I don't think i had solved it,who can figure out why had this link error?

@wangxingxing
Copy link
Author

I just found carlodelmundo had figure out reason of this link error,thank you solved my doubts.

@carlodelmundo-zz
Copy link

Aw man! I was just gonna post that compiling with clang++ works. Thanks for sharing your solution. It seems that I also found another way to install Caffe on the Tegra K1.

  1. Change branch to CMake: https://github.com/BVLC/caffe/tree/cmake (Note: this is an older branch with CMake extensions.)
  2. Install CMake (using sudo apt-get install cmake)
  3. cmake -DCMAKE_CXX_COMPILER=clang++
  4. make -j4

Then, I did:
./build/tools/net_speed_benchmark.bin ./examples/imagenet/imagenet_deploy.prototxt 1 GPU 0

... and everything ran fine. BTW, how did you find out that Caffe runs at 30 FPS?

@wangxingxing
Copy link
Author

30 FPS is speed of extract feature for model define in imagenet_deploy.prototxt, it mean you only consider forward time, you can see net_speed_benchmark show run forward 1 time need 333 milli seconds at one batch, and batch size is 10 it define on imagenet_deploy.prototxt, it mean you can extract 30 images CNN feature per seconds at tk1, caffe can run 500 FPS at gtx770 for same model.of course the fps is depend on model.
BTW, how can you download https://github.com/BVLC/caffe/tree/cmake i had try use git clone but git report not found

@OpenHero
Copy link

@wangxingxing checkout to cmake branch, and then pull from the remote to the recently version.

@wangxingxing
Copy link
Author

@carlodelmundo
Some error when i test you solution
tk1: ubuntu 14.04
cmake 2.8.12.2
clang 3.4-1ubuntu3
where am doing wrong?

[ 0%] Built target gtest
[ 1%] Built target gtest_main
[ 3%] Built target proto
[ 3%] Building NVCC (Device) object src/caffe/CMakeFiles/caffe_cu.dir/util/./caffe_cu_generated_im2col.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/caffe_cu.dir/layers/./caffe_cu_generated_eltwise_layer.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/caffe_cu.dir/layers/./caffe_cu_generated_pooling_layer.cu.o
[ 4%] Building NVCC (Device) object src/caffe/CMakeFiles/caffe_cu.dir/layers/./caffe_cu_generated_relu_layer.cu.o
[ 5%] Building NVCC (Device) object src/caffe/CMakeFiles/caffe_cu.dir/layers/./caffe_cu_generated_concat_layer.cu.o
[ 5%] Building NVCC (Device) object src/caffe/CMakeFiles/caffe_cu.dir/layers/./caffe_cu_generated_conv_layer.cu.o
[ 6%] Building NVCC (Device) object src/caffe/CMakeFiles/caffe_cu.dir/layers/./caffe_cu_generated_softmax_layer.cu.o
/home/ubuntu/caffe-cmake/src/caffe/layers/softmax_layer.cu(59): error: kernel launches from templates are not allowed in system files

/home/ubuntu/caffe-cmake/src/caffe/layers/softmax_layer.cu(66): error: kernel launches from templates are not allowed in system files

/home/ubuntu/caffe-cmake/src/caffe/layers/softmax_layer.cu(73): error: kernel launches from templates are not allowed in system files

3 errors detected in the compilation of "/tmp/tmpxft_000014f7_00000000-10_softmax_layer.cpp4.ii".
CMake Error at caffe_cu_generated_softmax_layer.cu.o.cmake:264 (message):
Error generating file
/home/ubuntu/caffe-cmake/src/caffe/CMakeFiles/caffe_cu.dir/layers/./caffe_cu_generated_softmax_layer.cu.o

make[2]: *** [src/caffe/CMakeFiles/caffe_cu.dir/layers/./caffe_cu_generated_softmax_layer.cu.o] Error 1
make[1]: *** [src/caffe/CMakeFiles/caffe_cu.dir/all] Error 2
make: *** [all] Error 2

@carlodelmundo-zz
Copy link

No idea man, sorry. Mine compiles just fine with the directions I've provided. Have you figured it out?

@shelhamer
Copy link
Member

Thanks all for detailing what you tried and what worked. Since you have found clang++ to work for the ARM platform it's most likely easiest to set CUSTOM_CXX := clang++ in your Makefile.config.

For future installation discussions, please post to the caffe-users mailing list. As of the latest release we prefer to keep issues reserved for Caffe development. Thanks!

@huangshiyou
Copy link

Ah it works with the method provided by @wangxingxing & @carlodelmundo . Thanks

@ildoonet
Copy link

I got working with g++ 4.7 version on tk1 board

sed -i "s/# CUSTOM_CXX := g++/CUSTOM_CXX := g++-4.7/" Makefile.config

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

6 participants