【SEP4020】cross compile libdmtx 中出现的问题

由于自己的开发板的根文件系统放在/work/nfs_root/cmt_root/下,所以在之前已经把ImageMagick交叉编译到/work/nfs_root/cmt_root/usr/local下,接下来开始编译libdmtx,在使用

./configure --host=arm-linux的时候

一直遇到de>configure: error: dmtxread/dmtxwrite requires Wand >= 6.2.4这个问题,始终得不到解决,后来看了它的configure文件的内容,de>

 if test -n "$MAGICK_LIBS"; then
    pkg_cv_MAGICK_LIBS="$MAGICK_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && /
    { ($as_echo "$as_me:$LINENO: /$PKG_CONFIG --exists --print-errors /"Wand >= 6.2.4/"") >&5
  ($PKG_CONFIG --exists --print-errors "Wand >= 6.2.4") 2>&5
  ac_status=$?
  $as_echo "$as_me:$LINENO: /$? = $ac_status" >&5
  (exit $ac_status); }; then
  pkg_cv_MAGICK_LIBS=`$PKG_CONFIG --libs "Wand >= 6.2.4" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi

 

虽然不是看得很懂,但是隐约感觉到和PKG_CONFIG有关,于是自己添加了个变量:

./configure --host=arm-linux PKG_CONFIG=/work/nfs_root/cmt_root/usr/local/lib/pkgconfig,结果提示PKG_CONFIG是一个目录,无法执行,于是有参考了网上的这篇文章,把PKG_CONFIG改为PKG_CONFIG_PATH,问题得到解决,可以交叉编译

 

Some Ubuntu users have reported an issue where the ImageMagick Wand API is missing from the normal pre-built packages. If libdmtx's "./configure" throws the following error, you might be one of the unlucky people who need to install ImageMagick from source.

de>checking for MAGICK... no
configure: error: dmtxread/dmtxwrite requires Wand >= 6.2.4de>

But don't give up hope yet. First make sure the ImageMagick runtime and development packages are installed (ImageMagick, libmagick, ImageMagick-devel, libmagick-dev, or something like that depending on your OS). If that doesn't fix the problem, try finding a file named "Wand.pc" somewhere on your computer, point the PKG_CONFIG_PATH environment variable to that directory, and re-run "./configure".

de>$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/  # Replace with directory that holds Wand.pc
$ ./configurede>

If "./configure" still won't run, you probably need to compile ImageMagick from source.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值