Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 590688 - media-gfx/blender-2.72b-r4 fails to build with GCC 6: error: 'max' was not declared in this scope
Summary: media-gfx/blender-2.72b-r4 fails to build with GCC 6: error: 'max' was not d...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-07 12:01 UTC by David Roman
Modified: 2016-08-10 20:42 UTC (History)
0 users

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


Attachments
emerge info (emerge_info,6.19 KB, text/plain)
2016-08-10 20:39 UTC, David Roman
Details
build.log.bz2 (build.log.bz2,86.29 KB, application/x-bzip2)
2016-08-10 20:42 UTC, David Roman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Roman 2016-08-07 12:01:11 UTC
When compiling blender it gives the next error

/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp: In member function 'void DirectDrawSurface::mipmap(Image*, uint, uint)':
/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp:1105:20: error: 'max' was not declared in this scope
   w = max(1U, w / 2);
                    ^
/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp: In member function 'void DirectDrawSurface::readBlockImage(Image*)':
/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp:1226:39: error: 'min' was not declared in this scope
    for (uint y = 0; y < min(4U, h-4*by); y++)
                                       ^
In file included from /var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.h:61:0,
                 from /var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp:58:
/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp: In function 'Color32 buildNormal(uint8, uint8)':
/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/Common.h:38:38: error: 'max' was not declared in this scope
 #define clamp(x,a,b) min(max((x), (a)), (b))
                                      ^
/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp:1243:12: note: in expansion of macro 'clamp'
  uint8 z = clamp(int(255.0f * (nz + 1) / 2.0f), 0, 255);
            ^~~~~
/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/Common.h:38:44: error: 'min' was not declared in this scope
 #define clamp(x,a,b) min(max((x), (a)), (b))
                                            ^
/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp:1243:12: note: in expansion of macro 'clamp'
  uint8 z = clamp(int(255.0f * (nz + 1) / 2.0f), 0, 255);
            ^~~~~
/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp: In member function 'uint DirectDrawSurface::mipmapSize(uint) const':
/var/tmp/portage/media-gfx/blender-2.72b-r4/work/blender-2.72b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp:1382:20: error: 'max' was not declared in this scope
   w = max(1U, w / 2);
                    ^
Comment 1 Mike Gilbert gentoo-dev 2016-08-09 22:16:23 UTC
Provide emerge --info and attach a full build log.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2016-08-10 00:16:55 UTC
1. Please attach the entire build log to this bug report.
2. Please post your `emerge --info` output in a comment.
Comment 3 David Roman 2016-08-10 20:39:41 UTC
Created attachment 442982 [details]
emerge info
Comment 4 David Roman 2016-08-10 20:42:23 UTC
Created attachment 442984 [details]
build.log.bz2