# ghostscript9 9.05 compiling error



## ahavatar (Feb 13, 2012)

I've got a compiling error while upgrading my ghostscript9 to 9.05. Any help would be appreciated.

```
cc  -DHAVE_MKSTEMP   -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_SSE2 -DHAVE_DBUS   -O2
 -pipe -fno-strict-aliasing -fPIC -DUPD_SIGNAL=0 -I.  -I/usr/ports/print/ghostscript9/work/ghostscript-
9.05/lcms/include  -I/usr/local/include/libpng  -I/usr/local/include -I/usr/local/include/freetype2
  -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings
 -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H=1
 -DHAVE_SYS_TIME_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long int" -O2 -pipe -fno-strict-aliasing
 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER -I/usr/local/include   -DGS_DEVS_SHARED
 -DGS_DEVS_SHARED_DIR=\"/usr/local/lib/ghostscript/9.05\"  -DA4 -Iopenjpeg/libopenjpeg/..
 -Iopenjpeg/libopenjpeg -I./soobj -I./base -DUSE_OPENJPEG_JP2 -ffast-math -DOPJ_STATIC -std=c99
  -o ./soobj/sjpx_openjpeg.o \
	-c -DOPJ_STATIC ./base/sjpx_openjpeg.c
./base/sjpx_openjpeg.c: In function 'decode_image':
./base/sjpx_openjpeg.c:169: error: too many arguments to function 'opj_decode'
./base/sjpx_openjpeg.c:205: error: 'opj_image_comp_t' has no member named 'typ'
./base/sjpx_openjpeg.c:205: error: 'CTYPE_COLOR' undeclared (first use in this function)
./base/sjpx_openjpeg.c:205: error: (Each undeclared identifier is reported only once
./base/sjpx_openjpeg.c:205: error: for each function it appears in.)
./base/sjpx_openjpeg.c:207: error: 'opj_image_comp_t' has no member named 'typ'
./base/sjpx_openjpeg.c:207: error: 'CTYPE_OPACITY' undeclared (first use in this function)
./base/sjpx_openjpeg.c:217: error: 'CLRSPC_CMYK' undeclared (first use in this function)
./base/sjpx_openjpeg.c:250: error: 'opj_image_t' has no member named 'has_palette'
./base/sjpx_openjpeg.c:257: error: 'CLRSPC_EYCC' undeclared (first use in this function)
gmake[2]: *** [soobj/sjpx_openjpeg.o] Error 1
gmake[2]: Leaving directory `/usr/ports/print/ghostscript9/work/ghostscript-9.05'
gmake[1]: *** [so-subtarget] Error 2
gmake[1]: Leaving directory `/usr/ports/print/ghostscript9/work/ghostscript-9.05'
gmake: *** [so] Error 2
*** Error code 1

Stop in /usr/ports/print/ghostscript9.
*** Error code 1

Stop in /usr/ports/print/ghostscript9.
```


----------



## jrm@ (Feb 13, 2012)

@ahavatar, I'm seeing the same error on 8.2-STABLE i386.  I'll email the maintainer.


----------



## kpa (Feb 13, 2012)

Seems to compile fine on 9.0 Release AMD64. There's a thread on freebsd-ports that suggests that the compilation failure occurs on all architectures but AMD64.


----------



## rob34 (Feb 13, 2012)

I'm running 8.2-RELEASE-p3 AMD64 and I get the same error.


----------



## Sfynx (Feb 13, 2012)

Here it fails on 9.0-RELEASE amd64.


----------



## wblock@ (Feb 13, 2012)

There's a workaround by just disabling openjpeg support: http://lists.freebsd.org/pipermail/freebsd-ports/2012-February/073091.html.

Unless you urgently need to rebuild ghostscript now, better to just wait for the correct fix to make it into the ports tree.


----------



## jrm@ (Feb 13, 2012)

It sounds like the problem is known, but I submitted a PR a few hours ago to be sure.

http://www.freebsd.org/cgi/query-pr.cgi?pr=165093


----------



## Martillo1 (Feb 13, 2012)

I prefer to wait provided the problem is targeted.


----------

