GNOME Bugzilla – Bug 754004
opencv: build errors after migrating from c to cpp
Last modified: 2015-08-24 12:09:56 UTC
After the recent migration from c to cpp files for opencv related plugins i am getting the below errors. make[3]: *** No rule to make target `gstopencv.c', needed by `libgstopencv_la-gstopencv.lo'. Stop. make[3]: *** No rule to make target `gstfacedetect.c', needed by `libgstopencv_la-gstfacedetect.lo'. Stop. Even after doing make clean, the error persists. This is happening because make clean is not cleaning the .deps folder. and the .plo files in the .deps folder is still pointing to the old .c file. If i manually edit the .plo files to point to .cpp or delete the .deps folder and compile again, then the error disappears.
I think you need to distclean. git clean -x -d -f certainly helps. Not sure there's much we can do about that. Do you have a solution that doesn't involve manually editing anything?
i did not try anything yet.. but i was thinking like, similar to how we remove .libs folder and output objects during make clean, we should be able to remove .deps folder as well?
Tim is correct. I have seen this repeatedly when switching from OpenCV development branch and master, until this was merged. Autotools doesn't clean up for itself and generated Makefile still points to non-existing C file. You need to clean the repo (git clean -dfx) and generate again the Makefile with ./autogen.sh If we removed the .deps in make clean, that would require having to run configure again after, which means it would be the same as git clean. Make clean is there to build from scratch but not have to generate all the autotool files again.
I think this is WONTFIX or NOTGNOME. Happens, just git clean -x -d -f :)