Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#16072 closed defect (fixed)

pstoedit build failure - error in distort.h from ImageMagick 6.4.2-4

Reported by: tim.lahey@… Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: pstoedit, ImageMagick Cc: j.bugzilla2@…
Port:

Description

In trying to build pstoedit, I ran into an error in the build process. I get the following error:

 /usr/bin/g++-4.0 -DPACKAGE_NAME=\"pstoedit\" -DPACKAGE_TARNAME=\"pstoedit\" -DPACKAGE_VERSION=\"3.45\" "-DPACKAGE_STRING=\"pstoedit 3.45\"" -DPACKAGE_BUGREPORT=\"wglunz34_AT_pstoedit.net\" -DPACKAGE=\"pstoedit\" -DVERSION=\"3.45\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIBGD=1 -I. -I. -DHAVE_LIBPLOTTER -DHAVE_MKSTEMP -DHAVE_MAGIC -I/opt/local/include/ImageMagick -DHAVE_LIBPNG -DDEFAULTGS=/opt/local/bin/gs -DPSTOEDITDATADIR=\"/opt/local/share/pstoedit\" -DPSTOEDITLIBDIR=\"/opt/local/lib/pstoedit\" -DBUGGYGPP -pedantic -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith -I/opt/local/include -Wno-long-long -D_LITTLE_ENDIAN -g -MT drvmagick++.lo -MD -MP -MF .deps/drvmagick++.Tpo -c drvmagick++.cpp  -fno-common -DPIC -o .libs/drvmagick++.o
/opt/local/include/ImageMagick/magick/distort.h:38: error: comma at end of enumerator list
make[1]: *** [drvmagick++.lo] Error 1
make: *** [all-recursive] Error 1

Warning: the following items did not execute (for pstoedit): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

This is with the latest version of ImageMagick installed (6.4.2-4). The particular offending line is:

typedef enum
{
  UndefinedDistortion,
  AffineDistortion,
  AffineProjectionDistortion,
  ArcDistortion,
  BilinearDistortion,
  PerspectiveDistortion,
  PerspectiveProjectionDistortion,
  PolynomialDistortion,
  ScaleRotateTranslateDistortion,
  ShepardsDistortion,
} DistortImageMethod;

and removing the final comma after ShepardsDistortion allows for a successful build.

Change History (8)

comment:1 Changed 12 years ago by blb@…

Owner: changed from macports-tickets@… to ryandesign@…

Assigning to maintainer.

comment:2 Changed 12 years ago by ryandesign (Ryan Schmidt)

Status: newassigned

Confirmed in ImageMagick 6.4.2-4. This problem was not present in 6.4.2-1 (ShepardsDistortion was absent and there was no comma after ScaleRotateTranslateDistortion).

comment:3 Changed 12 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: assignedclosed

I added a workaround to the ImageMagick port in r38524 and reported the problem to the developers of ImageMagick.

Thanks for the great bug report!

comment:4 Changed 12 years ago by j.bugzilla2@…

Resolution: fixed
Status: closedreopened

changeset:38706 seems to have accidentally lost the patch added in changeset:38524, reactivating this ticket. I highly expect the port file just need to reference the diff file again until ImageMagick devels fix this upstream.

comment:5 Changed 12 years ago by j.bugzilla2@…

Cc: j.bugzilla2@… added

Cc Me!

comment:6 Changed 12 years ago by j.bugzilla2@…

I spoke a bit too soon, the code upstream appears to have fixed the original problem and caused an almost identical error later on in the same file but now at line 61.

typedef enum
{
  UndefinedColorInterpolate = UndefinedDistortion,
  BarycentricColorInterpolate = AffineDistortion,
  BilinearColorInterpolate = BilinearDistortion,
  PolynomialColorInterpolate = PolynomialDistortion,
  ShepardsColorInterpolate = ShepardsDistortion,
  /* Methods unique to SparseColorInterpolate() from here */
  VoronoiColorInterpolate = SentinelDistortion,
} SparseColorInterpolateMethod;

A diff is needed to remove the comma at the last line. This is not the same enum as was earlier required to be patched.

comment:7 Changed 12 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: reopenedclosed

Agreed. Thanks for letting me know. Fixed in r38769 and reported to the ImageMagick developers.

comment:8 Changed 11 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.