Closed kalwalt closed 5 years ago
log of the error (partial):
In file included from /home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/core/include/opencv2/core.hpp:54:
/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/core/include/opencv2/core/base.hpp:52:10: fatal error:
'opencv2/opencv_modules.hpp' file not found
#include "opencv2/opencv_modules.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
enabling libopencv_video and libopencv_videoio give me this result:
[586/632] /home/walter/emsdk/fastcomp/emscripten/em++ -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -isystem . -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/calib3d/include -Imodules/calib3d -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/core/include -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/flann/include -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/imgproc/include -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/features2d/include -Oz --llvm-lto 1 --bind -s ASSERTIONS=0 --memory-init-file 0 -s INVOKE_RUN=0 -s NO_EXIT_RUNTIME=1 -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -pthread -Qunused-arguments -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG -O3 -DNDEBUG -fPIC -std=c++11 -MD -MT modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/calibinit.cpp.o -MF modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/calibinit.cpp.o.d -o modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/calibinit.cpp.o -c /home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/calib3d/src/calibinit.cpp
ninja: build stopped: subcommand failed.
ninja stopped. i cleaned the build folder and rerun but always the same. should disable them? i readded them because they are listed in artoolkitX.js/CmakeLists.txt
readding libopencv_video and ibopencv_videoio i get again the ninja error:
FAILED: modules/videoio/CMakeFiles/opencv_videoio.dir/src/backend_plugin.cpp.o
/home/walter/emsdk/fastcomp/emscripten/em++ -DENABLE_PLUGINS -DSTRICT_PLUGIN_CHECK -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -isystem . -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/include -Imodules/videoio -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/core/include -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/imgproc/include -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/imgcodecs/include -Oz --llvm-lto 1 --bind -s ASSERTIONS=0 --memory-init-file 0 -s INVOKE_RUN=0 -s NO_EXIT_RUNTIME=1 -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -pthread -Qunused-arguments -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG -O3 -DNDEBUG -fPIC -std=c++11 -MD -MT modules/videoio/CMakeFiles/opencv_videoio.dir/src/backend_plugin.cpp.o -MF modules/videoio/CMakeFiles/opencv_videoio.dir/src/backend_plugin.cpp.o.d -o modules/videoio/CMakeFiles/opencv_videoio.dir/src/backend_plugin.cpp.o -c /home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/src/backend_plugin.cpp
/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/src/backend_plugin.cpp:43:18: error: unknown type name 'LibHandle_t'
void* getSymbol_(LibHandle_t h, const char* symbolName)
^
/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/src/backend_plugin.cpp:53:1: error: unknown type name 'LibHandle_t'
LibHandle_t libraryLoad_(const char* filename)
^
/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/src/backend_plugin.cpp:63:22: error: unknown type name 'LibHandle_t'
void libraryRelease_(LibHandle_t h)
^
/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/src/backend_plugin.cpp:98:5: error: unknown type name 'LibHandle_t'
LibHandle_t handle;
^
In file included from /home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/src/backend_plugin.cpp:5:
In file included from /home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/src/precomp.hpp:45:
In file included from /home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/include/opencv2/videoio.hpp:46:
In file included from /home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/core/include/opencv2/core.hpp:52:
In file included from /home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/core/include/opencv2/core/cvdef.h:695:
In file included from /home/walter/emsdk/fastcomp/emscripten/system/include/libcxx/array:112:
In file included from /home/walter/emsdk/fastcomp/emscripten/system/include/libcxx/algorithm:644:
/home/walter/emsdk/fastcomp/emscripten/system/include/libcxx/memory:4334:28: error: assigning to 'std::__2::__shared_weak_count *' from incompatible type 'std::__2::unique_ptr<std::__2::__shared_ptr_emplace<cv::impl::DynamicLib, std::__2::allocator<cv::impl::DynamicLib> >, std::__2::__allocator_destructor<std::__2::allocator<std::__2::__shared_ptr_emplace<cv::impl::DynamicLib, std::__2::allocator<cv::impl::DynamicLib> > > > >::pointer' (aka 'std::__2::__shared_ptr_emplace<cv::impl::DynamicLib, std::__2::allocator<cv::impl::DynamicLib> > *')
__r.__cntrl_ = __hold2.release();
~~~~~~~~^~~~~~~~~
/home/walter/emsdk/fastcomp/emscripten/system/include/libcxx/memory:4710:29: note: in instantiation of function template specialization 'std::__2::shared_ptr<cv::impl::DynamicLib>::make_shared<const std::__2::basic_string<char> &>' requested here
return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
^
/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/core/include/opencv2/core/cvstd_wrapper.hpp:141:27: note: in instantiation of function template specialization 'std::__2::make_shared<cv::impl::DynamicLib, const std::__2::basic_string<char> &>' requested here
return (Ptr<_Tp>)std::make_shared<_Tp>(a1...);
^
/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/src/backend_plugin.cpp:267:31: note: in instantiation of function template specialization 'cv::makePtr<cv::impl::DynamicLib, std::__2::basic_string<char> >' requested here
Ptr<DynamicLib> lib = makePtr<DynamicLib>(plugin);
^
5 errors generated.
shared:ERROR: '/home/walter/emsdk/fastcomp/fastcomp/bin/clang++ -target asmjs-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=38 -D__EMSCRIPTEN_tiny__=41 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/home/walter/emsdk/fastcomp/emscripten/system/include/libcxx -Xclang -isystem/home/walter/emsdk/fastcomp/emscripten/system/lib/libcxxabi/include -Xclang -isystem/home/walter/emsdk/fastcomp/emscripten/system/include/compat -Xclang -isystem/home/walter/emsdk/fastcomp/emscripten/system/include -Xclang -isystem/home/walter/emsdk/fastcomp/emscripten/system/include/libc -Xclang -isystem/home/walter/emsdk/fastcomp/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/home/walter/emsdk/fastcomp/emscripten/system/local/include -DEMSCRIPTEN -DENABLE_PLUGINS -DSTRICT_PLUGIN_CHECK -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -isystem . -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/include -Imodules/videoio -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/core/include -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/imgproc/include -I/home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/imgcodecs/include -Oz -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -pthread -Qunused-arguments -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG -O3 -DNDEBUG -fPIC -std=c++11 -MD -MT modules/videoio/CMakeFiles/opencv_videoio.dir/src/backend_plugin.cpp.o -MF modules/videoio/CMakeFiles/opencv_videoio.dir/src/backend_plugin.cpp.o.d -c -D__EMSCRIPTEN_PTHREADS__=1 -mllvm -disable-llvm-optzns /home/walter/kalwalt-github/artoolkitX_em_2d/Source/depends/emscripten/opencv-em/modules/videoio/src/backend_plugin.cpp -fno-inline-functions -Xclang -disable-O0-optnone -Xclang -isystem/home/walter/emsdk/fastcomp/emscripten/system/include/SDL -c -o modules/videoio/CMakeFiles/opencv_videoio.dir/src/backend_plugin.cpp.o -emit-llvm' failed (1)
ninja: build stopped: subcommand failed.
walter@walter-RC530-RC730:~/kalwalt-github/artoolkitX_em_2d/Source$
Before i didn't looked at the entire log, the error is connected to shared pointers, maybe an issue with intrinsic? i will test it again another day...
I've overlooked that before I pushed my changes. Should be fixed on master now
@ThorstenBux i close this because you did all the changes.
Upgrading to the newer OpenCV version. OpenCV compiles but i get an error see in the comments below.
opencv-em is inside /depends/emscripten. not included in this project because it's too big.