[Cin] CinGG + OpenCV build fails with old gphoto includes
Andrew Randrianasulu
randrianasulu at gmail.com
Fri Nov 1 14:46:53 CET 2019
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)?
More information about the Cin
mailing list