Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409283 - >=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)
Summary: >=media-gfx/blender-2.49a with media-libs/openjpeg-1.5.0 - In function ‘cinem...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
: 409691 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-22 09:10 UTC by Bernd Feige
Modified: 2012-04-02 13:35 UTC (History)
13 users (show)

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


Attachments
Patch to source/blender/imbuf/intern/jp2.c (blender-2.60a-jp2c.patch,394 bytes, patch)
2012-03-22 09:11 UTC, Bernd Feige
Details | Diff
blender-2.60a-r1.ebuild (blender-2.60a-r1.ebuild,13.86 KB, text/plain)
2012-03-26 17:38 UTC, Joaquim Uchoa
Details
Patch to source/blender/imbuf/intern/jp2.c, blender-2.49 (blender-2.49b-jp2c.patch,387 bytes, patch)
2012-03-31 13:03 UTC, Bernd Feige
Details | Diff
Patch to source/blender/imbuf/intern/jp2.c, blender-2.62 (blender-2.62-jp2.patch,393 bytes, text/plain)
2012-03-31 17:13 UTC, Bernd Feige
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Feige 2012-03-22 09:10:21 UTC
Apparently openjpeg-1.4 defined lowercase 'false' while openjpeg-1.5 doesn't.
The included patch fixes compilation.

Reproducible: Always
Comment 1 Bernd Feige 2012-03-22 09:11:10 UTC
Created attachment 306271 [details, diff]
Patch to source/blender/imbuf/intern/jp2.c
Comment 2 Märt Bakhoff 2012-03-23 09:16:52 UTC
patch worked for me. thanks!
Comment 3 Nikoli 2012-03-23 14:50:47 UTC
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.
Comment 4 jannis 2012-03-24 09:51:56 UTC
Patch is also to be found in #408493 . Don't know if it's by the same author ...
Comment 5 Bernd Waibel 2012-03-24 10:34:42 UTC
The patch worked for me too, thanks.
Comment 6 jms 2012-03-26 03:31:38 UTC
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.
Comment 7 Jaak Ristioja 2012-03-26 09:19:56 UTC
Why oh why don't they all use <stdbool.h> instead? :(
Comment 8 Dennis Schridde 2012-03-26 12:44:21 UTC
(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.
Comment 9 Bernd Feige 2012-03-26 12:45:45 UTC
(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.
Comment 10 Samuel Bauer 2012-03-26 13:08:30 UTC
As mentioned in comment #3 and #6, blender 2.49b-r2 is also affected
But no jpeg2k flag is present.
Comment 11 Joaquim Uchoa 2012-03-26 17:38:55 UTC
Created attachment 306759 [details]
blender-2.60a-r1.ebuild

Proposed ebuild, using provided patch.
Save the patch as blender-2.60a-jp2c.patch
Comment 12 Bernd Feige 2012-03-31 13:03:08 UTC
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 13 Bernd Feige 2012-03-31 13:05:58 UTC
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
Comment 14 Mira Ressel 2012-03-31 16:09:11 UTC
*** Bug 409691 has been marked as a duplicate of this bug. ***
Comment 15 Bernd Feige 2012-03-31 17:13:10 UTC
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.
Comment 16 Martin Walch 2012-04-01 09:29:47 UTC
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.
Comment 17 Anthoine Bourgeois 2012-04-01 16:33:26 UTC
This problem is fixed in svn, it must be include in 2.63.
Comment 18 Lukas Turek 2012-04-02 12:56:02 UTC
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)
Comment 19 Samuli Suominen gentoo-dev 2012-04-02 13:29:02 UTC
+  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.
Comment 20 Samuli Suominen gentoo-dev 2012-04-02 13:34:59 UTC
(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