<div dir="ltr"><div>Hi,</div><div>Well your a brave soul to try to make opencv build.</div><div><br></div><div>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)</div><div>To build it, you need opencv and opencv_contrib. The only version which consistently has built is 3.4.1</div><div>which also still contains surf and sift. These two functions were deleted over a patent and are used in</div><div>findobj. They are currently ifdef'd out to avoid any dispute. A few years ago I sent in a bug report to opencv</div><div>to point out a segv in code that is downloaded as a binary library (ipp) where they do not release source.</div><div>The bug title was " 'almost' open cv ", but it should be " mostly closed cv ". They changed the bug title.<br></div><div>They actually removed source which we were using. Definitely not open.<br></div><div><br></div><div>Anyway... I digress.</div><div><br></div><div>The build for opencv is invoked from the *obj plugin makefiles via the "include $(TOPDIR)/opencv_build"</div><div>It will build opencv when the demand occurs, since the default is to not build opencv plugins. They are</div><div>expensive and complicated to build. The newer versions require an include path change in opencv_build</div><div>which is currently commented out. beware that the build uses the network to download the "binary" closed</div><div>source components for the build, and a few other tools that are just not included. If you use:</div><div> -DWITH_IPP=OFF</div><div>the huge hidden library is factored out, but it runs much more slowly. The ipp library is "intel proprietary poop".</div><div>Once the build has operated, you can see the downloaded files in a hidden directory ./.cache</div><div><br></div><div>Sooo... ( I did a test build and this did work on my devel system this morning)<br></div><div>To get the build we used this month,</div><div> ./configure --with-single-user --enable-static-build \<br> --with-opencv=sta,tar=<a href="https://www.cinelerra-gg.org/download/opencv/opencv-20180401.tgz">https://www.cinelerra-gg.org/download/opencv/opencv-20180401.tgz</a></div><div><br></div><div>to get the 4.x.x version to work, you need to uncomment the:</div><div>#CFLAGS += -I$(opencv_prefix)/include/opencv4</div><div>lines (two of them) in the opencv_build file before you run the build.</div><div>Before you this, you will first need to create a tarball</div><div>with both opencv and opencv_contrib in the build.</div><div><br></div><div>By chance, I was actually getting set to try again on opencv 4.x.x since it now is early in the month,</div><div>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</div><div>tarball in the download area if I can get usable results. It may take a few hours, but I will let you know</div><div>once I have updated and reworked the build.</div><div><br></div><div>gg</div><div>PS.</div><div>I am not sure about the compiler options (or clang).<br></div><div>It is hard enough just to get it to build in the first place.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 1, 2019 at 7:55 AM Andrew Randrianasulu <<a href="mailto:randrianasulu@gmail.com">randrianasulu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello!<br>
<br>
I tried to rebuild CinGG with OpenCV plugins, yet build failed like this:<br>
<br>
/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp: В функции-члене «void cv::gphoto2::DigitalCameraCapture::initContext()»:<br>
/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]<br>
gp_context_set_error_func(context, ctxErrorFunc, (void*) this);<br>
^<br>
In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0,<br>
from /usr/include/gphoto2/gphoto2-library.h:28,<br>
from /usr/include/gphoto2/gphoto2.h:49,<br>
from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32:<br>
/usr/include/gphoto2/gphoto2-context.h:113:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_error_func(GPContext*, GPContextErrorFunc, void*)»<br>
void gp_context_set_error_func (GPContext *context,<br>
^<br>
/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]<br>
gp_context_set_status_func(context, ctxStatusFunc, (void*) this);<br>
^<br>
In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0,<br>
from /usr/include/gphoto2/gphoto2-library.h:28,<br>
from /usr/include/gphoto2/gphoto2.h:49,<br>
from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32:<br>
/usr/include/gphoto2/gphoto2-context.h:115:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_status_func(GPContext*, GPContextStatusFunc, void*)»<br>
void gp_context_set_status_func (GPContext *context,<br>
^<br>
/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]<br>
gp_context_set_message_func(context, ctxMessageFunc, (void*) this);<br>
^<br>
In file included from /usr/include/gphoto2/gphoto2-abilities-list.h:28:0,<br>
from /usr/include/gphoto2/gphoto2-library.h:28,<br>
from /usr/include/gphoto2/gphoto2.h:49,<br>
from /dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:32:<br>
/usr/include/gphoto2/gphoto2-context.h:121:6: замечание: при инициализации 2 -го аргумента «void gp_context_set_message_func(GPContext*, GPContextMessageFunc, void*)»<br>
void gp_context_set_message_func (GPContext *context,<br>
^<br>
/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:339:52: ошибка: нет декларации «gp_camera_autodetect» в этой области видимости<br>
CR(gp_camera_autodetect(allDevices, context));<br>
^<br>
/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/modules/videoio/src/cap_gphoto2.cpp:248:27: замечание: in definition of macro «CR»<br>
if ((r_0629c47b758 = (GPHOTO2_FUN)) < GP_OK) {\<br>
^<br>
make[5]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_gphoto2.cpp.o] Ошибка 1<br>
make[5]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build'<br>
make[4]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Ошибка 2<br>
make[4]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build'<br>
make[3]: *** [all] Ошибка 2<br>
make[3]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv/build'<br>
make[2]: *** [/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/thirdparty/opencv.sta] Ошибка 2<br>
make[2]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1/plugins'<br>
make[1]: *** [all-recursive] Ошибка 1<br>
make[1]: Выход из каталога `/dev/shm/tmp/cinelerra-goodguy-20191101/cinelerra-5.1'<br>
make: *** [all] Ошибка 2<br>
<br>
<br>
I don't think gphoto2 actually needed for CinGG needs ?<br>
<br>
Will try to switch it off ....<br>
<br>
Also, question:<br>
<br>
can anyone build CinGG with gcc and -fsanitize=address ?<br>
<br>
For me such build (if I added this switch to both CFLAGS and LDFLAGS) failed on gcc 5.5.0 ...<br>
<br>
Should I try with clang (llvm 8.0.1)?<br>
<br>
-- <br>
Cin mailing list<br>
<a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank">Cin@lists.cinelerra-gg.org</a><br>
<a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
</blockquote></div>