Trying to install G2F, the Ada binding to ImageMagick, on Linux (Ubuntu).
Installed ImageMagick via apt-get.
The G2F install programs "configure", "config_sys", either "cannot find -lMagick" or cannot find the "GetMagickQuantumDepth" object.
Installed ImageMagick from source. The installation triad (./configure, make, make install) doesn't work as documented. They must be prefixed "sudo". Also, the (documented) command must be issued:
sudo ldconfig /usr/local/lib
G2F configure breaks with "cannot find -lMagick".
The following libMagick files exist on my system:
/usr/lib/libMagickCore.so.4
/usr/lib/libMagickWand.so.4.0.1
/usr/lib/libMagickCore.so.4.0.1
/usr/lib/libMagickWand.so.4
/usr/local/lib/libMagick++.la
/usr/local/lib/libMagickWand.so.5.0.0
/usr/local/lib/libMagick++.so
/usr/local/lib/libMagickWand.so
/usr/local/lib/libMagickWand.la
/usr/local/lib/libMagick++.a
/usr/local/lib/libMagickCore.la
/usr/local/lib/libMagickCore.so.5.0.0
/usr/local/lib/libMagickCore.so
/usr/local/lib/libMagickCore.a
/usr/local/lib/libMagickWand.a
/usr/local/lib/libMagickCore.so.5
/usr/local/lib/libMagickWand.so.5
/usr/local/lib/libMagick++.so.5
/usr/local/lib/libMagick++.so.5.0.0
The G2F configure program is a script to build and run the Ada program Config_Sys. (I like this Adaist approach.) So I looked into Config_Sys and changed the line
pragma Linker_Options ("-lMagick");
to
pragma Linker_Options ("-lMagick++");
Now the program builds with
./configure
but does not run, because it's in windows syntax. So I run it manually
./config_sys
It terminates silently. So to verify I added instruments too. It seems terminates normally.
Now make. Error: the process is looking for the wrong path "/opt/Ada/gnat-2006/bin/gnatmake". Edited "Makefile" with the right paths. Same error! Must be other Makefiles. Fixed all Mafekiles. Same error! Looked for occurrences of the wrong path. Oh, there are GNUMakefiles. Fixed. New error: "cannot find -lMagick". We know it should be Magick++. So now we must look for occurrences, change...
/* this process goes on forever and ever and this is why the software crisis is here, not programming, configuration... */
... error "undefined reference to `SetCacheView'"
Seems this ImageMagick function has been deprecated in 2008.
New cache view interfaces to correct shortcommings of original ones. New interfaces are AcquireCacheViewPixels(), AcquireOneCacheViewPixel(), AcquireCacheViewIndexes(), GetCacheViewPixels(), SetCacheViewPixels(), and SyncCacheViewPixels(). The deprecated functions are AcquireCacheView(), GetCacheView(), SetCacheView(), and SyncCacheView().
(http://www.graphicsmagick.org/NEWS.html)
I guess it is now my turn to evolve G2F... Good, I'll be programming:-)... sort of...
I've nullified the offending function and now make terminates normally (?)
and the tests build, but... they crash with "raised G2F_IMCORE.CORE_ERROR : Initialize_Magick failed"
A Linux installation does not require explicit initialization, so I commented it out. Now I get "cache" errors...
I gave up on G2F. I am going to use Netpbm (or ImageMagick, or GraphicsMagick) via command line.
Also
- MagickWand is the recommended interface, instead of MagickCore, so why G2F uses core?
- Magick++ is common to ImageMagick and GraphicsMagick, so maybe this should be the binding (GM is faster).
- This IM/GM fork...
- IM/GM semm too much in flux. I need stability.
Going with good old NetPbm for now.