New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #16072 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

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

Reported by: tim.lahey@… Owned by: ryandesign@…
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

comment:1 Changed 5 years ago by blb@…

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

Assigning to maintainer.

comment:2 Changed 5 years ago by ryandesign@…

  • Status changed from new to assigned

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 5 years ago by ryandesign@…

  • Status changed from assigned to closed
  • Resolution set to fixed

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 5 years ago by j.bugzilla2@…

  • Status changed from closed to reopened
  • Resolution fixed deleted

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 5 years ago by j.bugzilla2@…

  • Cc j.bugzilla2@… added

Cc Me!

comment:6 Changed 5 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 5 years ago by ryandesign@…

  • Status changed from reopened to closed
  • Resolution set to fixed

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

comment:8 Changed 4 years ago by anonymous

  • Milestone Port Bugs deleted

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.