[Bug 228710] graphics/leptonica

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jun 2 20:25:34 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228710

            Bug ID: 228710
           Summary: graphics/leptonica
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs at FreeBSD.org
          Reporter: kreinholz at gmail.com
                CC: hiroto.kagotani at gmail.com
             Flags: maintainer-feedback?(hiroto.kagotani at gmail.com)
                CC: hiroto.kagotani at gmail.com

leptonica-1.74.1_1 fails to build due to declaration errors in jp2kio.c

FreeBSD 11.1-RELEASE-p10 FreeBSD 11.1-RELEASE-p10 #0: Tue May  8 05:21:56 UTC
2018     root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

Standard LLVM compiler tools

Snippet from output of make (MAKE_VERSION='20170510'):

libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include/libpng16
-I/usr/local/include -I/usr/local/include -I/usr/local/include
-I/usr/local/include/openjpeg-2.3 -I/usr/local/include -O2 -pipe
-fstack-protector -fno-strict-aliasing -MT jp2kio.lo -MD -MP -MF
.deps/jp2kio.Tpo -c jp2kio.c  -fPIC -DPIC -o .libs/jp2kio.o
jp2kio.c:131:8: error: unknown type name 'opj_stream_t'
static opj_stream_t *opjCreateStream(FILE *fp, l_int32 is_read);
       ^
jp2kio.c:253:1: error: unknown type name 'opj_codec_t'; did you mean
      'opj_poc_t'?
opj_codec_t       *l_codec = NULL;  /* handle to decompressor */
^~~~~~~~~~~
opj_poc_t
/usr/local/include/openjpeg.h:225:3: note: 'opj_poc_t' declared here
} opj_poc_t;
  ^
jp2kio.c:254:1: error: use of undeclared identifier 'opj_stream_t'
opj_stream_t      *l_stream = NULL;  /* opj stream */
^
jp2kio.c:254:20: error: use of undeclared identifier 'l_stream'
opj_stream_t      *l_stream = NULL;  /* opj stream */
                   ^
