Crash with opencv video intitialisation - c++

I have the problem which is described here.
The extension i have already set correct.
What i have done regarding the suggestet Points on the link:
Point 1: I have looked in my cmake file and ffmpeg, libavutil etc is all chosen.
Point 2: I thought all files are installed automatically in usr/src if you don't change it, isn't it?
Point 3: It is a new installation. But btw. how can i deinstall the lib?
Point 4: Shouldn't be the problem.
Thx in advance
Further infos:
Opensuse 12.3
Opencv-2.4.3
Qt4 Environment
C++ Commands used last:
VW.open(vsm, CV_FOURCC('F','L','V','1'), 25, vidImg.size(),!(vidImg.channels() == 1));
Filename in vsm: /home/Ingeborg/DA/videos/IMG-2013-11-19-22-3-5.avi

Do you have a flv or avi? These are two different formats. If you do a ffprobe on the file it will tell you the format. Also you need to check if you have compiled ffmpeg with the codec support for the codecs used in your file. ffmpeg -codecs ffmpeg -formats will help you with that.

Yes. At last i have found libavcodec , which was missing. With ffmpeg installed manually i've got different other problems. I think the main thing is that i don't know how to install the stuff correctly on its place.
At the moment i have a similar problem and i think i found a solution. While installing OpenCV 2.4.7 i got this output :
Linking CXX shared library ../../lib/libopencv_world.so
c++: error: ../highgui/CMakeFiles/opencv_highgui.dir/__/__ /release/modules/highgui
/qrc_window_QT.cpp.o: Datei oder Verzeichnis nicht gefunden
make[2]: *** [lib/libopencv_world.so.2.4.7] Fehler 1
make[1]: *** [modules/world/CMakeFiles/opencv_world.dir/all] Fehler 2
make: *** [all] Fehler 2
I think the solution is here. My simple question is (i feel a little mad, because it seems totally common), where i have to write the LD_LIBRARY_PATH down ?
Thanks!

Related

Can't make raylib, receives makefile error 576: recipe for target 'rmodels.o' failed

I am trying to use MinGW to compile the raylib package, but it's not going very good. It gives me this error:
cc1.exe: some warnings being treated as errors
Makefile:576: recipe for target 'rmodels.o' failed
mingw32-make: *** [rmodels.o] Error 1
This happens after i run:
mingw32-make PLATFORM=PLATFORM_DESKTOP
What am i doing wrong, what do i need to fix to make this work?
I think the developer solved the case a couple of days ago. If you're sure that it's the right error, here is the link to the comment from the developers' GitHub:
https://github.com/raysan5/raylib/issues/2137#issuecomment-968128325
He said it might be an issue with your current version of MinGW. There is a possibility that it's outdated.
Old thread, but for people with this problem in the future, I created a fork that fixed it for me. https://github.com/jamieengel011/raylib.

Error using Cygwin: "collect2: fatal error: ld terminated with signal 11 [Segmentation fault]"

I'm trying to use cygwin to download openslide (building natively on Windows) on a Windows 10 x64 system. I ran into an error earlier relating to chk_fail and set the line in the build file with -D_FORTIFY_SOURCE to 0 instead of the default (2). You can probably tell by now I don't really know what I'm doing. But I got a new error below relating to a memory error from what I've read. I tried deleting the whole package folder including the makefiles and object files, then clone from Github again and rebuild, but it didn't work. Can anyone give me pointers about what's happening here and how to fix it? It would be much appreciated.
Scanning dependencies of target ziptool
[ 90%] Building C object src/CMakeFiles/ziptool.dir/ziptool.c.obj
[ 90%] Linking C executable ziptool.exe
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
make[2]: *** [src/CMakeFiles/ziptool.dir/build.make:109: src/ziptool.exe] Error 1
make[2]: *** Deleting file 'src/ziptool.exe'
make[1]: *** [CMakeFiles/Makefile2:442: src/CMakeFiles/ziptool.dir/all] Error 2
make: *** [Makefile:161: all] Error 2
Failed: make $parallel (line 417)
I solved this problem. Firstly, don't even bother to build this package using Cygwin. It won't work because of dependency issues and there is no record for version control in the package README.
For anyone else who has this problem like I did, you can download the latest versions of the code here: https://github.com/openslide/openslide-winbuild/releases and pick the latest one.
I first pip installed openslide-python. Then I moved openslide-win64-20171122 (from Github) into anaconda3/site-packages (not necessary, but nice), and then from anaconda3/site-packages/openslide I opened lowlevel.py.
In lowlevel.py, you need to add the following lines:
(in the beginning after importing libraries)
os.environ['PATH'] = "path/to/openslide-win64-20171122/bin" + ";" + os.environ['PATH']
You can also change this line:
if platform.system() == 'Windows':
_lib = cdll.LoadLibrary('libopenslide-0.dll')
to this:
if platform.system() == 'Windows':
_lib = cdll.LoadLibrary(util.find_library("libopenslide-0.dll"))
so that it searches for the libopenslide-0.dll file. Then don't forget to add from ctypes import util at the beginning.

fatal error while compiling pybind11 test cases on raspbian

