wanglimin / dense_flow

OpenCV Implementation of different optical flow algorithms
231 stars 202 forks source link

make -j error #15

Closed buaa-luzhi closed 7 years ago

buaa-luzhi commented 7 years ago

Hi, yjxiong After make -j , something was wrong. dense_flow.h:9:27: fatal error: easylogging++.h: No such file or directory compilation terminated. make[2]: [CMakeFiles/denseflow.dir/src/dense_flow.cpp.o] Error 1 make[1]: [CMakeFiles/denseflow.dir/all] Error 2

The version of Opencv is 3.2.0 or 3.0.0. A lot of methods have been tried!

Can you give me some ideas!

Thank you very much!

wanglimin commented 7 years ago

I test this code with OpenCV 2.4.12.

shuangshuangguo commented 7 years ago

@wanglimin @yjxiong so does it adapt to OpenCV 3.2.0??

wanglimin commented 7 years ago

We did not test on OpenCV 3.2.0.

yjxiong commented 7 years ago

@gss-ucas If you do need OpenCV 3.x, you can refer to https://github.com/yjxiong/dense_flow/tree/opencv-3.1 However, we did not test it.

shuangshuangguo commented 7 years ago

@yjxiong yes, I have compiled it successfully on OpenCV 3.2.0. Thanks for your work!

zhipeng-fan commented 7 years ago

@gss-ucas @yjxiong @wanglimin How did you solve it? I am using OpenCV 3.3.0 and came across the same issue using the 3.x branch of the dense-flow

zhipeng-fan commented 7 years ago

Got it work, we need to download all the dependencies.

duygusar commented 6 years ago

@zhipeng-fan what other dependencies are needed besides libzip-dev? I have 3.3.0 and I tried to compile but got pages and pages of errors. Thanks.

zhipeng-fan commented 6 years ago

@duygusar Hi, I am not sure since it was a long time ago. Just a wild guess, did you also install the easylogging?

shuangshuangguo commented 6 years ago

@zhipeng-fan for OpenCV 3.x, you can follow this, https://github.com/gss-ucas/dense_flow

duygusar commented 6 years ago

@gss-ucas and @zhipeng-fan Thank you both, Using @zhipeng-fan 's git and installing easylogging, I was able to get to a point where at least the errors make more sense. I also figured out I needed the opencv contrib modules. However I still have a problem while "make" (no problem with cmake part):

