在Mac上安装Jmagick-6.6.9时,没有生成.dylib



我正在努力在OSX 10.8(Mountain Lion)上安装一个依赖于Jmagick(和ImageMagick)的现有Java应用程序。 当我构建 Jmagick 6.6.9 时,它成功生成了 .so,但没有生成 .dylib 文件。 知道为什么会这样吗? 这是配置和安装的输出。

> ./configure --prefix=/Users/mr/m4/support/jmagick/darwin/current --with-magick-home=/usr/local/Cellar/imagemagick
checking build system type... i686-apple-darwin12.2.0
checking host system type... i686-apple-darwin12.2.0
checking target system type... i686-apple-darwin12.2.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking for getconf... /usr/bin/getconf
checking whether large file support needs explicit enabling... no
checking for X... libraries /usr/X11/lib, headers /usr/X11/include
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking jni.h usability... yes
checking jni.h presence... yes
checking for jni.h... yes
checking for java... /Users/mr/m4/support/java/darwin/current/bin/java
checking for javac... /Users/mr/m4/support/java/darwin/current/bin/javac
checking for javah... /Users/mr/m4/support/java/darwin/current/bin/javah
checking for jar... /Users/mr/m4/support/java/darwin/current/bin/jar
checking for javadoc... /Users/mr/m4/support/java/darwin/current/bin/javadoc
checking for MagickCore-config... /usr/local/bin/MagickCore-config
checking magick/api.h usability... yes
checking magick/api.h presence... yes
checking for magick/api.h... yes
checking for ConstituteImage in -lMagick... no
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by gcc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgfortran... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking for nagfor... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common
checking if gcc PIC flag -fno-common works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin12.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
rm: conftest.dSYM: is a directory
checking for ld used by g++... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
checking whether the g++ linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... rm: conftest.dSYM: is a directory
yes
checking if g++ supports -c -o file.o... rm: conftest.dSYM: is a directory
yes
checking whether the g++ linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin12.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
configure: creating ./config.status
config.status: creating Make.def

并进行安装

> make install
/usr/bin/install -c -d /Users/mr/m4/support/jmagick/darwin/current/lib
/usr/bin/install -c /Users/mr/m4/support/jmagick/trunk/lib/jmagick-6.6.9.jar /Users/mr/m4/support/jmagick/darwin/current/lib
Installing /Users/mr/m4/support/jmagick/trunk ...
make[1]: Entering directory `/Users/mr/m4/support/jmagick/trunk/src'
Installing /Users/mr/m4/support/jmagick/trunk/src ...
make[2]: Entering directory `/Users/mr/m4/support/jmagick/trunk/src/magick'
/usr/bin/install -c -d /Users/mr/m4/support/jmagick/darwin/current/lib
/bin/sh /Users/mr/m4/support/jmagick/trunk/libtool --mode=install /usr/bin/install -c /Users/mr/m4/support/jmagick/trunk/lib/libJMagick-6.6.9.so /Users/mr/m4/support/jmagick/darwin/current/lib
/usr/bin/install -c /Users/mr/m4/support/jmagick/trunk/lib/libJMagick-6.6.9.so /Users/mr/m4/support/jmagick/darwin/current/lib/libJMagick-6.6.9.so
Installing /Users/mr/m4/support/jmagick/trunk/src/magick ...
make[3]: Entering directory `/Users/mr/m4/support/jmagick/trunk/src/magick/util'
Installing /Users/mr/m4/support/jmagick/trunk/src/magick/util ...
make[3]: Leaving directory `/Users/mr/m4/support/jmagick/trunk/src/magick/util'
Using install_name_tool...
make[2]: Leaving directory `/Users/mr/m4/support/jmagick/trunk/src/magick'
make[1]: Leaving directory `/Users/mr/m4/support/jmagick/trunk/src'

输出文件:

> pwd
/Users/mr/m4/support/jmagick/darwin/current
> ls -AR
lib
./lib:
jmagick-6.6.9.jar   libJMagick-6.6.9.so libJMagick.so

Imagemagic6.6.9-10是使用Homebrew安装的:

> brew info imagemagick
imagemagick: stable 6.6.9-10, HEAD
http://www.imagemagick.org
Depends on: jpeg, libtiff, little-cms, jasper
/usr/local/Cellar/imagemagick/6.6.9-10 (1394 files, 32M) *
https://github.com/mxcl/homebrew/commits/master/Library/Formula/imagemagick.rb

你也应该做这样的东西:sudo ln -s/Path/to/libJMagick.so/Path/to/Java/Extensions/libJMagick.dyliblibJMagick-6.6.9.so 也一样将其添加到您的项目中并尝试运行。

相关内容

  • 没有找到相关文章

最新更新