Summary: | >=media-gfx/blender-2.49a with media-libs/openjpeg-1.5.0 - In function ‘cinema_parameters’: source/blender/imbuf/intern/jp2.c:331:29: error: ‘false’ undeclared (first use in this function) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Bernd Feige <Bernd.Feige> |
Component: | Current packages | Assignee: | Luca Barbato <lu_zero> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | anthoine.bourgeois, aranea, dschridde+gentoobugs, DuPol, gentoo-bugs, gentoo, graphics+disabled, jaak, kripton, nikoli, renegabriels, samuel.bauer, walch.martin |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Patch to source/blender/imbuf/intern/jp2.c
blender-2.60a-r1.ebuild Patch to source/blender/imbuf/intern/jp2.c, blender-2.49 Patch to source/blender/imbuf/intern/jp2.c, blender-2.62 |
Description
Bernd Feige
2012-03-22 09:10:21 UTC
Created attachment 306271 [details, diff]
Patch to source/blender/imbuf/intern/jp2.c
patch worked for me. thanks! Same problem with media-gfx/blender-2.49b-r2: Compiling ==> 'logImageCore.c' source/blender/imbuf/intern/jp2.c: In function ‘cinema_parameters’: source/blender/imbuf/intern/jp2.c:331:29: error: ‘false’ undeclared (first use in this function) source/blender/imbuf/intern/jp2.c:331:29: note: each undeclared identifier is reported only once for each function it appears in source/blender/imbuf/intern/jp2.c: In function ‘imb_savejp2’: source/blender/imbuf/intern/jp2.c:720:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result Compiling ==> 'logImageLib.c' scons: *** [/var/tmp/portage/media-gfx/blender-2.49b-r2/work/build/linux2/source/blender/imbuf/intern/jp2.o] Error 1 scons: building terminated because of errors. Patch is also to be found in #408493 . Don't know if it's by the same author ... The patch worked for me too, thanks. confirming bug for media-gfx/blender-2.49b-r2 + openjpeg-1.5 Compiling ==> 'jp2.c' source/blender/imbuf/intern/jp2.c: In function ‘cinema_parameters’: source/blender/imbuf/intern/jp2.c:331:29: error: ‘false’ undeclared (first use in this function) source/blender/imbuf/intern/jp2.c:331:29: note: each undeclared identifier is reported only once for each function it appears in source/blender/imbuf/intern/jp2.c: In function ‘imb_savejp2’: source/blender/imbuf/intern/jp2.c:720:9: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result scons: *** [/var/tmp/portage/media-gfx/blender-2.49b-r2/work/build/linux2/source/blender/imbuf/intern/jp2.o] Error 1 scons: building terminated because of errors. Why oh why don't they all use <stdbool.h> instead? :( (In reply to comment #7) > Why oh why don't they all use <stdbool.h> instead? :( Probably portability - stdbool.h is C99. The use of false instead of FALSE is probably just an accident. (In reply to comment #7) > Why oh why don't they all use <stdbool.h> instead? :( Would all be fine with me, but blender simply adheres to oldfashioned C style FALSE and TRUE in its C code. If this is changed, it should be changed consistently, undefining and deprecating the C versions everywhere. IMHO including <stdbool.h> should not be done to "fix" compilation in the situation where a C++ programmer by mistake slipped a "false" into C code. The current blender source does not use stdbool.h a single time. As mentioned in comment #3 and #6, blender 2.49b-r2 is also affected But no jpeg2k flag is present. Created attachment 306759 [details]
blender-2.60a-r1.ebuild
Proposed ebuild, using provided patch.
Save the patch as blender-2.60a-jp2c.patch
Created attachment 307279 [details, diff] Patch to source/blender/imbuf/intern/jp2.c, blender-2.49 Patch that applies cleanly to blender-2.49 (cf. https://bugs.gentoo.org/show_bug.cgi?id=409691) Comment on attachment 306271 [details, diff] Patch to source/blender/imbuf/intern/jp2.c Renamed patch for blender-2.60a as suggested by Joaquim Uchoa, https://bugs.gentoo.org/show_bug.cgi?id=409283#c11 *** Bug 409691 has been marked as a duplicate of this bug. *** Created attachment 307311 [details]
Patch to source/blender/imbuf/intern/jp2.c, blender-2.62
While we're at it, here's the patch that applies cleanly to blender-2.62.
As you can see in the upstream subversion repository, the lower-case "false" has been changed to upper-case "FALSE". https://svn.blender.org/svnroot/bf-blender/trunk/blender/source/blender/imbuf/intern/jp2.c So, the above patches that do exactly the same thing are probably a save and clean fix. Please apply them. The problem appears with the latest stable versions of blender and openjpeg on amd64, ppc, ppc64 and x86. This problem is fixed in svn, it must be include in 2.63. If you just want to get Blender installed before the patches are applied, this is the simplest way: CFLAGS="-O2 -march=core2 -pipe -Dfalse=0" emerge -av blender (replace the flags with your own) + 02 Apr 2012; Samuli Suominen <ssuominen@gentoo.org> blender-2.48a-r3.ebuild, + blender-2.49a.ebuild, blender-2.49b-r2.ebuild, blender-2.57-r1.ebuild, + blender-2.60a.ebuild: + Fix building with media-libs/openjpeg >= 1.5.0 wrt #409283. Every version has + source/blender/imbuf/intern/jp2.c with parameters->tile_size_on set to false. (In reply to comment #19) > + 02 Apr 2012; Samuli Suominen <ssuominen@gentoo.org> > blender-2.48a-r3.ebuild, > + blender-2.49a.ebuild, blender-2.49b-r2.ebuild, blender-2.57-r1.ebuild, > + blender-2.60a.ebuild: > + Fix building with media-libs/openjpeg >= 1.5.0 wrt #409283. Every version > has > + source/blender/imbuf/intern/jp2.c with parameters->tile_size_on set to > false. err, 2.48a-r3 wasn't affected afterall, reverted that one... sorry |