How do I configure / make / install an older version of the library?

I'm trying to install a piece of software ( moddims ), which depends on "Imagemagick 6.3.9+" - I tried to install the latest version of ImageMagick (6.5.4-5), but I got the following error when I tried to "make" moddims:

mod_dims_ops.c: In function 'dims_smart_crop_operation': mod_dims_ops.c:34: error: too few arguments to function 'ParseGravityGeometry' 

Presumably, the function signature has changed somewhere between ImageMagick 6.3.9 and the current version.

I would like to try installing moddims against the old version of ImageMagick, but I want to install ImageMagick 6.3.9 without interfering with the already installed version 6.5.4-5.

What ./configure spells can be used to: a) install an older version of ImageMagick so that it does not overwrite or interfere with my modern version, and b) compile moddims to use this older version?

I work on OSX, but I expect that I will have the same problem when I later need to install moddims on a Linux production server.

0
source share
2 answers

Obviously, you need to get, compile and install an older version of ImageMagick.

Faced with this problem - especially since it is in the experimental phase (you do not know for sure that you want to save this version of ImageMagick) - I would:

  • Create a new directory for installing ImageMagick:

     /opt/ImageMagick 
  • Configure ImageMagick 6.3.9 to install there - maybe:

     ./configure --prefix=/opt/ImageMagick 
  • Assembly, testing and installation.

  • Configure moddims to view at ImageMagick location to standard locations:

     export LDFLAGS=-L/opt/ImageMagick/lib export CPPFLAGS=-I/opt/ImageMagick/include ./configure .... 
  • Make sure the resulting moddims code uses your preferred libraries:

     otool -L ...moddims-progam-or-library... # MacOS X ldd ...moddims-program-or-library... # Linux, etc. 

The first check will be "compilation of moddims during configuration"; if this is not the case, you are probably using the standard version of the moddims header file, despite this attempt to avoid it.

There may also be configure options to indicate where the ImageMagick library should be extracted - check the " ./configure --help " (and / or " grep -i image configure ") box.

+2
source

Since ImageMagick uses pkg-config. All you have to do is configure PKG_CONFIG_PATH to link to the old version. (It is assumed that your package calls PKG_CHECK_MODULES to configure itself for ImageMagick. If your package does not, you must change it so that it does.)

Basically, you want to grab the old ImageMagick and install it somewhere (e.g. / configure --prefix = $ HOME / obsolete && make install), then go to your package and configure with the argument PKG_CONFIG_PATH = $ HOME / obsolete / Library / pkg-config. Unfortunately, ImageMagick will install files outside the prefix you specify (for example, in / Library / perl), so this does not guarantee that you will not change the current library. (IMO, this is an ImageMagick packaging error.)

See the pkg-config documentation for more details.

+1
source

Source: https://habr.com/ru/post/1388830/


All Articles