Bug 195442

Summary: graphics/ImageMagick build failure when JPEG2000 support is enabled
Product: Ports & Packages Reporter: mail
Component: Individual Port(s)Assignee: Koop Mast <kwm>
Status: Closed FIXED    
Severity: Affects Only Me Flags: mail: maintainer-feedback? (kwm)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description mail 2014-11-27 03:44:32 UTC
# uname -a
FreeBSD blizzard.phoenix 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

# make showconfig | grep 2000
     JPEG2000=on: OpenJPEG 2000 support via openjpeg

# make
===>  Building for ImageMagick-6.9.0.0_1,1
gmake[2]: Entering directory '/usr/ports/graphics/ImageMagick/work/ImageMagick-6.9.0-0'
gmake  all-am
gmake[3]: Entering directory '/usr/ports/graphics/ImageMagick/work/ImageMagick-6.9.0-0'
  CC       coders/magick_libMagickCore_6_Q16_la-jp2.lo   
  CC       coders/magick_libMagickCore_6_Q16_la-tiff.lo  
  CC       coders/magick_libMagickCore_6_Q16_la-x.lo
  CC       coders/magick_libMagickCore_6_Q16_la-ept.lo   
coders/jp2.c:197:8: error: unknown type name 'OPJ_SIZE_T'
static OPJ_SIZE_T JP2ReadHandler(void *buffer,OPJ_SIZE_T length,void *context)
       ^
coders/jp2.c:197:47: error: unknown type name 'OPJ_SIZE_T'
static OPJ_SIZE_T JP2ReadHandler(void *buffer,OPJ_SIZE_T length,void *context)
                                              ^
...

It builds successfully with JPEG2000=off. JPEG2000=on is the default, though.

Thanks,

Regards
Andrew
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-27 03:44:32 UTC
Auto-assigned to maintainer kwm@FreeBSD.org
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-12-23 07:58:19 UTC
A commit references this bug:

Author: kwm
Date: Tue Dec 23 07:57:53 UTC 2014
New revision: 375313
URL: https://svnweb.freebsd.org/changeset/ports/375313

Log:
  Make sure our CPPFLAGS and LDFLAGS get placed at the end of the compiler
  arguments so the compiler finds the openjpeg 2.1 headers before the old
  1.5 header. Which are installed in ${LOCALBASE}/include/openjpeg-2.1 and
  ${LOCALBASE}/include respectively.

  This fixes the build when the MODULES option is turned off, and both openjpeg
  ports are installed.

  PR:		195442
  Submitted by:	mail@ozzmosis.com

Changes:
  head/graphics/ImageMagick/Makefile