Failed to build OpenCvSharpExtern from source
Summary of your issue
OpenCvSharpExtern failed to build
Environment
- Ubuntu 18.04
- OpenCv 4.5.0 complied WITH CUDA
Example code:
OpenCV 4.5.0: https://qengineering.eu/install-opencv-4.5-on-jetson-nano.html OpenCvSharp source files
git clone https://github.com/shimat/opencvsharp.git
cd opencvsharp
git fetch --all --tags --prune && git checkout 4.5.0.20201013
Build native wrapper OpenCvSharpExtern
cd opencvsharp/src
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/usr ..
make -j <-- Failed at this step
make install
Output:
make[2]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/dnn.cpp.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/build.make:254: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/flann.cpp.o' failed
make[2]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/flann.cpp.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/build.make:566: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/stitching.cpp.o' failed
make[2]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/stitching.cpp.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/build.make:542: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/std_vector.cpp.o' failed
make[2]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/std_vector.cpp.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/build.make:110: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/calib3d.cpp.o' failed
What did you intend to be?
Build and run OpenCvSharp on Ubuntu 18.04
I install Opencv 4.5.0 to the default location and everything is working, for now
@minhduc66532 Hi, I installed opencv via a script, but I can't compile opencvsharp on jetsonnano. Nano hangs at 96% compilation rate. I used this command cmake -D CMAKE_INSTALL_PREFIX = / usr ..
make -j <- This command hangs by 96% Help plz
@minhduc66532 Hi, I installed opencv via a script, but I can't compile opencvsharp on jetsonnano. Nano hangs at 96% compilation rate. I used this command cmake -D CMAKE_INSTALL_PREFIX = / usr ..
make -j <- This command hangs by 96% Help plz
Same issue
@quakemaster @trickititit Tbh I really do not know what went wrong for you guys so here is the script I use to install opencvsharp, you can try and run it.
git clone https://github.com/shimat/opencvsharp.git
cd opencvsharp
git fetch --all --tags --prune && git checkout 4.5.0.20201013
cd src
mkdir build
cd build
cmake ..
make -j4
sudo make install
sudo ldconfig
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/home/shimat/opencvsharp/src/build/OpenCvSharpExtern"