Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Jun 2018 20:25:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 228710] graphics/leptonica
Message-ID:  <bug-228710-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228710

            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@FreeBSD.org
          Reporter: kreinholz@gmail.com
                CC: hiroto.kagotani@gmail.com
             Flags: maintainer-feedback?(hiroto.kagotani@gmail.com)
                CC: hiroto.kagotani@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 U=
TC
2018     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  a=
md64

Standard LLVM compiler tools

Snippet from output of make (MAKE_VERSION=3D'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 =3D 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 =3D NULL;  /* opj stream */
^
jp2kio.c:254:20: error: use of undeclared identifier 'l_stream'
opj_stream_t      *l_stream =3D NULL;  /* opj stream */
                   ^
jp2kio.c:300:42: error: use of undeclared identifier 'OPJ_CODEC_JP2'; did y=
ou
      mean 'CODEC_JP2'?
    if ((l_codec =3D opj_create_decompress(OPJ_CODEC_JP2)) =3D=3D NULL) {
                                         ^~~~~~~~~~~~~
                                         CODEC_JP2
/usr/local/include/openjpeg.h:149:2: note: 'CODEC_JP2' declared here
        CODEC_JP2  =3D 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 =3D opj_create_decompress(OPJ_CODEC_JP2)) =3D=3D 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_code=
c'
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 =3D opjCreateStream(fp, 1)) =3D=3D 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_destr=
oy'
      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_decompr=
ess'
      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 =3D=3D OPJ_CLRSPC_SRGB)
                          ^~~~~~~~~~~~~~~
                          CLRSPC_SRGB
/usr/local/include/openjpeg.h:133:2: note: 'CLRSPC_SRGB' declared here
        CLRSPC_SRGB =3D 1,                /**< sRGB */
        ^
jp2kio.c:378:32: error: use of undeclared identifier 'OPJ_CLRSPC_GRAY'; did=
 you
      mean 'CLRSPC_GRAY'?
        else if (colorspace =3D=3D OPJ_CLRSPC_GRAY)
                               ^~~~~~~~~~~~~~~
                               CLRSPC_GRAY
/usr/local/include/openjpeg.h:134:2: note: 'CLRSPC_GRAY' declared here
        CLRSPC_GRAY =3D 2,                /**< grayscale */
        ^
jp2kio.c:380:32: error: use of undeclared identifier 'OPJ_CLRSPC_SYCC'; did=
 you
      mean 'CLRSPC_SYCC'?
        else if (colorspace =3D=3D OPJ_CLRSPC_SYCC)
                               ^~~~~~~~~~~~~~~
                               CLRSPC_SYCC
/usr/local/include/openjpeg.h:135:2: note: 'CLRSPC_SYCC' declared here
        CLRSPC_SYCC =3D 3                 /**< YUV */
        ^
jp2kio.c:530:1: error: use of undeclared identifier 'opj_stream_t'
opj_stream_t      *l_stream =3D NULL;
^
jp2kio.c:530:20: error: use of undeclared identifier 'l_stream'
opj_stream_t      *l_stream =3D NULL;
                   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=3D]
10 warnings and 20 errors generated.
*** Error code 1

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-228710-7788>