如何针对旧版本的库配置/ make / install? [英] How do I configure/make/install against an older version of a library?

查看:231
本文介绍了如何针对旧版本的库配置/ make / install?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要安装一个软件( moddims ),这取决于Imagemagick 6.3.9+ - 我试着安装最新版本的ImageMagick(6.5.4-5),但得到以下错误,当我尝试makemoddims:

I'm trying to install a piece of software (moddims) that depends on "Imagemagick 6.3.9+" - I tried installing the latest version of ImageMagick (6.5.4-5) but 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’

假设函数签名在ImageMagick 6.3.9和当前版本之间发生了变化。

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

我想尝试安装moddims对旧版本的ImageMagick - 但我想安装ImageMagick 6.3.9,而不干扰已经安装的6.5.4-5版本。

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

什么./configure咒语可以用于a)安装旧版本的ImageMagick,以不会覆盖或干扰我的现代版本,b)编译moddims以使用旧版本?

What ./configure incantations can I use to a) install the older version of ImageMagick in such a way that it won't over-write or otherwise interfere with my modern version and b) compile moddims to use that older version?

我在OSX上,但我预计有同样的问题,当我以后需要在Linux生产服务器上安装moddims。

I'm on OSX, but I anticipate having the same problem for when I later need to install moddims on a Linux production server.

推荐答案

显然,您必须获取,编译并安装旧版ImageMagick。

Clearly, you have to obtain, compile and install the older version of ImageMagick.

这个问题 - 特别是因为它是在一个实验阶段(你不知道肯定你想保持这个版本的ImageMagick周围) - 我会:

Faced with this problem - especially since it is at an experimental phase (you don't know for sure you want to keep this version of ImageMagick around) - I would:


  • 创建一个新目录以安装ImageMagick:

  • Create a new directory to install ImageMagick:

/opt/ImageMagick


  • 配置ImageMagick 6.3.9以安装在其中 - 可能:

  • Configure ImageMagick 6.3.9 to install in there - probably:

    ./configure --prefix=/opt/ImageMagick
    


  • Build, test, and install it.

    配置moddims以在标准位置之前查找ImageMagick位置:

    Configure moddims to look in the ImageMagick location before standard places:

    export LDFLAGS=-L/opt/ImageMagick/lib
    export CPPFLAGS=-I/opt/ImageMagick/include
    ./configure ....
    


  • 检查生成的moddims代码是否使用您喜欢的库: p>

  • Check that the produced moddims code uses your preferred libraries:

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


  • 第一个检查将是做moddims编译配置时;如果没有,你可能使用'标准'版本的moddims头文件,尽管这样做是为了避免这样做。

    The first check will be "does moddims compile when configured"; if it doesn't, you are probably using the 'standard' version of the moddims header file despite this attempt to avoid doing so.

    还可能有 configure 选项来指定ImageMagick库应该从哪里获取 - 使用' ./ configure --help ' ' grep -i image configure ')。

    There might also be configure options to specify where the ImageMagick library should be pulled from - check with './configure --help' (and/or 'grep -i image configure').

    这篇关于如何针对旧版本的库配置/ make / install?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