opencv-1.0.0 does not compile - opencv

I am trying to compile an old code (not written by me) which uses opencv-1.0.0.
I am using 64 bit Scientific Linux 6.
I downloaded opencv-1.0.0 from sourceforge.
Then,
./configure
make
Then I get an error as follows
cvcap_dc1394.cpp: In function 'int icvSetFeatureCAM_DC1394(CvCaptureCAM_DC1394*, int, int)':
cvcap_dc1394.cpp:796: error: overloaded function with no contextual type information
make[3]: *** [cvcap_dc1394.lo] Error 1
make[3]: Leaving directory `/home/ram/opencv/opencv-1.0.0/otherlibs/highgui'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ram/opencv/opencv-1.0.0/otherlibs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ram/opencv/opencv-1.0.0'
Any solutions? After googling a lot, I guess that my distro does not support IEEE1394 stack. Do I need to recompile my kernel? Any simpler way around this problem? I don't want to rewrite that code.

If you do not need the support for firewire, you could try to just disable it by using
./configure --without-1394libs
Does this solve your problem?

Related

ImageMagick 7.0.7-34 installation gives "undefined reference to `PNGSetExifProfile'"

I'm trying to install ImageMagick 7.0.7-34 on a ubuntu 16.04,
I'm using wget to download the latest version (7.0.7-34) from here http://www.imagemagick.org/download/ImageMagick.tar.gz, then after extracting the tar, I'm running the following inside the extracted folder:
sudo ./configure --with-pango
sudo make
which gives the following error:
make all-am
make[1]: Entering directory '/usr/local/sources/ImageMagick-7.0.7-34'
CCLD utilities/magick
MagickCore/.libs/libMagickCore-7.Q16HDRI.so: undefined reference to `PNGSetExifProfile'
collect2: error: ld returned 1 exit status
Makefile:7042: recipe for target 'utilities/magick' failed
make[1]: *** [utilities/magick] Error 1
make[1]: Leaving directory '/usr/local/sources/ImageMagick-7.0.7-34'
Makefile:5178: recipe for target 'all' failed
make: *** [all] Error 2
I've searched but found nothing concerning this error!, anyone knows how to fix this?
--Update--
A similar issue was opened on ImageMagick's github repo, just an hour ago
This was a mistake we made when adding support for the PNG eXIf chunk. This will be resolved in ImageMagick 7.0.7-35. If you upgrade your libpng library you can also fix the build. You will need a version of libpng that has PNG_READ_eXIf_SUPPORTED defined.
p.s. Next time it will be better to create an issue here: https://github.com/ImageMagick/ImageMagick/issues. You will get a much faster response.

Compiling ROS Kinetec from source fails when building opencv

I'm using an Arch machine and trying to compile ROS desktop full from source. The build fails when image_proc is trying to link executable.
Here is the error log:
[ 23%] Built target image_proc_gencfg
[ 84%] Built target image_proc
[ 92%] Linking CXX executable /home/alphayed/ROS/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc
/home/alphayed/ROS/ros_catkin_ws/install_isolated/lib/libopencv_viz3.so.3.1.0: undefined reference to `vtkSTLReader::New()'
/home/alphayed/ROS/ros_catkin_ws/install_isolated/lib/libopencv_viz3.so.3.1.0: undefined reference to `vtkOBJReader::New()'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/image_proc_exe.dir/build.make:219: /home/alphayed/ROS/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc] Error 1
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/image_proc_exe.dir/all] Error 2
make: *** [Makefile:139: all] Error 2
I think the problem is related to opencv3. I removed it from the system and recompiled it from source but that didn't solve the issue. Can you please help?
I have found a fix as per this thread. You need to modify opencv3/cmake/OpenCVDetectVTK.cmake, for every find_package(VTK QUIET COMPONENTS ... add an entry vtkIOGeometry

Wireshark make error: undefined reference to symbol 'g_module_name'

I'm trying to compile wireshark-P2P-1.7.0 but it fails showing the following error:
/usr/bin/ld: gtk/libui.a(libui_a-plugins_dlg.o): undefined reference to symbol 'g_module_name'
//usr/lib/i386-linux-gnu/libgmodule-2.0.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [wireshark] Error 1
make[2]: Leaving directory `/home/sniffer/Desktop/P2P_install/Sigma_Sniffer-P2P-Ubuntu_v8.1.0/wireshark-P2P-1.7.0'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sniffer/Desktop/P2P_install/Sigma_Sniffer-P2P-Ubuntu_v8.1.0/wireshark-P2P-1.7.0'
make: *** [all] Error 2
I'm not sure if it requires special libraries to run on a 64bit processor since this version of wireshark is 32 bit.
I cannot use a standard version of wireshark or download it from anywhere else. I have to use this one because is specially configure to make WFA tests.
Thank you!!
Oscar.
The only way a source code version of Wireshark would "[be] 32 bit" would be if somebody had added code to it that assumed that long or pointer data types were 32-bit; no code in the Wireshark source from wireshark.org is "32 bit" or "64 bit", it's all portable (and the Wireshark build infrastructure builds and tests both 32-bit and 64-bit versions).
What it does need is a version of GLib that includes g_module_name(), and you need to be linking with GLib (Wireshark uses it).

