CinGG + OpenCV build fails with old gphoto includes
Hello! I tried to rebuild CinGG with OpenCV plugins, yet build failed like this: /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp: В функции-члене «void cv::gphoto2::DigitalCameraCapture::initContext()»: /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:323:66: ошибка: некорректное преобразование из «void (*)(GPContext*, const char*, void*) {aka void (*)(_GPContext*, const char*, void*)}» в «GPContextErrorFunc {aka void (*)(_GPContext*, const char*, char*, void*)}» [-fpermissive] gp_context_set_error_func(context, ctxErrorFunc, (void*) this); ^ In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0, from /usr/include/gphoto2/gphoto2-library.h:28, from /usr/include/gphoto2/gphoto2.h:49, from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32: /usr/include/gphoto2/gphoto2-context.h:113:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_error_func(GPContext*, GPContextErrorFunc, void*)» void gp_context_set_error_func (GPContext *context, ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:324:68: ошибка: некорректное преобразование из «void (*)(GPContext*, const char*, void*) {aka void (*)(_GPContext*, const char*, void*)}» в «GPContextStatusFunc {aka void (*)(_GPContext*, const char*, char*, void*)}» [-fpermissive] gp_context_set_status_func(context, ctxStatusFunc, (void*) this); ^ In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0, from /usr/include/gphoto2/gphoto2-library.h:28, from /usr/include/gphoto2/gphoto2.h:49, from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32: /usr/include/gphoto2/gphoto2-context.h:115:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_status_func(GPContext*, GPContextStatusFunc, void*)» void gp_context_set_status_func (GPContext *context, ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:325:70: ошибка: некорректное преобразование из «void (*)(GPContext*, const char*, void*) {aka void (*)(_GPContext*, const char*, void*)}» в «GPContextMessageFunc {aka void (*)(_GPContext*, const char*, char*, void*)}» [-fpermissive] gp_context_set_message_func(context, ctxMessageFunc, (void*) this); ^ In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0, from /usr/include/gphoto2/gphoto2-library.h:28, from /usr/include/gphoto2/gphoto2.h:49, from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32: /usr/include/gphoto2/gphoto2-context.h:121:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_message_func(GPContext*, GPContextMessageFunc, void*)» void gp_context_set_message_func (GPContext *context, ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:339:52: ошибка: нет декларации «gp_camera_autodetect» в этой области видимости CR(gp_camera_autodetect(allDevices, context)); ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:248:27: замечание: in definition of macro «CR» if ((r_0629c47b758 = (GPHOTO2_FUN)) < GP_OK) {\ ^ make[5]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gphoto2.cpp.o] Ошибка 1 make[5]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build' make[4]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Ошибка 2 make[4]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build' make[3]: *** [all] Ошибка 2 make[3]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build' make[2]: *** [/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv.sta] Ошибка 2 make[2]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/plugins' make[1]: *** [all-recursive] Ошибка 1 make[1]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1' make: *** [all] Ошибка 2 I don't think gphoto2 actually needed for CinGG needs ? Will try to switch it off .... Also, question: can anyone build CinGG with gcc and -fsanitize=address ? For me such build (if I added this switch to both CFLAGS and LDFLAGS) failed on gcc 5.5.0 ... Should I try with clang (llvm 8.0.1)?
Hi, Well your a brave soul to try to make opencv build. As it turns out, I am going to try (yet again) to get opencv to build at the current level in their repo (4.1.2) To build it, you need opencv and opencv_contrib. The only version which consistently has built is 3.4.1 which also still contains surf and sift. These two functions were deleted over a patent and are used in findobj. They are currently ifdef'd out to avoid any dispute. A few years ago I sent in a bug report to opencv to point out a segv in code that is downloaded as a binary library (ipp) where they do not release source. The bug title was " 'almost' open cv ", but it should be " mostly closed cv ". They changed the bug title. They actually removed source which we were using. Definitely not open. Anyway... I digress. The build for opencv is invoked from the *obj plugin makefiles via the "include $(TOPDIR)/opencv_build" It will build opencv when the demand occurs, since the default is to not build opencv plugins. They are expensive and complicated to build. The newer versions require an include path change in opencv_build which is currently commented out. beware that the build uses the network to download the "binary" closed source components for the build, and a few other tools that are just not included. If you use: -DWITH_IPP=OFF the huge hidden library is factored out, but it runs much more slowly. The ipp library is "intel proprietary poop". Once the build has operated, you can see the downloaded files in a hidden directory ./.cache Sooo... ( I did a test build and this did work on my devel system this morning) To get the build we used this month, ./configure --with-single-user --enable-static-build \ --with-opencv=sta,tar= https://www.cinelerra-gg.org/download/opencv/opencv-20180401.tgz to get the 4.x.x version to work, you need to uncomment the: #CFLAGS += -I$(opencv_prefix)/include/opencv4 lines (two of them) in the opencv_build file before you run the build. Before you this, you will first need to create a tarball with both opencv and opencv_contrib in the build. By chance, I was actually getting set to try again on opencv 4.x.x since it now is early in the month, and I have a while to get it to build and to test it. If you are interested in this build, I will post the new tarball in the download area if I can get usable results. It may take a few hours, but I will let you know once I have updated and reworked the build. gg PS. I am not sure about the compiler options (or clang). It is hard enough just to get it to build in the first place. On Fri, Nov 1, 2019 at 7:55 AM Andrew Randrianasulu <[email protected]> wrote:
Hello!
I tried to rebuild CinGG with OpenCV plugins, yet build failed like this:
/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp: В функции-члене «void cv::gphoto2::DigitalCameraCapture::initContext()»: /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:323:66: ошибка: некорректное преобразование из «void (*)(GPContext*, const char*, void*) {aka void (*)(_GPContext*, const char*, void*)}» в «GPContextErrorFunc {aka void (*)(_GPContext*, const char*, char*, void*)}» [-fpermissive] gp_context_set_error_func(context, ctxErrorFunc, (void*) this); ^ In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0, from /usr/include/gphoto2/gphoto2-library.h:28, from /usr/include/gphoto2/gphoto2.h:49, from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32: /usr/include/gphoto2/gphoto2-context.h:113:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_error_func(GPContext*, GPContextErrorFunc, void*)» void gp_context_set_error_func (GPContext *context, ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:324:68: ошибка: некорректное преобразование из «void (*)(GPContext*, const char*, void*) {aka void (*)(_GPContext*, const char*, void*)}» в «GPContextStatusFunc {aka void (*)(_GPContext*, const char*, char*, void*)}» [-fpermissive] gp_context_set_status_func(context, ctxStatusFunc, (void*) this); ^ In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0, from /usr/include/gphoto2/gphoto2-library.h:28, from /usr/include/gphoto2/gphoto2.h:49, from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32: /usr/include/gphoto2/gphoto2-context.h:115:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_status_func(GPContext*, GPContextStatusFunc, void*)» void gp_context_set_status_func (GPContext *context, ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:325:70: ошибка: некорректное преобразование из «void (*)(GPContext*, const char*, void*) {aka void (*)(_GPContext*, const char*, void*)}» в «GPContextMessageFunc {aka void (*)(_GPContext*, const char*, char*, void*)}» [-fpermissive] gp_context_set_message_func(context, ctxMessageFunc, (void*) this); ^ In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0, from /usr/include/gphoto2/gphoto2-library.h:28, from /usr/include/gphoto2/gphoto2.h:49, from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32: /usr/include/gphoto2/gphoto2-context.h:121:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_message_func(GPContext*, GPContextMessageFunc, void*)» void gp_context_set_message_func (GPContext *context, ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:339:52: ошибка: нет декларации «gp_camera_autodetect» в этой области видимости CR(gp_camera_autodetect(allDevices, context)); ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:248:27: замечание: in definition of macro «CR» if ((r_0629c47b758 = (GPHOTO2_FUN)) < GP_OK) {\ ^ make[5]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gphoto2.cpp.o] Ошибка 1 make[5]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build' make[4]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Ошибка 2 make[4]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build' make[3]: *** [all] Ошибка 2 make[3]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build' make[2]: *** [/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv.sta] Ошибка 2 make[2]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/plugins' make[1]: *** [all-recursive] Ошибка 1 make[1]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1' make: *** [all] Ошибка 2
I don't think gphoto2 actually needed for CinGG needs ?
Will try to switch it off ....
Also, question:
can anyone build CinGG with gcc and -fsanitize=address ?
For me such build (if I added this switch to both CFLAGS and LDFLAGS) failed on gcc 5.5.0 ...
Should I try with clang (llvm 8.0.1)?
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
В сообщении от Friday 01 November 2019 18:28:12 Good Guy написал(а):
Hi, Well your a brave soul to try to make opencv build.
:}
As it turns out, I am going to try (yet again) to get opencv to build at the current level in their repo (4.1.2) To build it, you need opencv and opencv_contrib. The only version which consistently has built is 3.4.1 which also still contains surf and sift. These two functions were deleted over a patent and are used in findobj. They are currently ifdef'd out to avoid any dispute. A few years ago I sent in a bug report to opencv to point out a segv in code that is downloaded as a binary library (ipp) where they do not release source. The bug title was " 'almost' open cv ", but it should be " mostly closed cv ". They changed the bug title. They actually removed source which we were using. Definitely not open.
Anyway... I digress.
The build for opencv is invoked from the *obj plugin makefiles via the "include $(TOPDIR)/opencv_build" It will build opencv when the demand occurs, since the default is to not build opencv plugins.
I was thinking about moving OpenCV build before ffmpeg (if enabled), so ffmpeg will get openCV plugin/filters too ..but not sure if any of them will be of any use.. just wild thought!
They are expensive and complicated to build. The newer versions require an include path change in opencv_build which is currently commented out. beware that the build uses the network to download the "binary" closed source components for the build, and a few other tools that are just not included. If you use: -DWITH_IPP=OFF the huge hidden library is factored out, but it runs much more slowly. The ipp library is "intel proprietary poop". Once the build has operated, you can see the downloaded files in a hidden directory ./.cache
Sooo... ( I did a test build and this did work on my devel system this morning) To get the build we used this month, ./configure --with-single-user --enable-static-build \ --with-opencv=sta,tar= https://www.cinelerra-gg.org/download/opencv/opencv-20180401.tgz
This line worked ..after quite long build time. Plugins appear to be functional (at least like StylizeObject/Gabor, not sure how to make FindObject work? What exactly it tries to find?) will look for binary stuff (probably neural network training data?) I have old (2.4.10?) gphoto2 libs/includes, so I used little additional patch to get past build error.
to get the 4.x.x version to work, you need to uncomment the: #CFLAGS += -I$(opencv_prefix)/include/opencv4 lines (two of them) in the opencv_build file before you run the build. Before you this, you will first need to create a tarball with both opencv and opencv_contrib in the build.
By chance, I was actually getting set to try again on opencv 4.x.x since it now is early in the month, and I have a while to get it to build and to test it. If you are interested in this build, I will post the new tarball in the download area if I can get usable results. It may take a few hours, but I will let you know once I have updated and reworked the build.
new software = new ways to find something broken :) I think on releases page for OpenCV they said a lot of 'old' stuff was removed in 4.x .... https://github.com/opencv/opencv/wiki/ChangeLog#version347 Good luck!
gg PS. I am not sure about the compiler options (or clang). It is hard enough just to get it to build in the first place.
Yeah, some heavy stuff inside. But i was asking about non-opencv build, i think libzmpeg freaked out when saw -fsanitize=address in cflags ...and some thirdparty lib, too (liba52?) they scrolled way past my 1000 lines current terminal history :}
On Fri, Nov 1, 2019 at 7:55 AM Andrew Randrianasulu <[email protected]> wrote:
Hello!
I tried to rebuild CinGG with OpenCV plugins, yet build failed like this:
/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp: В функции-члене «void cv::gphoto2::DigitalCameraCapture::initContext()»: /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:323:66: ошибка: некорректное преобразование из «void (*)(GPContext*, const char*, void*) {aka void (*)(_GPContext*, const char*, void*)}» в «GPContextErrorFunc {aka void (*)(_GPContext*, const char*, char*, void*)}» [-fpermissive] gp_context_set_error_func(context, ctxErrorFunc, (void*) this); ^ In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0, from /usr/include/gphoto2/gphoto2-library.h:28, from /usr/include/gphoto2/gphoto2.h:49, from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32: /usr/include/gphoto2/gphoto2-context.h:113:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_error_func(GPContext*, GPContextErrorFunc, void*)» void gp_context_set_error_func (GPContext *context, ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:324:68: ошибка: некорректное преобразование из «void (*)(GPContext*, const char*, void*) {aka void (*)(_GPContext*, const char*, void*)}» в «GPContextStatusFunc {aka void (*)(_GPContext*, const char*, char*, void*)}» [-fpermissive] gp_context_set_status_func(context, ctxStatusFunc, (void*) this); ^ In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0, from /usr/include/gphoto2/gphoto2-library.h:28, from /usr/include/gphoto2/gphoto2.h:49, from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32: /usr/include/gphoto2/gphoto2-context.h:115:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_status_func(GPContext*, GPContextStatusFunc, void*)» void gp_context_set_status_func (GPContext *context, ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:325:70: ошибка: некорректное преобразование из «void (*)(GPContext*, const char*, void*) {aka void (*)(_GPContext*, const char*, void*)}» в «GPContextMessageFunc {aka void (*)(_GPContext*, const char*, char*, void*)}» [-fpermissive] gp_context_set_message_func(context, ctxMessageFunc, (void*) this); ^ In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0, from /usr/include/gphoto2/gphoto2-library.h:28, from /usr/include/gphoto2/gphoto2.h:49, from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32: /usr/include/gphoto2/gphoto2-context.h:121:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_message_func(GPContext*, GPContextMessageFunc, void*)» void gp_context_set_message_func (GPContext *context, ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:339:52: ошибка: нет декларации «gp_camera_autodetect» в этой области видимости CR(gp_camera_autodetect(allDevices, context)); ^ /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:248:27: замечание: in definition of macro «CR» if ((r_0629c47b758 = (GPHOTO2_FUN)) < GP_OK) {\ ^ make[5]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gphoto2.cpp.o] Ошибка 1 make[5]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build' make[4]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Ошибка 2 make[4]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build' make[3]: *** [all] Ошибка 2 make[3]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build' make[2]: *** [/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv.sta] Ошибка 2 make[2]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/plugins' make[1]: *** [all-recursive] Ошибка 1 make[1]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1' make: *** [all] Ошибка 2
I don't think gphoto2 actually needed for CinGG needs ?
Will try to switch it off ....
Also, question:
can anyone build CinGG with gcc and -fsanitize=address ?
For me such build (if I added this switch to both CFLAGS and LDFLAGS) failed on gcc 5.5.0 ...
Should I try with clang (llvm 8.0.1)?
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Demo of using find object (created in 2017 but non-expert, me) is at: https://streamable.com/0ypqg it is also described in the CinelerraGG_manual.pdf.
В сообщении от Friday 01 November 2019 20:04:18 Phyllis Smith написал(а):
Demo of using find object (created in 2017 but non-expert, me) is at: https://streamable.com/0ypqg it is also described in the CinelerraGG_manual.pdf.
Thanks, i see it requires at least two (or 3 if in replace mode) video tracks.. deductable from interface, in a sense, but demo was better than my guess [I was thinking about specific image file chooser from inside plugin itself - but yeah, implemented way more flexible.]
participants (3)
-
Andrew Randrianasulu -
Good Guy -
Phyllis Smith