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

BUG for Android - caffe2/caffe2/core/Blob_serialization.h #556

Open lsn2000 opened 7 years ago

lsn2000 commented 7 years ago

at line 251 called function processChunk(chunkBegin); like this:

ifndef ANDROID

....

else

processChunk(chunkBegin);

endif

BUT HOWEVER, function processChunk() was decared like this:

ifndef ANDROID

std::vector<std::future> futures; auto processChunk = [&](int64_t chunkStart) { ....

endif

the logic was contradicting each other , when building for Android, the function was called without defition.

POSSIBLE FIX: after I moved the defition part out of the #ifdef clause, the project build successfully.

ThomasGueldner commented 7 years ago

I recently had the same problem that I couldn't compile the android project under Ubuntu 16.04. This Pull Request #543 here deals with this problem. After modifying the code as suggested in the PR, I could build the project successfully.