andrewssobral / bgslibrary

A C++ Background Subtraction Library with wrappers for Python, MATLAB, Java and GUI on QT
MIT License
2.2k stars 741 forks source link

Build fails at macOS High Sierra 10.13.6 / AppleClang 10.0.0 / opencv 3.4.1 #149

Open bombs-kim opened 5 years ago

bombs-kim commented 5 years ago

I failed to build this repository. Could anybody help me with this? Here is the CMake log

-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/gcc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/g++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 
-- BGSLIBRARY WITH PYTHON SUPPORT: OFF
-- Found OpenCV: /anaconda3 (found version "3.4.1") 
-- 
-- OpenCV library status:
--     version: 3.4.1
--     libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_shape;opencv_stitching;opencv_superres;opencv_video;opencv_videoio;opencv_videostab;opencv_aruco;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_datasets;opencv_dnn_modern;opencv_dnn_objdetect;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_hdf;opencv_hfs;opencv_img_hash;opencv_line_descriptor;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_reg;opencv_rgbd;opencv_saliency;opencv_stereo;opencv_structured_light;opencv_surface_matching;opencv_text;opencv_tracking;opencv_xfeatures2d;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto
--     include path: /anaconda3/include;/anaconda3/include/opencv

-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- You might need to run:
-- $ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
-- $ export LD_LIBRARY_PATH
-- after 'make install' to avoid error while loading libbgslibrary_core

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/derek/projects/bgslibrary/build

And here is a part of error messages generated by make command


In file included from /Users/derek/projects/bgslibrary/package_bgs/CodeBook.cpp:17:
In file included from /Users/derek/projects/bgslibrary/package_bgs/CodeBook.h:19:
In file included from /anaconda3/include/opencv2/opencv.hpp:52:
In file included from /anaconda3/include/opencv2/core.hpp:3260:
In file included from /anaconda3/include/opencv2/core/cvstd.inl.hpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/complex:247:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/sstream:174:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2272:31: error: member access into incomplete
      type 'tm'
        __get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
                              ^
/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/derek/projects/bgslibrary/package_bgs/CodeBook.cpp:17:
In file included from /Users/derek/projects/bgslibrary/package_bgs/CodeBook.h:19:
In file included from /anaconda3/include/opencv2/opencv.hpp:52:
In file included from /anaconda3/include/opencv2/core.hpp:3260:
In file included from /anaconda3/include/opencv2/core/cvstd.inl.hpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/complex:247:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/sstream:174:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2277:29: error: member access into incomplete
      type 'tm'
        __get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
                            ^
/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from /Users/derek/projects/bgslibrary/package_bgs/IMBS/IMBS.cpp:38:
In file included from /Users/derek/projects/bgslibrary/package_bgs/IMBS/IMBS.hpp:40:
In file included from /anaconda3/include/opencv2/core/core.hpp:48:
In file included from /anaconda3/include/opencv2/core.hpp:3260:
In file included from /anaconda3/include/opencv2/core/cvstd.inl.hpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/complex:247:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/sstream:174:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2231:27: error: member access into incomplete
      type 'tm'
    __get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
                          ^
/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/derek/projects/bgslibrary/package_bgs/IMBS/IMBS.cpp:38:
In file included from /Users/derek/projects/bgslibrary/package_bgs/IMBS/IMBS.hpp:40:
In file included from /anaconda3/include/opencv2/core/core.hpp:48:
In file included from /anaconda3/include/opencv2/core.hpp:3260:
In file included from /anaconda3/include/opencv2/core/cvstd.inl.hpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/complex:247:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/sstream:174:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2243:25: error: member access into incomplete
      type 'tm'
    __get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
                        ^
/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/derek/projects/bgslibrary/package_bgs/IMBS/IMBS.cpp:38:
In file included from /Users/derek/projects/bgslibrary/package_bgs/IMBS/IMBS.hpp:40:
In file included from /anaconda3/include/opencv2/core/core.hpp:48:
In file included from /anaconda3/include/opencv2/core.hpp:3260:
In file included from /anaconda3/include/opencv2/core/cvstd.inl.hpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/complex:247:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/sstream:174:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2255:20: error: member access into incomplete
      type 'tm'
    __get_year(__tm->tm_year, __b, __e, __err, __ct);
                   ^
/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/derek/projects/bgslibrary/package_bgs/IMBS/IMBS.cpp:38:
In file included from /Users/derek/projects/bgslibrary/package_bgs/IMBS/IMBS.hpp:40:
In file included from /anaconda3/include/opencv2/core/core.hpp:48:
In file included from /anaconda3/include/opencv2/core.hpp:3260:
In file included from /anaconda3/include/opencv2/core/cvstd.inl.hpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/complex:247:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/sstream:174:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2272:31: error: member access into incomplete
      type 'tm'
        __get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
                              ^
/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
In file included from /Users/derek/projects/bgslibrary/package_bgs/IMBS/IMBS.cpp:38:
In file included from /Users/derek/projects/bgslibrary/package_bgs/IMBS/IMBS.hpp:40:
In file included from /anaconda3/include/opencv2/core/core.hpp:48:
In file included from /anaconda3/include/opencv2/core.hpp:3260:
In file included from /anaconda3/include/opencv2/core/cvstd.inl.hpp:47:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/complex:247:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/sstream:174:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ostream:140:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/locale:2277:29: error: member access into incomplete
      type 'tm'
        __get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
                            ^
/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
            const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/IMBS/IMBS.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
20 errors generated.
20 errors generated.
20 errors generated.
20 errors generated.
20 errors generated.
20 errors generated.
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/DPTexture.cpp.o] Error 1
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/FrameDifference.cpp.o] Error 1
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/DPAdaptiveMedian.cpp.o] Error 1
20 errors generated.
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/FuzzySugenoIntegral.cpp.o] Error 1
20 errors generated.
20 errors generated.
20 errors generated.
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/DPPratiMediod.cpp.o] Error 1
20 errors generated.
20 errors generated.
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/DPWrenGA.cpp.o] Error 1
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/DPZivkovicAGMM.cpp.o] Error 1
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/DPGrimsonGMM.cpp.o] Error 1
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/AdaptiveSelectiveBackgroundLearning.cpp.o] Error 1
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/DPEigenbackground.cpp.o] Error 1
20 errors generated.
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/FuzzyChoquetIntegral.cpp.o] Error 1
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/AdaptiveBackgroundLearning.cpp.o] Error 1
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/DPMean.cpp.o] Error 1
20 errors generated.
make[2]: *** [CMakeFiles/bgslibrary_core.dir/package_bgs/IndependentMultimodal.cpp.o] Error 1
andrewssobral commented 5 years ago

@bombs-kim Thanks for reporting this issue, can you please try the latest version of the master branch? best regards.