I cannot obtain the rpm of ContextBroker

I have tried to obtain the rpm associated to ContextBroker component (https://github.com/telefonicaid/fiware-orion.git) but I have obtained the following error after executing make rpm.
[ 98%] Building CXX object src/lib/mongoBackend/CMakeFiles/mongoBackend.dir/mongoNotifyContextAvailability.cpp.o
Linking CXX static library libmongoBackend.a
make[4]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
[ 98%] Built target mongoBackend
make[3]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next/BUILD_RELEASE'
make[1]: *** [release] Error 2
make[1]: Leaving directory `/home/develenv/app/jenkins/config-history/jobs/ContextBroker-Build/fiware-orion/rpm/BUILD/contextBroker-0.14.1_next'
error: Bad exit status from /var/tmp/rpm-tmp.NPtnCN (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.NPtnCN (%build)
make: *** [rpm] Error 1
Previously to this stage I compiled and executed the unit tests as well as functional tests with no problems I am working on Red Hat 4.4.7-3 with repo/branch:
https://github.com/telefonicaid/fiware-orion/tree/release/iotplatform-v1
Thanks for your help
UPDATE:
The linux distribution used was CentOS 6.4
This problems is solved if you install cantcoap and COAP client, as described in the Orion README.md file, then execute make rpm.
Note that although COAP stuff is optional to build the code itself with make release or make debug the RPM building target needs them by the time being (we probably fix this in the future).
UPDATE: the fix of the RPM makefile target is being dealed at this Github.com issue: https://github.com/telefonicaid/fiware-orion/issues/579

llvm/clang compile error with Memory exhausted

I am trying to build the latest llvm/clang code on my ubuntu 14.04 vm, which has 2GB memory.
What I did is a normal configure/make procedure, without any parameters to these two commands.
at last, I have the following error:
llvm[4]: Linking Debug+Asserts executable clang
/usr/bin/ld: failed to set dynamic section sizes: Memory exhausted
collect2: error: ld returned 1 exit status
make[4]: *** [/home/alex/Downloads/llvm_build/Debug+Asserts/bin/clang] Error 1
make[4]: Leaving directory /home/alex/Downloads/llvm_build/tools/clang/tools/driver'
make[3]: *** [driver/.makeall] Error 2
make[3]: Leaving directory/home/alex/Downloads/llvm_build/tools/clang/tools'
make[2]: * [all] Error 1
make[2]: Leaving directory /home/alex/Downloads/llvm_build/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory/home/alex/Downloads/llvm_build/tools'
make: *** [all] Error 1
Does anyone know how to resolve this?
You need to do one of the following:
Add more RAM to your VM, or
Use gold instead of ld as a linker, or
Build Release(-DCMAKE_BUILD_TYPE=Release), not Debug build
Another consideration: If you have Make running parallel jobs (e.g., make -j8), the concurrently executing jobs may require too much memory.

Resources