[ 57%] Linking CXX executable extract_cpu CMakeFiles/extract_cpu.dir/tools/extract_flow.cpp.o: In function __static_initialization_and_destruction_0(int, int)': extract_flow.cpp:(.text+0xbaa): undefined reference toel::base::Storage::Storage(std::shared_ptr const&)' CMakeFiles/extract_cpu.dir/tools/extract_flow.cpp.o: In function el::LogBuilder::LogBuilder()': extract_flow.cpp:(.text._ZN2el10LogBuilderC2Ev[_ZN2el10LogBuilderC5Ev]+0x2b): undefined reference toel::base::utils::OS::termSupportsColor()' CMakeFiles/extract_cpu.dir/tools/extract_flow.cpp.o: In function el::base::DefaultLogBuilder::DefaultLogBuilder()': extract_flow.cpp:(.text._ZN2el4base17DefaultLogBuilderC2Ev[_ZN2el4base17DefaultLogBuilderC5Ev]+0x1b): undefined reference tovtable for el::base::DefaultLogBuilder' libdenseflow.a(dense_flow.cpp.o): In function calcDenseFlow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&)': dense_flow.cpp:(.text+0x100): undefined reference toel::base::Writer::construct(int, char const, ...)' dense_flow.cpp:(.text+0x6e6): undefined reference to `el::base::Writer::construct(int, char const, ...)' libdenseflow.a(dense_flow.cpp.o): In function el::base::Writer::~Writer()': dense_flow.cpp:(.text._ZN2el4base6WriterD2Ev[_ZN2el4base6WriterD5Ev]+0x26): undefined reference toel::base::Writer::processDispatch()' libdenseflow.a(zip_utils.cpp.o): In function writeZipFile(std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': zip_utils.cpp:(.text+0xce): undefined reference toel::base::Writer::construct(int, char const, ...)' zip_utils.cpp:(.text+0x2c0): undefined reference to `el::base::Writer::construct(int, char const, ...)' collect2: error: ld returned 1 exit status CMakeFiles/extract_cpu.dir/build.make:156: recipe for target 'extract_cpu' failed make[2]: [extract_cpu] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/extract_cpu.dir/all' failed make[1]: [CMakeFiles/extract_cpu.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

and I am stuck here. any recommendations? It links to the code rather than dependencies and I am out of ideas. I am not familiar with cpp either. Thanks.

duygusar commented 6 years ago

Seems like it might be due to easyloggingpp, during make test I receive:

Test project /home/duygu/Desktop/CONDOR/easyloggingpp-9.96.4/build Start 1: easyloggingppUnitTests 1/1 Test #1: easyloggingppUnitTests ...........***Exception: Other 18.74 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 18.74 sec

The following tests FAILED: 1 - easyloggingppUnitTests (OTHER_FAULT) Errors while running CTest Makefile:127: recipe for target 'test' failed make: *** [test] Error 8

Tylerjoe commented 6 years ago

@shuangshuangguo @yjxiong I still have the same problem with opencv-3.2.0 : dense_flow/src/zip_utils.cpp:7:27: fatal error: easylogging++.h: No such file or directory

my environment is centos 7.2

could you please give me some advices, Thanks!

Tylerjoe commented 6 years ago

have you solved this problem about easylogging @duygusar

wanglimin commented 6 years ago

This code is for opencv2.4 and ubuntu 14.04

On Mon, Sep 3, 2018 at 11:37 AM Tylerjoe notifications@github.com wrote:

have you solved this problem about easylogging @duygusar https://github.com/duygusar

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wanglimin/dense_flow/issues/15#issuecomment-417992022, or mute the thread https://github.com/notifications/unsubscribe-auth/AHP2Gp7uOaWLaX_YTPQqkZcioB0sQtkpks5uXKQRgaJpZM4PF9m9 .

-- Limin Wang Professor, Nanjing University, China Homepage: http://wanglimin.github.io/

Tylerjoe commented 6 years ago

@wanglimin Thanks for your so quick reply,but there is the other link for opencv3 in README.md.

Please see the opencv-3.1 branch. Many thanks to @victorhcm for the contributions!

I downloaded the project for the link and complied it.

yjxiong commented 6 years ago

You should use git clone —recursive, otherwise easylogging won’t be in the folder.

Tylerjoe commented 6 years ago

@yjxiong Thanks for your reply and help

LuDu2020 commented 5 years ago

@yjxiong Thanks for your reply and help

@Tylerjoe hello,Hello, I would like to ask whether you have encountered this problem in the compilation process of opencv3.1:

make j:

Error:

In file included from /data/user21/dense_flow/src/dense_warp_flow_gpu.cpp:2:0: /data/user21/dense_flow/include/dense_flow.h:9:27: fatal error: easylogging++.h: No such file or directory compilation terminated. CMakeFiles/denseflow.dir/build.make:134: recipe for target 'CMakeFiles/denseflow.dir/src/dense_warp_flow_gpu.cpp.o' failed make[2]: [CMakeFiles/denseflow.dir/src/dense_warp_flow_gpu.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... /data/user21/dense_flow/src/dense_flow_gpu.cpp:8:27: fatal error: easylogging++.h: No such file or directory compilation terminated. CMakeFiles/denseflow.dir/build.make:110: recipe for target 'CMakeFiles/denseflow.dir/src/dense_flow_gpu.cpp.o' failed make[2]: [CMakeFiles/denseflow.dir/src/dense_flow_gpu.cpp.o] Error 1 In file included from /data/user21/dense_flow/src/dense_flow.cpp:5:0: /data/user21/dense_flow/include/dense_flow.h:9:27: fatal error: easylogging++.h: No such file or directory compilation terminated. /data/user21/dense_flow/src/zip_utils.cpp:7:27: fatal error: easylogging++.h: No such file or directory compilation terminated. CMakeFiles/denseflow.dir/build.make:158: recipe for target 'CMakeFiles/denseflow.dir/src/zip_utils.cpp.o' failed make[2]: [CMakeFiles/denseflow.dir/src/zip_utils.cpp.o] Error 1 CMakeFiles/denseflow.dir/build.make:86: recipe for target 'CMakeFiles/denseflow.dir/src/dense_flow.cpp.o' failed make[2]: [CMakeFiles/denseflow.dir/src/dense_flow.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/denseflow.dir/all' failed make[1]: [CMakeFiles/denseflow.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

IvanFei commented 5 years ago

Seems like it might be due to easyloggingpp, during make test I receive:

Test project /home/duygu/Desktop/CONDOR/easyloggingpp-9.96.4/build Start 1: easyloggingppUnitTests 1/1 Test #1: easyloggingppUnitTests ...........***Exception: Other 18.74 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 18.74 sec

The following tests FAILED: 1 - easyloggingppUnitTests (OTHER_FAULT) Errors while running CTest Makefile:127: recipe for target 'test' failed make: *** [test] Error 8

@gss-ucas and @zhipeng-fan Thank you both, Using @zhipeng-fan 's git and installing easylogging, I was able to get to a point where at least the errors make more sense. I also figured out I needed the opencv contrib modules. However I still have a problem while "make" (no problem with cmake part):

[ 57%] Linking CXX executable extract_cpu CMakeFiles/extract_cpu.dir/tools/extract_flow.cpp.o: In function __static_initialization_and_destruction_0(int, int)': extract_flow.cpp:(.text+0xbaa): undefined reference toel::base::Storage::Storage(std::shared_ptrel::LogBuilder const&)' CMakeFiles/extract_cpu.dir/tools/extract_flow.cpp.o: In function el::LogBuilder::LogBuilder()': extract_flow.cpp:(.text._ZN2el10LogBuilderC2Ev[_ZN2el10LogBuilderC5Ev]+0x2b): undefined reference toel::base::utils::OS::termSupportsColor()' CMakeFiles/extract_cpu.dir/tools/extract_flow.cpp.o: In function el::base::DefaultLogBuilder::DefaultLogBuilder()': extract_flow.cpp:(.text._ZN2el4base17DefaultLogBuilderC2Ev[_ZN2el4base17DefaultLogBuilderC5Ev]+0x1b): undefined reference tovtable for el::base::DefaultLogBuilder' libdenseflow.a(dense_flow.cpp.o): In function calcDenseFlow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&)': dense_flow.cpp:(.text+0x100): undefined reference toel::base::Writer::construct(int, char const, ...)' dense_flow.cpp:(.text+0x6e6): undefined reference to `el::base::Writer::construct(int, char const, ...)' libdenseflow.a(dense_flow.cpp.o): In function el::base::Writer::~Writer()': dense_flow.cpp:(.text._ZN2el4base6WriterD2Ev[_ZN2el4base6WriterD5Ev]+0x26): undefined reference toel::base::Writer::processDispatch()' libdenseflow.a(zip_utils.cpp.o): In function writeZipFile(std::vector<std::vector<unsigned char, std::allocator >, std::allocator<std::vector<unsigned char, std::allocator > > >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)': zip_utils.cpp:(.text+0xce): undefined reference toel::base::Writer::construct(int, char const, ...)' zip_utils.cpp:(.text+0x2c0): undefined reference to `el::base::Writer::construct(int, char const, ...)' collect2: error: ld returned 1 exit status CMakeFiles/extract_cpu.dir/build.make:156: recipe for target 'extract_cpu' failed make[2]: [extract_cpu] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/extract_cpu.dir/all' failed make[1]: [CMakeFiles/extract_cpu.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

and I am stuck here. any recommendations? It links to the code rather than dependencies and I am out of ideas. I am not familiar with cpp either. Thanks.

Excuse me, have you solved this problem? I have the same problem. Would you please tell me the solution, if you have any ideas...

patrolli commented 4 years ago

Seems like it might be due to easyloggingpp, during make test I receive: Test project /home/duygu/Desktop/CONDOR/easyloggingpp-9.96.4/build Start 1: easyloggingppUnitTests 1/1 Test #1: easyloggingppUnitTests ...........Exception: Other 18.74 sec 0% tests passed, 1 tests failed out of 1 Total Test time (real) = 18.74 sec The following tests FAILED: 1 - easyloggingppUnitTests (OTHER_FAULT) Errors while running CTest Makefile:127: recipe for target 'test' failed make: [test] Error 8

@gss-ucas and @zhipeng-fan Thank you both, Using @zhipeng-fan 's git and installing easylogging, I was able to get to a point where at least the errors make more sense. I also figured out I needed the opencv contrib modules. However I still have a problem while "make" (no problem with cmake part): [ 57%] Linking CXX executable extract_cpu CMakeFiles/extract_cpu.dir/tools/extract_flow.cpp.o: In function __static_initialization_and_destruction_0(int, int)': extract_flow.cpp:(.text+0xbaa): undefined reference toel::base::Storage::Storage(std::shared_ptrel::LogBuilder const&)' CMakeFiles/extract_cpu.dir/tools/extract_flow.cpp.o: In function el::LogBuilder::LogBuilder()': extract_flow.cpp:(.text._ZN2el10LogBuilderC2Ev[_ZN2el10LogBuilderC5Ev]+0x2b): undefined reference toel::base::utils::OS::termSupportsColor()' CMakeFiles/extract_cpu.dir/tools/extract_flow.cpp.o: In function el::base::DefaultLogBuilder::DefaultLogBuilder()': extract_flow.cpp:(.text._ZN2el4base17DefaultLogBuilderC2Ev[_ZN2el4base17DefaultLogBuilderC5Ev]+0x1b): undefined reference tovtable for el::base::DefaultLogBuilder' libdenseflow.a(dense_flow.cpp.o): In function calcDenseFlow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&)': dense_flow.cpp:(.text+0x100): undefined reference toel::base::Writer::construct(int, char const, ...)' dense_flow.cpp:(.text+0x6e6): undefined reference to `el::base::Writer::construct(int, char const, ...)' libdenseflow.a(dense_flow.cpp.o): In function el::base::Writer::~Writer()': dense_flow.cpp:(.text._ZN2el4base6WriterD2Ev[_ZN2el4base6WriterD5Ev]+0x26): undefined reference toel::base::Writer::processDispatch()' libdenseflow.a(zip_utils.cpp.o): In function writeZipFile(std::vector<std::vector<unsigned char, std::allocator >, std::allocator<std::vector<unsigned char, std::allocator > > >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)': zip_utils.cpp:(.text+0xce): undefined reference toel::base::Writer::construct(int, char const, ...)' zip_utils.cpp:(.text+0x2c0): undefined reference to `el::base::Writer::construct(int, char const, ...)' collect2: error: ld returned 1 exit status CMakeFiles/extract_cpu.dir/build.make:156: recipe for target 'extract_cpu' failed make[2]: [extract_cpu] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/extract_cpu.dir/all' failed make[1]: [CMakeFiles/extract_cpu.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 and I am stuck here. any recommendations? It links to the code rather than dependencies and I am out of ideas. I am not familiar with cpp either. Thanks.

Excuse me, have you solved this problem? I have the same problem. Would you please tell me the solution, if you have any ideas...

i also got the same problem, have you solve it? Could u pls tell me the solution as well...

cyy53589 commented 4 years ago

@patrolli Hi, I works it out by :

  1. clone easyloggingpp
  2. copy easyloggingpp/src/* into dense_flow/include/easylogging/src
  3. copy easyloggingpp/src/*.cc into dense_flow/src
  4. change line 33 in CMakeList.txt
    add_library(denseflow src/common.cpp src/dense_flow.cpp src/dense_flow_gpu.cpp src/dense_warp_flow_gpu.cpp src/zip_utils.cpp src/easylogging++.cc)