![]() |
カレッヂ |
質問者 rescue
投稿日 2004/3/1(月) 16:31:44
お世話になっています。あるサーバにImageMagickを入れようとしているんですが、 JPEGライブラリが入っていなかったので使えませんでした。GIFはOK。 PNGも駄目でしたが、libpng-1.2.5.tar.gzを別途インストールしたらOKでした。 しかし、jpegsrc.v6.tar.gzを別途インストールしても予備審査(configure)でOKに なりませんでした。googleでインストールログをいろいろ見て、 ImageMagick-5.3.6/scriptsに展開しても、展開したあとに make installしても、ImageMagick-5.3.6/jpegに同様にしても、いろいろ場所や 方法を変えても、どうしてもOKになりません。どこをどうすればいいでしょうか? 詳しい方よろしくおねがいします。 # uname -a 2.4.20-20.8-i686 i386 GNU/Linux # ./configure (中略) ImageMagick is configured as follows. Please verify that this configuration matches your expectations. Host system type : i686-pc-linux-gnu Option Configure option Configured value ---------------------------------------------------------- Shared libraries --enable-shared=no no Static libraries --enable-static=yes yes GNU ld --with-gnu-ld=yes Ghostscript None yes LZW support --enable-lzw=no no 16 bit pixels --enable-16bit-pixel=yes yes Magick++ --with-magick-plus-plus=yes yes PERL --with-perl=yes /usr/local/bin/perl BZLIB --with-bzlib=yes no DPS --with-dps=yes yes FlashPIX --with-fpx=yes no Ghostscript lib --with-gslib=yes no (failed tests) HDF --with-hdf=yes no JBIG --with-jbig=yes no JPEG --with-jpeg=yes no (failed tests) LCMS --with-lcms=yes no PNG --with-png=yes yes TIFF --with-tiff=yes no FreeType 2.0 --with-ttf=yes no TTF Path --with-ttf-fontpath= "" XML --with-xml=yes no (failed tests) WMF --with-wmf=yes no (failed tests) ZLIB --with-zlib=yes yes X11 --with-x= yes X11 Configuration: X_CFLAGS = -I/usr/X11R6/include X_PRE_LIBS = -lSM -lICE X_LIBS = -L/usr/X11R6/lib X_EXTRA_LIBS = Options used to compile and link: CC = gcc CFLAGS = -g -O2 -Wall CPPFLAGS = -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/home/homepage/src/ImageMagick-5.3.6/jpeg -I/home/homepage/src/ImageMagick-5.3.6/png -I/usr/local/include -I/usr/X11R6/include -I/usr/X11R6/include/X11 CXX = g++ CXXFLAGS = -g -O2 LDFLAGS = -L/home/homepage/src/ImageMagick-5.3.6/jpeg -L/home/homepage/src/ImageMagick-5.3.6/png -L/usr/local/lib -L/usr/X11R6/lib LIBS = -lpng -ldpstk -ldps -lXext -lXt -lSM -lICE -lX11 -lz -lpthread -lm
プロバイダ参照: |
回答者 ヤミー
[削除]
投稿日 2004/3/1(月) 20:52:21
ただconfigureしただけでは、ダメだと思います。 CPPFLAGS, LDFLAGSをきちんとjpegのヘッダファイル、ライブラリのある場所を設定してからconfigureすればよいかと思います。 また、--enable-shared=yes --enable-static=noに私はしてます。 ちなみに、私の試した環境は、 % env CPPFLAGS="-I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -r/X11R6/include/X11 -I/usr/local/include -I/usr/include" LDFLAGS="-L/usr/X11ib -L/usr/local/lib" LIBS="-lfreetype -ldpstk -ldps -lXext -lSM -lICE -lX11 2 -lz -lm -ljpeg" ./configure -with-jpeg=yes --enable-shared=yes --enable-st=no Host system type : i386-unknown-freebsd5.2 Option Configure option Configured value ----------------------------------------------------------------- Shared libraries --enable-shared=yes yes Static libraries --enable-static=no no GNU ld --with-gnu-ld=yes yes LZW support --enable-lzw=no no Quantum depth --with-quantum-depth=16 16 Delegate Configuration: BZLIB --with-bzlib=yes yes DPS --with-dps=yes yes EXIF --with-exif=yes yes FlashPIX --with-fpx=yes yes FreeType 2.0 --with-ttf=yes yes Ghostscript None /usr/local/bin/gs (7.06) Ghostscript fonts --with-gs-font-dir=default /usr/local/share/ghostscriptts/ Ghostscript lib --with-gslib=no no JBIG --with-jbig=yes yes JPEG v1 --with-jpeg=yes yes JPEG-2000 --with-jp2=yes yes LCMS --with-lcms=yes yes Magick++ --with-magick-plus-plus=yes yes PERL --with-perl=yes /usr/bin/perl PNG --with-png=yes yes TIFF --with-tiff=yes yes Windows fonts --with-windows-font-dir= none WMF --with-wmf=yes yes X11 --with-x= yes XML --with-xml=yes yes ZLIB --with-zlib=yes yes X11 Configuration: X_CFLAGS = -I/usr/X11R6/include X_PRE_LIBS = -lSM -lICE X_LIBS = -L/usr/X11R6/lib X_EXTRA_LIBS = Options used to compile and link: CC = gcc CFLAGS = -g -O2 -Wall CPPFLAGS = -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include/freetype2 -r/X11R6/include -I/usr/X11R6/include/X11 -I/usr/local/include -I/usr/includeusr/X11R6/include -I/usr/X11R6/include/X11 -I/usr/local/include/libxml2 CXX = g++ CXXFLAGS = -g -O2 LDFLAGS = -L/usr/X11R6/lib -L/usr/local/lib -L/usr/X11R6/lib -L/usr/X11R6 -L/usr/local/lib LIBS = -ljbig -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -lfpx -le-lwmflite -ldpstk -ldps -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm |
回答者 ヤミー
[削除]
投稿日 2004/3/1(月) 20:56:43
見ずらくて申しわけないです。 訂正です。 >% env CPPFLAGS="-I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -r/X11R6/include/X11 \ -I/usr/local/include -I/usr/include" LDFLAGS="-L/usr/X11ib -L/usr/local/lib" \ LIBS="-lfreetype -ldpstk -ldps -lXext -lSM -lICE -lX11 2 -lz -lm -ljpeg" \ ./configure -with-jpeg=yes --enable-shared=yes --enable-st=no % env CPPFLAGS="-I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -I/X11R6/include/X11 \ -I/usr/local/include -I/usr/include" LDFLAGS="-L/usr/X11ib -L/usr/local/lib" \ ./configure -with-jpeg=yes --enable-shared=yes --enable-st=no |
質問者 rescue
[削除]
投稿日 2004/3/1(月) 21:03:36
早速ありがとうございます。 pngの方は何もしないのに有効になったので、どうも不思議でした。 実は内臓されていたImageMagicでコマンドレベルでconvertとか使えたので、 Perlモジュールではなく `convert $in $out` という原始的な方法で対応するように 方針を変えていました。 やっぱPerlMagickを使ったほうが便利なので、是非もう一度試みてみます! 結果はまた報告するとして、まずはお礼まで。 |
質問者 rescue
[削除]
投稿日 2004/3/1(月) 22:15:08
結果からいうと駄目でした。どこか抜けがあるかもしれません。 具体的な手順は… # tar -zxvf ImageMagick-5.3.6.tar.gz # cd ImageMagick-5.3.6 # cp ../jpegsrc.v6.tar.gz ./ # tar -zxvf jpegsrc.v6.tar.gz # mv jpeg-6 jpeg # cd jpeg # ./configure # make # make install install-lib # cd .. # env CPPFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/home/homepage/src/ImageMagick-5.3.6/jpeg \ > -I/home/homepage/src/ImageMagick-5.3.6/png -I/usr/local/include -I/usr/X11R6/include \ > -I/usr/X11R6/include/X11 -I/usr/include" LDFLAGS="-L/home/homepage/src/ImageMagick-5.3.6/jpeg \ > -L/home/homepage/src/ImageMagick-5.3.6/png -L/usr/local/lib -L/usr/X11R6/lib" \ > LIBS="-lpng -ldpstk -ldps -lXext -lXt -lSM -lICE -lX11 -lz -lpthread -lm -ljpeg" ./configure --enable-shared=yes PNGはOKですがJPEGの結果はNGでした。ImageMagick-5.3.6配下のjpegを指定すれば いいかなとは思いますが、どうも駄目なようでした。もう少し四苦八苦してみます。 |
回答者 ヤミー
[削除]
投稿日 2004/3/1(月) 22:34:49
すみません。オリジナルのjpeg-6bをただ./configure & make installしたのであれば、ライブラリは*.aしか インストールされなく、--enable-sharedにすると*.soを探すので、--enable-shared=noにしてください。 libjpeg.soがないためかもしれません。普通にdefaultにインストールしたGNU/Linux(Debian系?)なら、 /usr/local/libあたりにlibjpeg.so.*があるかと思いますが。。。dpkg -l | grep jpegかして探して みるのも手かもしれません。 あと、./configureに失敗したら、わたしは、まず、./config.logを見るようにしてます。 少しはヒントになるかと思います。 |
質問者 rescue
[削除]
投稿日 2004/3/2(火) 10:52:04
駄目でした… jpeg-6bは ./configure & make install の他に、install-lib もしました。 # ls -l /usr/local/lib lrwxrwxrwx 1 root root 8 Nov 14 20:47 /usr/local/lib -> /usr/lib # ls -l /usr/lib/libjpeg.so.* lrwxrwxrwx 1 root root 17 Mar 1 02:57 /usr/lib/libjpeg.so.62 -> libjpeg.so.62.0.0 -rwxr-xr-x 1 root root 132054 Mar 1 02:57 /usr/lib/libjpeg.so.62.0.0 ここには在るようです。 ./config.log 見てみました。 It was created by configure, which was! generated by GNU Autoconf 2.50. Invocation command line was! ! $ ./configure --enable-shared=no! ! ## ---------- ##! ## Platform. ##! ## ---------- ##! ! hostname = sv.rescuesolutions.net! uname -m = i686! uname -r = 2.4.20-20.8-i686! uname -s = Linux! uname -v = #1 Thu Oct 2 19:16:43 JST 2003! ! /usr/bin/uname -p = unknown! /bin/uname -X = unknown! ! /bin/arch = i686! /usr/bin/arch -k = unknown! /usr/convex/getsysinfo = unknown! hostinfo = unknown! /bin/machine = unknown! /usr/bin/oslevel = unknown! /bin/universe = unknown! ! PATH = /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/rescue/bin:/usr/local/bin! が冒頭で、やたら多い警告文は cc1: warning: changing search order for system directory "/usr/local/include"! cc1: warning: as it has already been specified as a non-system directory! cc1: warning: changing search order for system directory "/usr/include"! cc1: warning: as it has already been specified as a non-system directory! で…。これが何を意味するのかは分かりません。ちなみに… # ls -l /usr/local/include total 140 drwxr-xr-x 2 root root 4096 Mar 1 17:33 Magick++ -rw-r--r-- 1 root root 389 Mar 1 17:33 Magick++.h -r--r--r-- 1 root root 1776 Mar 1 15:28 PreRvIcccm.h -r--r--r-- 1 root root 10471 Mar 1 15:28 X.h -r--r--r-- 1 root root 1001 Mar 1 15:28 compress.h -r--r--r-- 1 root root 10152 Mar 1 15:28 image.h -rw-r--r-- 1 root root 1254 Mar 1 22:24 jconfig.h -rw-r--r-- 1 root root 13047 Mar 1 22:24 jerror.h -rw-r--r-- 1 root root 11821 Mar 1 22:24 jmorecfg.h -rw-r--r-- 1 root root 43965 Mar 1 22:24 jpeglib.h lrwxrwxrwx 1 root root 8 Mar 1 17:24 libpng -> libpng12 drwxr-xr-x 2 root root 4096 Mar 1 02:28 libpng12 drwxr-xr-x 2 root root 4096 Mar 1 17:33 magick -r--r--r-- 1 root root 4954 Mar 1 15:28 magick.h lrwxrwxrwx 1 root root 14 Mar 1 17:24 png.h -> libpng12/png.h lrwxrwxrwx 1 root root 18 Mar 1 17:24 pngconf.h -> libpng12/pngconf.h -r--r--r-- 1 root root 2130 Mar 1 15:28 utility.h -r--r--r-- 1 root root 1288 Mar 1 15:28 widget.h "/usr/include" にはjpegという文字を含むものはありませんでした。 ちょっと無理かなぁ。 いろいろアドバイスいただいたので、もう少し四苦八苦してみます。 ありがとうございます。 |
返信(回答)する
Web裏技 |