Compile caffe while another caffe exists already

1. Problem

[dashuage caffe-fast-rcnn]$ make
CXX/LD -o .build_release/examples/cifar10/convert_cifar_data.bin
/usr/bin/ld: warning: libhdf5_hl.so.100, needed by /usr/lib/libcaffe.so, may conflict with libhdf5_hl.so.10
/usr/bin/ld: warning: libhdf5.so.100, needed by /usr/lib/libcaffe.so, may conflict with libhdf5.so.10
/usr/bin/ld: .build_release/examples/cifar10/convert_cifar_data.o: undefined reference to symbol '_ZdlPvm'
/usr/lib/libtcmalloc.so.4: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:613: .build_release/examples/cifar10/convert_cifar_data.bin] Error 1

2. Analysis

When make, it does three things:
- make lib
- make tools
- make examples
This error occured when make the latter two objects.

Since there is another caffe installed already, we don’t really need to rebuild tools and examples. Use ln to link.

3. Solution

  1. Edit Makefile

    #all: lib examples tools
    all: lib
  2. make all
  3. set link
#!/bin/bash
cd build/tools/
ln -s /usr/bin/caffe caffe
ln -s /usr/bin/compute_image_mean compute_image_mean
ln -s /usr/bin/convert_imageset convert_imageset
ln -s /usr/bin/device_query device_query
ln -s /usr/bin/extract_features extract_features
ln -s /usr/bin/finetune_net finetune_net
ln -s /usr/bin/net_speed_benchmark net_speed_benchmark
ln -s /usr/bin/test_net test_net
ln -s /usr/bin/train_net train_net
ln -s /usr/bin/upgrade_net_proto_binary upgrade_net_proto_binary
ln -s /usr/bin/upgrade_net_proto_text upgrade_net_proto_text
ln -s /usr/bin/upgrade_solver_proto_text upgrade_solver_proto_text
cd ../examples
ln -s /usr/bin/convert_cifar_data ./cifar10/convert_cifar_data.bin
ln -s /usr/bin/classification ./cpp_classification/classification.bin
ln -s /usr/bin/convert_mnist_data ./mnist/convert_mnist_data.bin
ln -s /usr/bin/convert_mnist_siamese_data ./siamese/convert_mnist_siamese_data.bin
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值