facebookarchive / caffe2

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

Error while building android version on Mac #538

Closed jimmylilyy closed 7 years ago

jimmylilyy commented 7 years ago

I could build iOS version successfully, but error occurs while building android version:

/caffe2/caffe2/core/blob_serialization.h:251:28: error: there are no arguments to 'processChunk' that depend on a template parameter, so a declaration of 'processChunk' must be available [-fpermissive] processChunk(chunkBegin);

Checking the code that it seems processChunk is defined under #ifndef ANDROID macro, but used beyond this scope;

ThomasGueldner commented 7 years ago

I am having the same problem, but I am building under Ubuntu 16.04. Couldn't solve this problem yet :(.

ThomasGueldner commented 7 years ago

There is a PR #543 out there which seems to be able to cope with your and my issue. I just modified the file blob_serialization.h the same way as suggested in the PR and then I was able to successfully build for android (using Ubuntu). Unfortunately, I cannot confirm whether it would also work on MAC, because I don't have a MAC here.

jimmylilyy commented 7 years ago

Tks! The PR #543 fixed my issue too. So close the issue!