Opened 7 years ago

Closed 6 years ago

#55283 closed defect (fixed)

Leptonica @1.74.4 does not compile with current openjpeg 2.3

Reported by: ericmoret Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kencu (Ken), ryandesign (Ryan Carsten Schmidt)
Port: leptonica

Description

Leptonica just recently added support for openjpeg 2.3 as seen here: https://github.com/DanBloomberg/leptonica/commit/cdf557b8734ea24b53499a7d2c3d06d0c3c9e0ed

[...]
:info:configure checking for opj_create_decompress in -lopenjp2... yes
:info:configure checking openjpeg-2.2/openjpeg.h usability... no
:info:configure checking openjpeg-2.2/openjpeg.h presence... no
:info:configure checking for openjpeg-2.2/openjpeg.h... no
:info:configure checking openjpeg-2.1/openjpeg.h usability... no
:info:configure checking openjpeg-2.1/openjpeg.h presence... no
:info:configure checking for openjpeg-2.1/openjpeg.h... no
:info:configure checking openjpeg-2.0/openjpeg.h usability... no
:info:configure checking openjpeg-2.0/openjpeg.h presence... no
:info:configure checking for openjpeg-2.0/openjpeg.h... no
:info:configure checking whether make supports nested variables... (cached) yes
:info:configure checking for size_t... yes
[...]
:info:build   CC       pngiostub.lo
:info:build   CC       pnmio.lo
:info:build jp2kio.c:117:10: fatal error: 'openjpeg.h' file not found
:info:build #include <openjpeg.h>
:info:build          ^~~~~~~~~~~~
:info:build 1 error generated.
:info:build make[2]: *** [jp2kio.lo] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build libversions.c:77:10: fatal error: 'openjpeg.h' file not found
:info:build #include <openjpeg.h>
:info:build          ^~~~~~~~~~~~
:info:build 1 error generated.
:info:build make[2]: *** [libversions.lo] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_leptonica/leptonica/work/leptonica-1.74.4/src'
[...]
}}}}

Attachments (1)

main.log (131.4 KB) - added by ericmoret 7 years ago.
log file

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by ericmoret

Attachment: main.log added

log file

comment:1 Changed 7 years ago by kencu (Ken)

Owner: set to stromnov
Priority: HighNormal
Status: newassigned
Summary: Leptonica does not compile with current openjpeg 2.3Leptonica @1.74.4 does not compile with current openjpeg 2.3
Version: 2.4.2

comment:2 Changed 7 years ago by kencu (Ken)

This patch (from the commit above) should suffice until a new version is released:

From cdf557b8734ea24b53499a7d2c3d06d0c3c9e0ed Mon Sep 17 00:00:00 2001
From: BorisMansencal <boris.mansencal@labri.fr>
Date: Tue, 24 Oct 2017 15:44:45 +0200
Subject: [PATCH] add support for openjpeg 2.3

---
 cmake/Configure.cmake | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cmake/Configure.cmake b/cmake/Configure.cmake
index a7890b0..1e4e11c 100644
--- a/cmake/Configure.cmake
+++ b/cmake/Configure.cmake
@@ -67,6 +67,7 @@ set(include_files_list
     openjpeg-2.0/openjpeg.h
     openjpeg-2.1/openjpeg.h
     openjpeg-2.2/openjpeg.h
+    openjpeg-2.3/openjpeg.h
 )
 check_includes(include_files_list)
 
@@ -150,6 +151,10 @@ file(APPEND ${AUTOCONFIG_SRC} "
 #ifdef HAVE_OPENJPEG_2_2_OPENJPEG_H
 #define LIBJP2K_HEADER <openjpeg-2.2/openjpeg.h>
 #endif
+
+#ifdef HAVE_OPENJPEG_2_3_OPENJPEG_H
+#define LIBJP2K_HEADER <openjpeg-2.3/openjpeg.h>
+#endif
 ")
 
 ########################################

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

Cc: kencu ryandesign added

Ken, that file is related to the cmake build system, which the port is not using. (We're using the autoconf configure script.)

The port builds fine with openjpeg 2.3 when a pkgconfig build dependency is added.

comment:4 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 9d6a596f0a397d07ff992af448c9a57c67b8b29d/macports-ports:

leptonica: Add pkgconfig build dependency

Closes: #55283

Note: See TracTickets for help on using tickets.