facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.94k forks source link

build_ios.sh script failing #194

Closed nicodjimenez closed 7 years ago

nicodjimenez commented 7 years ago

I successfully installed caffe2 on my unbuntu machine and on my macbook! However ./scripts/build_ios.sh is not working for me. I get the following error:

In file included from /Users/nicojimenez/git/caffe2/caffe2/image/image_input_op.cc:1:
/Users/nicojimenez/git/caffe2/caffe2/image/image_input_op.h:470:21: error: no member named 'runTask'
      in 'caffe2::ThreadPool'
      thread_pool_->runTask(std::bind(
      ~~~~~~~~~~~~  ^
/Users/nicojimenez/git/caffe2/caffe2/image/image_input_op.h:482:21: error: no member named 'runTask'
      in 'caffe2::ThreadPool'
      thread_pool_->runTask(std::bind(
      ~~~~~~~~~~~~  ^
/Users/nicojimenez/git/caffe2/caffe2/image/image_input_op.h:493:17: error: no member named
      'waitWorkComplete' in 'caffe2::ThreadPool'
  thread_pool_->waitWorkComplete();
  ~~~~~~~~~~~~  ^
3 errors generated.

What's happening is that the ThreadPool class from ThreadPool.h is being used instead of the intended ThreadPool class from utils/thread_pool.h. I was able to resolve the build error by changing variable names to remove the duplication (renamed ThreadPool to TaskThreadPool in utils/thread_pool.h). Happy to make a PR if this is an acceptable solution.

Yangqing commented 7 years ago

Thanks @nicodjimenez - please send a PR at your convenience.

Yangqing commented 7 years ago

PR merged - thanks for the fix!