Following this question, I'm now trying to compile the pybind11 test cases as instructed here on a Raspberry Pi. What I have done so far:
installed Raspbian Raspbian Buster Lite from the official page
updated/upgraded all packages
updated/upgraded python packages following the instructions here
compiled and installed pybind11 following the instructions here
my environment is:
Raspbian buster version 10
python 3.7.3
pip 20.0.2
gcc 8.3.0
Then running the command make check -j 4 the compiler stops at:
[ 68%] Building CXX object CmakeFiles/pybind11_tests.dir/test_numpy_dtypes.cpp.o
and the errors are:
c++: fatal error: Killed signal terminated program cplusplus
compilation terminated.
make[3]: *** [CMakeFiles/pybind11_tests.dir/build.make:297: CMakeFiles/pybind11_tests.dir/test_local_bindings.cpp.o] Error 1
make[3]: *** waiting for unfinished jobs...
make[2]: *** [CMakeFiles/Makefile2:110: CMakeFiles/pybind11_tests.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:191: CMakeFile/check.dir/rule] Error 2
make: *** [Makefile:157: check] Error 2
I would appreciate it if you could help me understand what is the problem and how I can solve it.
Doing more research and using the right keyword query, it seems this issue has nothing to do with bypynd11 or Raspbian for that matter. The issue seems to be with memory overflow as described in numerous posts before (including here and here). The solution might be to use fewer parallel processes -j <n> where n < 4, or do not use it at all as suggested here. For example, I tested the
make check -j 3
and it works. Or alternatively to create a swape file as described here.
Yes you have to create first swap file. After that you can do it. Acctually swap file will increase yor ram memory. It will use rom space for ram performance.
Please go through with below link it would help you.
https://youtu.be/Cr5mDFxvsb0

How to compile atanks from windows?

I'm starting to learn C++ to make a game, I compiled some little programs and it worked fine to learn. Now I want to compile a game and learn how it was done.
The game I'm trying to compile is ATANKS (https://libregamewiki.org/Atanks).
First problem I have is the makefile contains an instruction on the target WINUSER that gives me error (it doesn't found the directory INSTALLDIR), I tried to compile manually entering SRC directory and run MAKE -f makefile.windows, it start to compile and stops with this error:
c:/tdm-gcc-64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-min
gw32/bin/ld.exe: atanks.o: bad reloc address 0x20 in section `.data'
collect2.exe: error: ld returned 1 exit status
make: *** [../atanks.exe] Error 1
Because a comment in the file atanks.rc I asume this was writed using DEV-C++ but it hasn't the .DEV project file.
Some info:
I'm using windows 7 64 bits.
I have installed DEV-C++, but for my game I'm using CODEBLOCKS.
Installed TDM-GCC-4.8.1-3 and allegro-4.4.2-mingw-4.5.2
Installed make-3.81
The PATH variable is: PATH=c:\TDM-GCC-64\bin\;"c:\Program Files (x86)\GnuWin32\bin\";
Other thing I tryed is making a CODEBLOCKS project, it seems to go but give me some errors too.
Thanks in advance and forgive me the bad english :)
(maybe someone can recommend me a forum to ask more, better if the language is spanish)
Someone on a IRC Channel help me to solve it, a little change on the makefile and use a 32 bit compiler instead 64 bit one was the solution.

Getting started with AspectC++

I do think that some of my problems concerning adding new functionality to old C++ code can be solved elegantly using AOP. Now, my first idea was to download AspectC++ and just start working. However, it doesn't seem to be that simple:
The Visual Studio integration thingy by pure systems has been updated for the last time about 5 years ago, adding support for VS '05. '10 (which I'm using) isn't detected during installation which in turn results in the installation being canceled.
ACDT was updated the last time Feb '07, Eclipse 3.2 being the last one supported, installation on current Eclipse fails.
Simply trying to compile the examples that come with AspectC++ doesn't work either:
username#username-VirtualBox:/media/sf_Temp/aspectc++$ make
make -C examples/coverage
make[1]: Entering directory `/media/sf_Temp/aspectc++/examples/coverage'
Compiling main.cc
make[1]: /media/sf_Temp/aspectc++/ag++: Command not found
make[1]: *** [Junk/main.o] Error 127
make[1]: Leaving directory `/media/sf_Temp/aspectc++/examples/coverage'
make: *** [coverage.make] Error 2
username#username-VirtualBox:/media/sf_Temp/aspectc++$
This "command not found" is weird, as simply running ag++ works (albeit it then of course complains about having no input files).
Soooo ... I'm kind of lost now. Any help on where to find a working manual for performing the first steps or some hint concerning what I'm doing wrong would be appreciated. Or is AspectC++ just too outdated/unusable/whatever for people to use it (which would explain the lack of some simple first-steps-manual which usually can be found by the hundreds)?
Thanks in advance.
I'm the AspectC++ project leader. If you need help, the best way is to subscribe to the AspectC++ user mailing list (visit www.aspectc.org and click on "support") and post a question there. It is not possible to be aware of all questions being posted anywhere on the web. Sorry. Yet, you are really welcome on our mailing list! :-)
In your special case, the error message sounds as if ag++ hadn't found ac++. These two binaries have to reside in the same directory. ag++ is just a wrapper that calls ac++, which performs the actual code transformation, and g++ for the compilation into an object file.