Summary: | media-libs/leptonica-1.71 compile failure: fatal error: openjpeg-2.1/openjpeg.h: No such file or directory | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tman <cornicx> |
Component: | Current packages | Assignee: | Thomas Kahle (RETIRED) <tomka> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | Bernd.Feige, neil, nikoli, silvio.gerli, toralf, ulm, vityokster, xmw |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 518556 | ||
Bug Blocks: | |||
Attachments: |
/var/tmp/portage/media-libs/leptonica-1.71/temp/build.log
crude path to compile against openjpeg-2.0 /var/tmp/portage/media-libs/leptonica-1.71/temp/build.log build.log |
Description
tman
2014-07-29 23:11:24 UTC
Created attachment 381848 [details]
/var/tmp/portage/media-libs/leptonica-1.71/temp/build.log
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. 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. Created attachment 381878 [details, diff]
crude path to compile against openjpeg-2.0
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. (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. after upgrading of: media-libs/openjpeg-1.5.2 the package media-libs/leptonica-1.71 again fails to compile Created attachment 383542 [details]
/var/tmp/portage/media-libs/leptonica-1.71/temp/build.log
Same issue here 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 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. 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. 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) 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.... Created attachment 383678 [details]
build.log
(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. 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 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 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. *** Bug 536496 has been marked as a duplicate of this bug. *** |