Page 1 of 1

Building IM 7 from SVN trunk fails on OSX 10.9.5

Posted: 2014-12-22T11:40:53-07:00
by pipitas
I checked out https://subversion.imagemagick.org/subv ... gick/trunk

This system is OS X 10.9.5 with lots of current MacPorts packages installed (which install everything into '/opt/local').

The first time I wanted to build it, I started with many custom options added to './configure'. After this failed, I reduced to simple './configure' with no option what-so-ever, so it would use the defaults. This is the result:

Code: Select all

ImageMagick is configured as follows. Please verify that this configuration
matches your expectations.

Host system type: x86_64-apple-darwin13.4.0
Build system type: x86_64-apple-darwin13.4.0

                  Option                        Value
-------------------------------------------------------------------------------
Shared libraries  --enable-shared=yes		yes
Static libraries  --enable-static=yes		yes
Module support    --with-modules=no		no
GNU ld            --with-gnu-ld=no		no
Quantum depth     --with-quantum-depth=16	16
High Dynamic Range Imagery
                  --enable-hdri=yes		yes

Delegate Library Configuration:
BZLIB             --with-bzlib=yes		yes
Autotrace         --with-autotrace=no		no
DJVU              --with-djvu=yes		yes
DPS               --with-dps=yes		no
FFTW              --with-fftw=yes		yes
FlashPIX          --with-fpx=yes		no
FontConfig        --with-fontconfig=yes		yes
FreeType          --with-freetype=yes		yes
Ghostscript lib   --with-gslib=no		no
Graphviz          --with-gvc=no		
JBIG              --with-jbig=yes		yes
JPEG v1           --with-jpeg=yes		yes
JPEG-2000         --with-jp2=		
LCMS v1           --with-lcms=no		no
LCMS v2           --with-lcms2=yes		yes
LIBJPEG2          --with-openjp2=yes	yes
LQR               --with-lqr=yes		yes
LTDL              --with-ltdl=yes		no
LZMA              --with-lzma=yes		yes
Magick++          --with-magick-plus-plus=yes	yes
OpenEXR           --with-openexr=yes		yes
PANGO             --with-pango=yes		yes
PERL              --with-perl=no		no
PNG               --with-png=yes		yes
RSVG              --with-rsvg=no		no
TIFF              --with-tiff=yes		yes
WEBP              --with-webp=yes		yes
WMF               --with-wmf=no		no
X11               --with-x=			yes
XML               --with-xml=yes		yes
ZLIB              --with-zlib=yes		yes

Delegate Program Configuration:
GhostPCL          None				pcl6 (unknown)
GhostXPS          None				gxps (unknown)
Ghostscript       None				gs (9.16)

Font Configuration:
Apple fonts       --with-apple-font-dir=default	
Dejavu fonts      --with-dejavu-font-dir=default	none
Ghostscript fonts --with-gs-font-dir=default	/usr/local/share/ghostscript/fontsx/
Windows fonts     --with-windows-font-dir=default	none

X11 Configuration:
      X_CFLAGS        = -I/opt/local/include
      X_PRE_LIBS      = -lSM -lICE
      X_LIBS          = -L/opt/local/lib
      X_EXTRA_LIBS    = 

Options used to compile and link:
  PREFIX          = /usr/local
  EXEC-PREFIX     = /usr/local
  VERSION         = 7.0.0
  CC              = gcc
  CFLAGS          = -D_THREAD_SAFE -I/opt/local/include/OpenEXR -I/opt/local/include/lqr-1 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/openjpeg-2.1 -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -g -O2 -Wall -march=corei7-avx -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
  CPPFLAGS        = -D_REENTRANT -I/opt/local/include/pango-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include -I/opt/local/include/libxml2
  PCFLAGS         = 
  DEFS            = -DHAVE_CONFIG_H
  LDFLAGS         = -L/opt/local/lib -L/opt/local/lib
  LIBS            = 
  CXX             = g++
  CXXFLAGS        = -g -O2 -D_THREAD_SAFE -pthread
  FEATURES        = DPC HDRI
  DELEGATES       = bzlib djvu mpeg fftw fontconfig freetype jbig jng jpeg lcms lqr lzma openexr openjp2 pango png ps tiff webp x xml zlib
Running 'make' yields this result:

Code: Select all

[....]
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-yuv.lo
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-djvu.lo
coders/djvu.c:963:38: warning: illegal character encoding in string literal [-Winvalid-source-encoding]
  entry->description=AcquireString("D<E9>j<E0> vu");
                                     ^~~~ ~~~~
