Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 518540 - media-libs/leptonica-1.71 compile failure: fatal error: openjpeg-2.1/openjpeg.h: No such file or directory
Summary: media-libs/leptonica-1.71 compile failure: fatal error: openjpeg-2.1/openjpeg...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Kahle (RETIRED)
URL:
Whiteboard:
Keywords:
: 536496 (view as bug list)
Depends on: 518556
Blocks:
  Show dependency tree
 
Reported: 2014-07-29 23:11 UTC by tman
Modified: 2015-01-13 16:27 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/tmp/portage/media-libs/leptonica-1.71/temp/build.log (build.log,10.01 KB, text/x-log)
2014-07-29 23:11 UTC, tman
Details
crude path to compile against openjpeg-2.0 (leptonica.patch,617 bytes, patch)
2014-07-30 07:00 UTC, Michael Weber (RETIRED)
Details | Diff
/var/tmp/portage/media-libs/leptonica-1.71/temp/build.log (build.log,10.01 KB, text/x-log)
2014-08-24 20:15 UTC, tman
Details
build.log (leptonica-1.71_build.log,11.58 KB, text/plain)
2014-08-26 11:33 UTC, Nikoli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tman 2014-07-29 23:11:24 UTC
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for cos in -lm... yes
checking for deflate in -lz... yes
checking for png_read_png in -lpng... yes
checking for jpeg_read_scanlines in -ljpeg... yes
checking for DGifOpenFileHandle in -lgif... yes
checking for TIFFOpen in -ltiff... yes
checking for WebPGetInfo in -lwebp... yes
checking for opj_create_decompress in -lopenjp2... yes
checking whether make supports nested variables... yes
checking for size_t... yes
checking whether byte ordering is bigendian... no
checking whether compiler supports -Wl,--as-needed... yes
checking for fmemopen... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/endianness.h
config.status: creating src/Makefile
config.status: creating prog/Makefile
config.status: creating lept.pc
config.status: creating config_auto.h
config.status: executing libtool commands
config.status: executing depfiles commands
>>> Working in BUILD_DIR: "/var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71_build"
(CDPATH="${ZSH_VERSION+.}:" && cd /var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71 && /bin/sh /var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71/config/missing --run autoheader)
ac-wrapper: warning: invalid WANT_AUTOCONF 'latest'; ignoring.
aclocal.m4:17: warning: this file was generated for autoconf 2.68.
You have another version of autoconf.  It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.
rm -f stamp-h1
touch /var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71/config/config.h.in
cd . && /bin/sh ./config.status config_auto.h
config.status: creating config_auto.h
config.status: config_auto.h is unchanged
make  all-recursive
make[1]: Entering directory '/var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71_build'
Making all in src
make[2]: Entering directory '/var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71_build/src'
  CC     adaptmap.lo
  CC     affine.lo
  CC     arrayaccess.lo
  CC     affinecompose.lo
  CC     bardecode.lo
  CC     baseline.lo
  CC     bbuffer.lo
  CC     bilinear.lo
  CC     bilateral.lo
  CC     binarize.lo
  CC     binexpand.lo
  CC     binreduce.lo
  CC     blend.lo
  CC     bmf.lo
  CC     bmpio.lo
  CC     boxbasic.lo
  CC     bmpiostub.lo
  CC     boxfunc1.lo
  CC     boxfunc3.lo
  CC     boxfunc2.lo
  CC     bytearray.lo
  CC     boxfunc4.lo
  CC     ccbord.lo
  CC     ccthin.lo
  CC     classapp.lo
  CC     colorcontent.lo
  CC     coloring.lo
  CC     colormap.lo
  CC     colormorph.lo
  CC     colorquant1.lo
  CC     colorquant2.lo
  CC     colorseg.lo
  CC     colorspace.lo
  CC     compare.lo
  CC     conncomp.lo
  CC     convolve.lo
  CC     convertfiles.lo
  CC     convolvelow.lo
  CC     correlscore.lo
  CC     dewarp1.lo
  CC     dewarp2.lo
  CC     dewarp3.lo
  CC     dewarp4.lo
  CC     dnabasic.lo
  CC     dwacomb.2.lo
  CC     dwacomblow.2.lo
  CC     edge.lo
  CC     enhance.lo
  CC     fhmtauto.lo
  CC     fhmtgen.1.lo
  CC     fhmtgenlow.1.lo
  CC     finditalic.lo
  CC     flipdetect.lo
  CC     fliphmtgen.lo
  CC     fmorphauto.lo
  CC     fmorphgen.1.lo
  CC     fmorphgenlow.1.lo
  CC     fpix1.lo
  CC     fpix2.lo
  CC     gifio.lo
  CC     gifiostub.lo
  CC     gplot.lo
  CC     graphics.lo
  CC     graymorph.lo
  CC     graymorphlow.lo
  CC     grayquant.lo
  CC     grayquantlow.lo
  CC     heap.lo
  CC     jbclass.lo
  CC     jp2kheader.lo
  CC     jp2kheaderstub.lo
  CC     jp2kio.lo
  CC     jp2kiostub.lo
  CC     jpegio.lo
  CC     jpegiostub.lo
