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

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.

Related

When trying to build Halide on Linux system with llvm-10.0 on release/10.x and master branches, facing the below issue

[ 53%] Linking CXX executable test_function_dag
/bin/ld: ../../libHalide.so.10.0.0: undefined reference to `typeinfo for llvm::SectionMemoryManager'
collect2: error: ld returned 1 exit status
make[2]: *** [src/autoschedulers/adams2019/CMakeFiles/test_function_dag.dir/build.make:134: src/autoschedulers/adams2019/test_function_dag] Error 1
make[1]: *** [CMakeFiles/Makefile2:2328: src/autoschedulers/adams2019/CMakeFiles/test_function_dag.dir/all] Error 2
make: *** [Makefile:182: all] Error 2
I'm using pre-built LLVM binaries and below cmake command to configure
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_DIR=/home/harry/llvm/lib/cmake/llvm ../
Any advice and suggestions will be greatly appreciated.
I cloned Halide from release/10.x, and compiled against the LLVM 10.0.0 binaries obtained here. On Ubuntu 20.04 LTS, I had to also apt install libtinfo5 because these binaries are built against old system libraries.
I noticed that the official binaries are not built with RTTI enabled (ugh) and was able to repro and fix. There's a bug in dependencies/llvm/CMakeLists.txt. Find the line that reads:
$<$<COMPILE_LANG_AND_ID:CXX,GCC,Clang,AppleClang>:-fno-rtti>)
and change GCC to GNU. We don't test with non-RTTI LLVM, which is why this wasn't caught.

Failed OpenCV install unable to uninstall

While installing opencv_contrib (during make -j5 step), my laptop went to sleep and gave errors on the install, failing with a fatal error.
Retrying make -j5 gave the same error again. trying to uninstall opencv completely using make uninstall also completely fails with a fatal error.
How do I do a fresh install of OpenCV from here?
Error on running make uninstall:
-- Uninstalling "/usr/local/include/opencv2/cvconfig.h"
CMake Error at cmake_uninstall.cmake:20 (MESSAGE):
Problem when removing "/usr/local/include/opencv2/cvconfig.h"
CMakeFiles/uninstall.dir/build.make:57: recipe for target
'CMakeFiles/uninstall' failed
make[3]: *** [CMakeFiles/uninstall] Error 1
CMakeFiles/Makefile2:296: recipe for target
'CMakeFiles/uninstall.dir/all' failed
make[2]: *** [CMakeFiles/uninstall.dir/all] Error 2
CMakeFiles/Makefile2:303: recipe for target
'CMakeFiles/uninstall.dir/rule' failed
make[1]: *** [CMakeFiles/uninstall.dir/rule] Error 2
Makefile:234: recipe for target 'uninstall' failed
make: *** [uninstall] Error 2
You should try make clean and try to uninstall again. Also you should restart from previous steps for opencv installing
You can't directly delete files from usr/local/...etc so you try giving sudo make uninstall it will work fine!

Error while running ORB_SLAM2 Library

As per requirement mentioned in this link, I have installed all the required components like Pangolin, OpenCV etc...Now after building the ORB_SLAM2 library, I am getting the following error...
make[2]: *** No rule to make target `/usr/lib/libOpenNI.so', needed by `../lib/libORB_SLAM2.so'. Stop.
make[2]: *** Waiting for unfinished jobs....
I am unable to resolve the bug..please help with a solution. Thank you.
Maybe you can install OpenNI:
sudo apt-get install libOpenNI-dev

OpenCV installation issue on mac mavericks

So yesterday CleanMyMac destroyed some system files of mavericks, I repaired (reinstalled) mavericks and after that I got an error from Xcode that "assert.h" cannot be found. So I figured I install command line tools with "xcode-select --install" which I have no idea if it has solved my issue or not, and then I noticed all opencv libraries can not be found too.
I uninstalled OpenCV with "brew unisntall opencv"
I have been trying to reinstall it ever since but I had No luck.
Running "brew install opencv" tells me :
==> make
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/algorithm.cpp.o] Error 1
1 error generated.
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/array.cpp.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2
Unfortunately I don't know what to do with this error,
I used cmake -j8 and I got:
[ 6%] Building C object 3rdparty/libjpeg/CMakeFiles/libjpeg.dir/transupp.c.o
Linking C static library ../lib/liblibjpeg.a
[ 6%] Built target libjpeg
make: *** [all] Error 2
I tried what was my last hope, "sudo port install opencv" and I get :
Computing dependencies for opencvError: Unable to execute port: can't read "configure.cxx_stdlib": no such variable
I tried selfupdate for macports but it doesnt work either.
so now Im stuck does anybody have any idea? it would be much appreciated.
ps I have assigned my user as the owner of /usr/local just in case: "sudo chown -R $User /usr/local"
I finally fixed it,
my Xcode was 5.1 and I was trying to avoid the upgrade, but as I ran out of options, I updated to Xcode 6 and after that "brew update" found few updates and then "brew install opencv" worked like it should have done in the first place.

OpenCV, Ubuntu 11.04

I've been trying to install OpenCV 2.2 on Ubuntu 11.04. As far as I can gather from here: linux/videodev.h : no such file or directory - OpenCV on ubuntu 11.04, the installation fails because video4linux is no longer in the kernel. If I follow the guide linked to in the above thread (http://tech.groups.yahoo.com/group/OpenCV/message/79758), the make-command passes the initial error described in the above thread, but fails at a later point. I get the error:
Linking CXX executable ../../bin/opencv_createsamples
../../lib/libopencv_highgui.so.2.2.0: undefined reference to `cvCreateCameraCapture_V4L(int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/opencv_createsamples] Error 1
make[1]: *** [modules/haartraining/CMakeFiles/opencv_createsamples.dir/all] Error 2
make: *** [all] Error 2
This error also seems related to video4linux.
Any suggestions?
Thanks a bunch,
Andreas Møgelmose
You may find this blog post useful:
http://salikscodingblog.wordpress.com/2011/08/05/compiling-opencv-2-on-ubuntu/

Resources