1 warning generated.
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-exr.lo
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-jbig.lo
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-jpeg.lo
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-jp2.lo
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-png.lo
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-ept.lo
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-tiff.lo
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-webp.lo
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-x.lo
  CC       coders/MagickCore_libMagickCore_7_Q16HDRI_la-xwd.lo
  CC       filters/MagickCore_libMagickCore_7_Q16HDRI_la-analyze.lo
  CCLD     MagickCore/libMagickCore-7.Q16HDRI.la
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-pthread'
Undefined symbols for architecture x86_64:
  "_opj_create_compress", referenced from:
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_create_decompress", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_decode", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_destroy_codec", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_destroy_cstr_index", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_encode", referenced from:
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_end_compress", referenced from:
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_end_decompress", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_get_decoded_tile", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_image_create", referenced from:
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_image_destroy", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_read_header", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_set_decode_area", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_set_default_decoder_parameters", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_set_default_encoder_parameters", referenced from:
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_set_error_handler", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_set_warning_handler", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_setup_decoder", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_setup_encoder", referenced from:
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_start_compress", referenced from:
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_stream_create", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_stream_destroy", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_stream_set_read_function", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_stream_set_seek_function", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_stream_set_skip_function", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_stream_set_user_data", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_stream_set_user_data_length", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_stream_set_write_function", referenced from:
      _ReadJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
      _WriteJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
  "_opj_version", referenced from:
      _RegisterJP2Image in MagickCore_libMagickCore_7_Q16HDRI_la-jp2.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [MagickCore/libMagickCore-7.Q16HDRI.la] Error 1
make: *** [all] Error 2
My compiler is this version:

Code: Select all

kp@mbp:svn.imagemagick.trunk > gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
I'm at a loss about what I could do.

Any ideas?

Re: Building IM 7 from SVN trunk fails on OSX 10.9.5

Posted: 2014-12-22T12:46:56-07:00
by fmw42

Re: Building IM 7 from SVN trunk fails on OSX 10.9.5

Posted: 2014-12-22T14:15:00-07:00
by pipitas
fmw42 wrote:Why do you need to build from SVN.
Why not? :-)

Seriously -- I have my reasons:
  • I do miss a certain delegate, or functionality after a short while every time I installed ready-made packages -- be it on Linux, Windows or Mac OS X;
  • I want to play with a few of the more "unusual" delegates;
  • I want to follow the new developments and feature addtions.
Convinced now? :-)
I'll have to check, especially the last one, if I find anything in there that would help me.

Re: Building IM 7 from SVN trunk fails on OSX 10.9.5

Posted: 2014-12-22T14:49:08-07:00
by pipitas
I'm wondering about this output from my './configure' call:

Code: Select all

JPEG-2000         --with-jp2=
OpenJP2           --with-openjp2=yes		yes
Why doesn't '--with-jp2=' say "yes" or "no"? Why is it empty?

OTOH, the 'build' stage later leads to this error message:

Code: Select all

make[2]: *** [coders/magick_libMagickCore_6_Q16_la-jp2.lo] Error 1
So I'm wondering if IM somehow picked up the wrong 'jp2' lib?

Re: Building IM 7 from SVN trunk fails on OSX 10.9.5

Posted: 2014-12-22T14:56:23-07:00
by snibgo
"--with-jp2=" is deprecated, I think.

If I read your output correctly, the problems are when linking analyze.c. There is a file with this name in \share\doc\ImageMagick-6\www\source.

All other .c files in that directory are complete programs, but analyze.c isn't, so will compile but won't link. (See my http://im.snibgo.com/compdemo.htm )

I don't know if this might help.

Re: Building IM 7 from SVN trunk fails on OSX 10.9.5

Posted: 2014-12-22T16:02:49-07:00
by pipitas
I did re-run './configure', this time adding '-with-jp2=no'. Here is (part of) the configure output:

Code: Select all

JBIG              --with-jbig=yes		yes
JPEG v1           --with-jpeg=yes		yes
JPEG-2000         --with-jp2=no		
LCMS v1           --with-lcms=no		no
LCMS v2           --with-lcms2=yes		yes
This time the result is no more empty, but clearly says '--with-jp2=no'. However, 'make' is still running into the same problem.

Re: Building IM 7 from SVN trunk fails on OSX 10.9.5

Posted: 2014-12-22T16:16:32-07:00
by fmw42
jp2 is associated with the Jasper delegate library, which IM no longer uses nor checks. So that is why it does not say no. IM now uses OpenJpeg for its delegate for jp 2000 files, since it has more flexibility with respect to more current format of jp 2000. Older versions of IM do still use Jasper. I believe you need OpenJpg 2.0.1, if I recall correctly.

Re: Building IM 7 from SVN trunk fails on OSX 10.9.5

Posted: 2014-12-23T01:26:12-07:00
by pipitas
fmw42 wrote:IM now uses OpenJpeg for its delegate for jp 2000 files, since it has more flexibility with respect to more current format of jp 2000. Older versions of IM do still use Jasper. I believe you need OpenJpg 2.0.1, if I recall correctly.
I have it:

Code: Select all

LIBJPEG2          --with-openjp2=yes   yes
My OpenJPEG is even more recent than 2.0.1:

Code: Select all

kp@mbp:svn.imagemagick.trunk > port installed openjpeg
The following ports are currently installed:
  openjpeg @2.1.0_0+universal (active)

Re: Building IM 7 from SVN trunk fails on OSX 10.9.5

Posted: 2014-12-23T10:37:36-07:00
by fmw42
I could have been wrong about 2.0.1 and it might have been 2.1.0