/var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71/src/jp2kio.c:118:37: fatal error: openjpeg-2.1/openjpeg.h: No such file or directory
   #include "openjpeg-2.1/openjpeg.h"
                                     ^
compilation terminated.
Makefile:641: recipe for target 'jp2kio.lo' failed
make[2]: *** [jp2kio.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71_build/src'
Makefile:366: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71_build'
Makefile:277: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: media-libs/leptonica-1.71::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-libs/leptonica-1.71::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/leptonica-1.71::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-libs/leptonica-1.71/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/leptonica-1.71/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71_build'
 * S: '/var/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71'

 * Messages for package media-libs/leptonica-1.71:

 * ERROR: media-libs/leptonica-1.71::gentoo failed (compile phase):


Reproducible: Always




Portage 2.2.10 (default/linux/amd64/13.0/desktop, gcc-4.8.3, glibc-2.19-r1, 3.15.7-gentoo x86_64)
=================================================================
System uname: Linux-3.15.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-3740QM_CPU_@_2.70GHz-with-gentoo-2.2
KiB Mem:    24627216 total,  21561952 free
KiB Swap:   25461756 total,  25461756 free
Timestamp of tree: Tue, 29 Jul 2014 23:00:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.7, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.15 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo bitcoin steam-overlay bumblebee printer-drivers lokal
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=corei7 -O2 -pipe"
DISTDIR="/mnt/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/mnt/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/portage"
Comment 1 tman 2014-07-29 23:11:57 UTC
Created attachment 381848 [details]
/var/tmp/portage/media-libs/leptonica-1.71/temp/build.log
Comment 2 Thomas Kahle (RETIRED) gentoo-dev 2014-07-30 06:40:36 UTC
There are two things going on:
1) leptonica-1.71 needed a use flag for jpeg2k support which is new in this version.  I just committed the fix, you can now enable or disable linking to openjpeg with the jpeg2k USE flag.
2) It does not compile with openjpeg-2.0, it seems to need 2.1 which is not in Gentoo yet: Bug #518556

For the time being, use -jpeg2k to compile.
Comment 3 Thomas Kahle (RETIRED) gentoo-dev 2014-07-30 06:52:29 UTC
Sorry, the configure option --without-libopenjpeg does not actually work.  Also they have hardcoded the openjpeg version in various places in the source code.  This is not fixed yet.
Comment 4 Michael Weber (RETIRED) gentoo-dev 2014-07-30 07:00:52 UTC
Created attachment 381878 [details, diff]
crude path to compile against openjpeg-2.0
Comment 5 Thomas Kahle (RETIRED) gentoo-dev 2014-07-30 07:13:37 UTC
Yes, but there is still an automagic dependency with USE=-jpeg2k but openjpeg installed and it will fail again once bug #518556 is done :(

