cxxnet icon indicating copy to clipboard operation
cxxnet copied to clipboard

Incompatible library version libiconv

Open jayendra13 opened this issue 10 years ago • 1 comments

while trying build cxxnet on mac(OS X 10.10), I am getting the following error

g++ -DMSHADOW_FORCE_STREAM -Wall -g -O3 -I./mshadow/  -fPIC -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_DIST_PS=0 -DCXXNET_USE_OPENCV=1 -DCXXNET_USE_OPENCV_DECODER=1 -I /usr/local/cuda/include  -o bin/cxxnet src/local_main.cpp layer_cpu.o updater_cpu.o nnet_cpu.o data.o main.o nnet_ps_server.o layer_gpu.o updater_gpu.o nnet_gpu.o -pthread -L /usr/local/cuda/lib -lm -lcudart -lcublas -lcurand -lblas `pkg-config --libs opencv` -ljpeg
dyld: Library not loaded: /opt/local/lib/libiconv.2.dylib
  Referenced from: /opt/local/bin/pkg-config
  Reason: Incompatible library version: pkg-config requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0
Undefined symbols for architecture x86_64:
  "cv::warpAffine(cv::_InputArray const&, cv::_OutputArray const&, cv::_InputArray const&, cv::Size_<int>, int, int, cv::Scalar_<double> const&)", referenced from:
      cxxnet::ImageAugmenter::Process(cv::Mat const&, cxxnet::utils::RandomSampler*) in data.o
  "cv::_InputArray::_InputArray(cv::Mat const&)", referenced from:
      cxxnet::ImageAugmenter::Process(cv::Mat const&, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::ImageAugmenter::Process(unsigned char*, unsigned long, mshadow::TensorContainer<mshadow::cpu, 3, float>*, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::utils::OpenCVDecoder::Decode(unsigned char*, unsigned long, mshadow::TensorContainer<mshadow::cpu, 3, unsigned char>*) in data.o
  "cv::_OutputArray::_OutputArray(cv::Mat&)", referenced from:
      cxxnet::ImageAugmenter::Process(cv::Mat const&, cxxnet::utils::RandomSampler*) in data.o
  "cv::Mat::deallocate()", referenced from:
      cxxnet::ImageIterator::LoadImage(mshadow::TensorContainer<mshadow::cpu, 3, float>&, cxxnet::DataInst&, char const*) in data.o
      cxxnet::ImageAugmenter::ImageAugmenter() in data.o
      cxxnet::ImageAugmenter::Process(cv::Mat const&, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::ImageAugmenter::Process(mshadow::Tensor<mshadow::cpu, 3, float>, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::ImageAugmenter::Process(unsigned char*, unsigned long, mshadow::TensorContainer<mshadow::cpu, 3, float>*, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::ImageAugmenter::~ImageAugmenter() in data.o
      cxxnet::utils::OpenCVDecoder::Decode(unsigned char*, unsigned long, mshadow::TensorContainer<mshadow::cpu, 3, unsigned char>*) in data.o
      ...
  "cv::Mat::create(int, int const*, int)", referenced from:
      cxxnet::ImageAugmenter::ImageAugmenter() in data.o
      cxxnet::ImageAugmenter::Process(cv::Mat const&, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::ImageAugmenter::Process(mshadow::Tensor<mshadow::cpu, 3, float>, cxxnet::utils::RandomSampler*) in data.o
  "cv::Mat::copySize(cv::Mat const&)", referenced from:
      cxxnet::ImageAugmenter::Process(cv::Mat const&, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::ImageAugmenter::Process(mshadow::Tensor<mshadow::cpu, 3, float>, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::ImageAugmenter::Process(unsigned char*, unsigned long, mshadow::TensorContainer<mshadow::cpu, 3, float>*, cxxnet::utils::RandomSampler*) in data.o
  "cv::Mat::Mat(cv::Mat const&, cv::Rect_<int> const&)", referenced from:
      cxxnet::ImageAugmenter::Process(cv::Mat const&, cxxnet::utils::RandomSampler*) in data.o
  "cv::imread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int)", referenced from:
      cxxnet::ImageIterator::LoadImage(mshadow::TensorContainer<mshadow::cpu, 3, float>&, cxxnet::DataInst&, char const*) in data.o
  "cv::fastFree(void*)", referenced from:
      cxxnet::ImageIterator::LoadImage(mshadow::TensorContainer<mshadow::cpu, 3, float>&, cxxnet::DataInst&, char const*) in data.o
      cxxnet::ImageAugmenter::ImageAugmenter() in data.o
      cxxnet::ImageAugmenter::Process(cv::Mat const&, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::ImageAugmenter::Process(mshadow::Tensor<mshadow::cpu, 3, float>, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::ImageAugmenter::Process(unsigned char*, unsigned long, mshadow::TensorContainer<mshadow::cpu, 3, float>*, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::ImageAugmenter::~ImageAugmenter() in data.o
      cxxnet::utils::OpenCVDecoder::Decode(unsigned char*, unsigned long, mshadow::TensorContainer<mshadow::cpu, 3, unsigned char>*) in data.o
      ...
  "cv::imdecode(cv::_InputArray const&, int)", referenced from:
      cxxnet::ImageAugmenter::Process(unsigned char*, unsigned long, mshadow::TensorContainer<mshadow::cpu, 3, float>*, cxxnet::utils::RandomSampler*) in data.o
      cxxnet::utils::OpenCVDecoder::Decode(unsigned char*, unsigned long, mshadow::TensorContainer<mshadow::cpu, 3, unsigned char>*) in data.o
      cxxnet::ThreadImagePageIterator::LoadImage(mshadow::TensorContainer<mshadow::cpu, 3, float>&, cxxnet::DataInst&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >&) in data.o
  "vtable for cv::_InputArray", referenced from:
      cxxnet::ThreadImagePageIterator::LoadImage(mshadow::TensorContainer<mshadow::cpu, 3, float>&, cxxnet::DataInst&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >&) in data.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bin/cxxnet] Error 1

Any guess?

jayendra13 avatar Apr 04 '15 10:04 jayendra13

Please check your OpenCV configuration.

antinucleon avatar Apr 05 '15 20:04 antinucleon