maskdetection icon indicating copy to clipboard operation
maskdetection copied to clipboard

Unable to Complete the compilation to the executable

Open KillSwitch29 opened this issue 4 years ago • 10 comments

[ 70%] Building CXX object lib/CMakeFiles/face_mask.dir/src/util/xml/xmlfunc.cpp.o [ 80%] Linking CXX shared library libface_mask.so [ 80%] Built target face_mask Scanning dependencies of target mask [ 90%] Building CXX object test/CMakeFiles/mask.dir/main_face_mask.cpp.o make[2]: *** No rule to make target '../test/../thirdpart/lib/caffe/libcaffe.so', needed by 'bin/mask'. Stop. make[1]: *** [CMakeFiles/Makefile2:142: test/CMakeFiles/mask.dir/all] Error 2 make: *** [Makefile:84: all] Error 2

this is the error that I'm getting now and I have no clue how to go about it... Someone help Please :) thanks in advance

KillSwitch29 avatar May 17 '20 20:05 KillSwitch29

Check if the path is right ? maybe try the absolute path.

2016110071 avatar May 18 '20 03:05 2016110071

How do I do that? Could you help me please?? I'm not very familiar with C++ side of things...

KillSwitch29 avatar May 18 '20 10:05 KillSwitch29

Maybe the path "../test/../thirdpart/lib/caffe/libcaffe.so" is not right.

2016110071 avatar May 19 '20 07:05 2016110071

I also had the same problem building this. I fixed it by going into the test folder and opening the CMakeLists.txt. Basically you are expected to keep all your libraries in a file called thirdpart(thirdparty?). I did not do this and instead i just found all the directories for the libraries and replaced them with my locations. This made the make succeed although i don't get how to use the shared library file that is generated.

hypadr1v3 avatar May 25 '20 06:05 hypadr1v3

Guys sorry for the late update! Thanks for your comments I managed to solve the issues and create the executable. The Readme needs a little fixing to mention to whoever is trying that they need to enter the correct path to files libcaffe.so mentioned by @2016110071 . that should do the trick. otherwise this code works. I'm still trying to figure ways to improve this code. Thanks to everyone on the @didi team @710leo @MingliangT @MicroConan @caohe @wbtiger code! If anyone need help let me know on this thread I could help

KillSwitch29 avatar May 28 '20 15:05 KillSwitch29

Ok so now you can close it and I did mention all of this in my comment above and how is the code supposed to run on? (what program/compiler is needed to run this as I too am not familiar with C++)

hypadr1v3 avatar May 29 '20 03:05 hypadr1v3

@hypadr1v3 once you have created the executable it will be available in the build/bin folder. if you are using Linux navigate the terminal to this directory and then type ls you will find the executable now type ./"name of the executable" "and type the directory of the picture to be identified" hit enter it should give you an appropriate output. same procedure for in windows with PowerShell.

I'm gonna leave this open till you get it running! :)

KillSwitch29 avatar May 29 '20 13:05 KillSwitch29

Thanks! now it works

hypadr1v3 avatar May 30 '20 06:05 hypadr1v3

@hypadr1v3 hey I am having trouble building this library. cmake runs fine but I have not been able to get the make command to work. can you please share especially how you linked to all the required libraries? do I need to build all of the requirements from the source?

Any help would be really great.

abhianand7 avatar Jul 23 '20 07:07 abhianand7

It would be helpful if you share your exact error when compiling the code. I had all of the requirements already installed either from binaries or from source. I use Ubuntu so I ran the grep command to find that certain requirement in my system(I had followed installation instructions of all of these packages from their respective manuals) and I added those into the CMakeLists.txt file instead of the directories they had made.

hypadr1v3 avatar Jul 24 '20 04:07 hypadr1v3