I applied the patch for now and e-mailed upstream.
Comment 6 Juergen Rose 2014-07-30 17:02:41 UTC
(In reply to Michael Weber from comment #4)
> Created attachment 381878 [details, diff] [details, diff]
> crude path to compile against openjpeg-2.0

The patch worked for me.
Comment 7 tman 2014-08-24 20:14:46 UTC
after upgrading of: media-libs/openjpeg-1.5.2


the package media-libs/leptonica-1.71 again fails to compile
Comment 8 tman 2014-08-24 20:15:29 UTC
Created attachment 383542 [details]
/var/tmp/portage/media-libs/leptonica-1.71/temp/build.log
Comment 9 Silvio 2014-08-25 05:49:07 UTC
Same issue here
Comment 10 Bernd Feige 2014-08-26 08:58:02 UTC
Now that openjpeg-2.1 is in the tree, your patch breaks compilation against that.
May I suggest (possibly to upstream) to use "pkg-config libopenjp2" to obtain the proper include paths and libs, please? Otherwise it will always break again.
Thanks and best regards,
Bernd
Comment 11 Thomas Kahle (RETIRED) gentoo-dev 2014-08-26 09:00:47 UTC
I suggested (In reply to Bernd Feige from comment #10)
> Now that openjpeg-2.1 is in the tree, your patch breaks compilation against
> that.
> May I suggest (possibly to upstream) to use "pkg-config libopenjp2" to
> obtain the proper include paths and libs, please? Otherwise it will always
> break again.

I did suggest that to upstream in early August.  Patches from the community may expedite this.
Comment 12 Thomas Kahle (RETIRED) gentoo-dev 2014-08-26 09:04:12 UTC
I have no access to a machine from which I can do commits until the end of the week.  I would be glad if somebody could remove the patch as a temporary work around.  It seems that many people are hit by this.
Comment 13 Thomas Kahle (RETIRED) gentoo-dev 2014-08-26 09:10:18 UTC
OK, I found a way to access a suitable machine:

+  26 Aug 2014; Thomas Kahle <tomka@gentoo.org> leptonica-1.71.ebuild:
+  Depend on openjpeg-2.1 (bug 518540)
Comment 14 Nikoli 2014-08-26 11:32:38 UTC
And now it fails to build with USE='-jpeg2k':
/var/package-manager/tmp/portage/media-libs/leptonica-1.71/work/leptonica-1.71/src/jp2kio.c:118:37: fatal error: openjpeg-2.1/openjpeg.h: No such file or directory
compilation terminated.
make[2]: *** [jp2kio.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
Comment 15 Nikoli 2014-08-26 11:33:09 UTC
Created attachment 383678 [details]
build.log
Comment 16 Thomas Kahle (RETIRED) gentoo-dev 2014-08-26 12:46:56 UTC
(In reply to Nikoli from comment #15)
> Created attachment 383678 [details]
> build.log

Hmm.  Yes, that happens if you have <openjpeg-2.1 installed and also USE="-jpeg2k".  Temporary workaround: upgrade openjpeg.  This is the automagic dependency I have been talking about in earlier comments.  I'm sorry, I'm semi dev-away at the moment.  Patches are appreciated.
Comment 17 Thomas Kahle (RETIRED) gentoo-dev 2014-09-01 09:30:57 UTC
This is fixed for real now in 1.71-r1 which also uses EAPI=5 and slot deps on openjpeg.  It should work with all versions of openjpeg:2 and have no automagic dependency with USE="-jpeg2k".

+  01 Sep 2014; Thomas Kahle <tomka@gentoo.org>
+  +files/leptonica-1.71-fix-openjpeg-test.patch, +leptonica-1.71-r1.ebuild:
+  EAPI bump, fix bug 518540 for real
Comment 18 Bernd Feige 2014-09-01 19:03:51 UTC
Thanks for the upgrade - however: On my system, just like on many others, there's openjpeg-1.5 installed in parallel, so the condition
 has_version "<media-libs/openjpeg-2.1"
is met even though I have media-libs/openjpeg-2.1 installed. Fix:
 ! has_version ">=media-libs/openjpeg-2.1"

Regards,
Bernd
Comment 19 Thomas Kahle (RETIRED) gentoo-dev 2014-09-01 19:39:21 UTC
Hmm, right.  
Now I changed this to has_version "=media-libs/openjpeg-2.0.0" because this is in fact the only 2.0 version we have in the tree and chances are low that we'll have another one in the future.  Leptonica-1.72 may have fixes for this, I'm in touch with upstream.
Comment 20 Thomas Kahle (RETIRED) gentoo-dev 2015-01-13 16:27:25 UTC
*** Bug 536496 has been marked as a duplicate of this bug. ***