when i am doing make in /opencv/build directory it is working upto some extent after that it is showing this kind of error what should i do
Linking CXX executable ../../bin/opencv_test_core
CMakeFiles/opencv_test_core.dir/test/ocl/test_arithm.cpp.o: file not
recognized:
File truncated collect2: error: ld returned 1 exit status modules/core
/CMakeFiles/opencv_test_core.dir/build.make:824: recipe for target 'bin/opencv_test_core' failed make[2]: * [bin/opencv_test_core]
Error 1 CMakeFiles/Makefile2:1421: recipe for target
'modules/core/CMakeFiles/opencv_test_core.dir/all' failed make[1]: *
[modules/core/CMakeFiles/opencv_test_core.dir/all] Error 2
Makefile:147: recipe for target 'all' failed make: *** [all] Error 2
Your problem is most likely here:
CMakeFiles/opencv_test_core.dir/test/ocl/test_arithm.cpp.o: file not recognized: File truncated
Delete the object (.o) file and rerun. The make call was probably interrupted before which caused the object file to be truncated.
Related
I've been trying to build a piece of code in webassembly that would use OpenCV.
I took https://github.com/mpizenberg/emscripten-opencv to start building, this worked well, but when I try adding cv::resize to be able to resize an image, that's when I have some issues:
make[1]: Entering directory '/code/build'
make[2]: Entering directory '/code/build'
make[3]: Entering directory '/code/build'
Scanning dependencies of target hello
make[3]: Leaving directory '/code/build'
make[3]: Entering directory '/code/build'
[ 50%] Building CXX object CMakeFiles/hello.dir/source/main.cpp.o
[100%] Linking CXX executable hello.js
error: undefined symbol: _Z7cvFloorRKN2cv10softdoubleE
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
error: undefined symbol: _Z7cvRoundRKN2cv10softdoubleE
error: undefined symbol: _Z9cvRound64RKN2cv10softdoubleE
error: undefined symbol: _ZN2cv10softdoubleC1Ei
error: undefined symbol: _ZN2cv10softdoubleC1Ex
error: undefined symbol: _ZNK2cv10softdoubledvERKS0_
error: undefined symbol: _ZNK2cv10softdoublemiERKS0_
error: undefined symbol: _ZNK2cv10softdoublemlERKS0_
error: undefined symbol: _ZNK2cv10softdoubleplERKS0_
Error: Aborting compilation due to previous errors
shared:ERROR: '/emsdk_portable/node/bin/node /emsdk_portable/sdk/src/compiler.js /tmp/tmpS6bxjF.txt /emsdk_portable/sdk/src/embind/emval.js /emsdk_portable/sdk/src/embind/embind.js /emsdk_portable/sdk/src/library_pthread_stub.js' failed (1)
CMakeFiles/hello.dir/build.make:95: recipe for target 'hello.js' failed
make[3]: *** [hello.js] Error 1
make[3]: Leaving directory '/code/build'
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/hello.dir/all' failed
make[2]: *** [CMakeFiles/hello.dir/all] Error 2
make[2]: Leaving directory '/code/build'
Makefile:83: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/code/build'
Makefile:5: recipe for target 'build' failed
make: *** [build] Error 2
The command '/bin/sh -c make build' returned a non-zero code: 2
make: *** [all] Error 2
I tried wrapping up my problem here https://github.com/jdrouet/opencv-wasm, you can pull it and run make, it'll build with docker.
Do you have any idea of how I could fix my issue?
Ok, looks like I found a way to build it (still here https://github.com/jdrouet/opencv-wasm) but now, when I try to use the resize function, I end up with the following error :
Error: the string "174007712 - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch." was thrown, throw an Error :)
So now, I don't know if I'm not using the function well... Here is the function : https://github.com/jdrouet/opencv-wasm/blob/master/source/resizer.cpp#L23
Do you have any idea of why it's not working?
I would like use clang to get the functions names from a cpp file.
I found some tutorials but always I received this error when I executed 'make':
/usr/bin/ld: error: ../../lib/libLLVMSelectionDAG.a: ELF section name out of range
collect2: error: ld returned 1 exit status
tools/lto/CMakeFiles/LTO.dir/build.make:269: recipe for target 'lib/libLTO.so.7.0.0svn' failed
make[2]: * [lib/libLTO.so.7.0.0svn] Error 1
CMakeFiles/Makefile2:18957: recipe for target 'tools/lto/CMakeFiles/LTO.dir/all' failed
make[1]: * [tools/lto/CMakeFiles/LTO.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
Any idea of how can I solve this problem or any tutorial?
Thanks in advance.
I solved the problem increasing the /dev/sda1 size and removing the file ../../lib/libLLVMSelectionDAG.a
After that I only executed 'make' and It worked.
I get this error almost everytime i try to run a simple code on CLion.
I'm not trying to save the project in c drive.
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot open output file A__IQ_test.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
CMakeFiles\A__IQ_test.dir\build.make:95: recipe for target 'A__IQ_test.exe' failed
mingw32-make.exe[3]: * [A__IQ_test.exe] Error 1
mingw32-make.exe[2]: [CMakeFiles/A__IQ_test.dir/all] Error 2
CMakeFiles\Makefile2:66: recipe for target 'CMakeFiles/A__IQ_test.dir/all' failed
mingw32-make.exe[1]: [CMakeFiles/A__IQ_test.dir/rule] Error 2
CMakeFiles\Makefile2:78: recipe for target 'CMakeFiles/A__IQ_test.dir/rule' failed
mingw32-make.exe: * [A__IQ_test] Error 2
Makefile:117: recipe for target 'A__IQ_test' failed
This usually means your program is already running. You can't replace it with a new one while it's running. Ensure you've closed your program before you try to rebuild it. If you think you've done so, there may be a bug where it is hanging — attach your debugger to find out.
I installed and tested v0.19.1 successfully before, however, I needed to downgrade to 0.17.1 in order to run some example in omnetpp's veins simulator.
Whenever I run the "make" command, I get the following error:
/usr/bin/ld: ./utils/foxtools/libfoxtools.a(MFXMutex.o): undefined reference to symbol 'pthread_mutexattr_settype##GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [sumo-gui] Error 1
make[3]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make: *** [all-recursive] Error 1
What am I missing?!
Problem solved, had to install libproj-dev and include proj in the ./configure using the --with-proj-includes=DIR
[EDIT] after 15 minutes of making, same error raised again!!!
I downloaded the MySQL Connector / C++ code from dev.mysql.com. I also used opkg to download the libmysqlclient-r-dev package, which gave me libmysqlclient_r.so and .la in my /usr/lib directory.
When I attempt to make the source code for the MySQL connector, I get the following error:
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.7.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lmysqlclient_r
collect2: error: ld returned 1 exit status
make[2]: *** [driver/libmysqlcppconn.so.1.0.5] Error 1
make[1]: *** [driver/CMakeFiles/mysqlcppconn.dir/all] Error 2
make: *** [all] Error 2
It tells me that the library is missing, eventhough it is present in /usr/lib?
How does that work, and what should I do?