jp2kio.c:300:42: error: use of undeclared identifier 'OPJ_CODEC_JP2'; did you
      mean 'CODEC_JP2'?
    if ((l_codec = opj_create_decompress(OPJ_CODEC_JP2)) == NULL) {
                                         ^~~~~~~~~~~~~
                                         CODEC_JP2
/usr/local/include/openjpeg.h:149:2: note: 'CODEC_JP2' declared here
        CODEC_JP2  = 2          /**< JPEG-2000 file format : read/write */
        ^
jp2kio.c:300:18: warning: incompatible pointer types assigning to 'opj_poc_t *'
      (aka 'struct opj_poc *') from 'opj_dinfo_t *' (aka 'struct opj_dinfo *')
      [-Wincompatible-pointer-types]
    if ((l_codec = opj_create_decompress(OPJ_CODEC_JP2)) == NULL) {
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jp2kio.c:307:9: warning: implicit declaration of function
'opj_set_info_handler'
      is invalid in C99 [-Wimplicit-function-declaration]
        opj_set_info_handler(l_codec, info_callback, NULL);
        ^
jp2kio.c:308:9: warning: implicit declaration of function
      'opj_set_warning_handler' is invalid in C99
      [-Wimplicit-function-declaration]
        opj_set_warning_handler(l_codec, warning_callback, NULL);
        ^
jp2kio.c:309:9: warning: implicit declaration of function
      'opj_set_error_handler' is invalid in C99
      [-Wimplicit-function-declaration]
        opj_set_error_handler(l_codec, error_callback, NULL);
        ^
jp2kio.c:313:28: warning: incompatible pointer types passing 'opj_poc_t *'
      (aka 'struct opj_poc *') to parameter of type 'opj_dinfo_t *' (aka
      'struct opj_dinfo *') [-Wincompatible-pointer-types]
    if (!opj_setup_decoder(l_codec, &parameters)){
                           ^~~~~~~
/usr/local/include/openjpeg.h:828:58: note: passing argument to parameter
      'dinfo' here
OPJ_API void OPJ_CALLCONV opj_setup_decoder(opj_dinfo_t *dinfo, opj_dpar...

jp2kio.c:313:9: error: invalid argument type 'void' to unary expression
    if (!opj_setup_decoder(l_codec, &parameters)){
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jp2kio.c:315:9: warning: implicit declaration of function 'opj_destroy_codec'
is
      invalid in C99 [-Wimplicit-function-declaration]
        opj_destroy_codec(l_codec);
        ^
jp2kio.c:322:10: error: use of undeclared identifier 'l_stream'
    if ((l_stream = opjCreateStream(fp, 1)) == NULL) {
         ^
jp2kio.c:330:9: warning: implicit declaration of function 'opj_read_header' is
      invalid in C99 [-Wimplicit-function-declaration]
    if(!opj_read_header(l_stream, l_codec, &image)){
        ^
jp2kio.c:330:25: error: use of undeclared identifier 'l_stream'
    if(!opj_read_header(l_stream, l_codec, &image)){
                        ^
jp2kio.c:332:9: warning: implicit declaration of function 'opj_stream_destroy'
      is invalid in C99 [-Wimplicit-function-declaration]
        opj_stream_destroy(l_stream);
        ^
jp2kio.c:332:28: error: use of undeclared identifier 'l_stream'
        opj_stream_destroy(l_stream);
                           ^
jp2kio.c:341:14: warning: implicit declaration of function
'opj_set_decode_area'
      is invalid in C99 [-Wimplicit-function-declaration]
        if (!opj_set_decode_area(l_codec, image, bx, by,
             ^
jp2kio.c:344:32: error: use of undeclared identifier 'l_stream'
            opj_stream_destroy(l_stream);
                               ^
jp2kio.c:352:31: error: use of undeclared identifier 'l_stream'
    if (!(opj_decode(l_codec, l_stream, image) &&
                              ^
jp2kio.c:353:11: warning: implicit declaration of function 'opj_end_decompress'
      is invalid in C99 [-Wimplicit-function-declaration]
          opj_end_decompress(l_codec, l_stream))) {
          ^
jp2kio.c:353:39: error: use of undeclared identifier 'l_stream'
          opj_end_decompress(l_codec, l_stream))) {
                                      ^
jp2kio.c:356:28: error: use of undeclared identifier 'l_stream'
        opj_stream_destroy(l_stream);
                           ^
jp2kio.c:362:24: error: use of undeclared identifier 'l_stream'
    opj_stream_destroy(l_stream);
                       ^
jp2kio.c:376:27: error: use of undeclared identifier 'OPJ_CLRSPC_SRGB'; did you
      mean 'CLRSPC_SRGB'?
        if (colorspace == OPJ_CLRSPC_SRGB)
                          ^~~~~~~~~~~~~~~
                          CLRSPC_SRGB
/usr/local/include/openjpeg.h:133:2: note: 'CLRSPC_SRGB' declared here
        CLRSPC_SRGB = 1,                /**< sRGB */
        ^
jp2kio.c:378:32: error: use of undeclared identifier 'OPJ_CLRSPC_GRAY'; did you
      mean 'CLRSPC_GRAY'?
        else if (colorspace == OPJ_CLRSPC_GRAY)
                               ^~~~~~~~~~~~~~~
                               CLRSPC_GRAY
/usr/local/include/openjpeg.h:134:2: note: 'CLRSPC_GRAY' declared here
        CLRSPC_GRAY = 2,                /**< grayscale */
        ^
jp2kio.c:380:32: error: use of undeclared identifier 'OPJ_CLRSPC_SYCC'; did you
      mean 'CLRSPC_SYCC'?
        else if (colorspace == OPJ_CLRSPC_SYCC)
                               ^~~~~~~~~~~~~~~
                               CLRSPC_SYCC
/usr/local/include/openjpeg.h:135:2: note: 'CLRSPC_SYCC' declared here
        CLRSPC_SYCC = 3                 /**< YUV */
        ^
jp2kio.c:530:1: error: use of undeclared identifier 'opj_stream_t'
opj_stream_t      *l_stream = NULL;
^
jp2kio.c:530:20: error: use of undeclared identifier 'l_stream'
opj_stream_t      *l_stream = NULL;
                   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
10 warnings and 20 errors generated.
*** Error code 1

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list