volvet / AlphaMatting

Implementation of Shared Sampling for Real-time Alpha Matting - http://inf.ufrgs.br/~eslgastal/SharedMatting/
76 stars 30 forks source link

opencv3.4.1 with error:use of undeclared identifier 'ArenaImpl' #1

Open seutwom opened 6 years ago

seutwom commented 6 years ago

i use opencv3.4.1,when i use the command cmake -G"Unix Makefiles",i meet the error. ........ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/time.h:108:9: note: 'clock' declared here clock_t clock(void) DARWIN_ALIAS(clock); ^ /Users/SEU-Li/Downloads/opencv-3.4.1/3rdparty/protobuf/src/google/protobuf/arena.cc:138:1: error: use of undeclared identifier 'ArenaImpl' ArenaImpl::CleanupChunk ArenaImpl::ExpandCleanupList(CleanupChunk cleanup, ^ /Users/SEU-Li/Downloads/opencv-3.4.1/3rdparty/protobuf/src/google/protobuf/arena.cc:138:26: error: use of undeclared identifier 'ArenaImpl' ArenaImpl::CleanupChunk ArenaImpl::ExpandCleanupList(CleanupChunk cleanup, ^ /Users/SEU-Li/Downloads/opencv-3.4.1/3rdparty/protobuf/src/google/protobuf/arena.cc:139:55: error: use of undeclared identifier 'Block'; did you mean 'clock'? Block* b) { ^~~~~ clock /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/time.h:108:9: note: 'clock' declared here clock_t clock(void) DARWIN_ALIAS(clock); ^ /Users/SEU-Li/Downloads/opencv-3.4.1/3rdparty/protobuf/src/google/protobuf/arena.cc:155:8: error: unknown type name 'GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE' inline GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE ^ /Users/SEU-Li/Downloads/opencv-3.4.1/3rdparty/protobuf/src/google/protobuf/arena.cc:156:1: error: expected unqualified-id void ArenaImpl::AddCleanupInBlock( ^ [ 3%] Linking C static library ../lib/libittnotify.a /Users/SEU-Li/Downloads/opencv-3.4.1/3rdparty/protobuf/src/google/protobuf/arena.cc:169:6: error: use of undeclared identifier 'ArenaImpl' void ArenaImpl::AddCleanup(void elem, void (cleanup)(void)) { ^ /Users/SEU-Li/Downloads/opencv-3.4.1/3rdparty/protobuf/src/google/protobuf/arena.cc:173:7: error: use of undeclared identifier 'ArenaImpl' void ArenaImpl::AllocateAligned(size_t n) { ^ /Users/SEU-Li/Downloads/opencv-3.4.1/3rdparty/protobuf/src/google/protobuf/arena.cc:179:7: error: use of undeclared identifier 'ArenaImpl' void* ArenaImpl::AllocateAlignedAndAddCleanup(size_t n, ^ [ 3%] Building C object 3rdparty/ippiw/CMakeFiles/ippiw.dir/src/iw_image_filter_bilateral.c.o fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/arena.cc.o] Error 1 make[1]: [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 3%] Building C object 3rdparty/zlib/CMakeFiles/zlib.dir/gzclose.c.o [ 3%] Built target ittnotify [ 3%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/jcdctmgr.c.o [ 3%] Building C object 3rdparty/libwebp/CMakeFiles/libwebp.dir/src/dec/io_dec.c.o ......

volvet commented 6 years ago

I have no idea what happened then, and I get success to build OpenCV. You'd better raise the issue to OpenCV forum.