New issue
Advanced search Search tips

Issue 889429 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 1
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

gles2_sources compilation fails with Jumbo enabled (zlib and angle are incompatible)

Project Member Reported by tmonius...@opera.com, Sep 26

Issue description

OS: Windows

1>In file included from gen/gpu/command_buffer/service/gles2_sources_jumbo_cc_0.cc:36:
1>In file included from gen/gpu/command_buffer/service/../../../../../../gpu/command_buffer/service/memory_program_cache.cc:27:
1>In file included from ../..\third_party/zlib/zlib.h:34:
1>../../third_party/zlib/zconf.h(403,21): error : expected ';' after top level declarator
1>   typedef Byte  FAR Bytef;
1>                    ^
1>                    ;
1>../../third_party/zlib/zconf.h(405,15): error : typedef redefinition with different types ('char' vs 'Byte' (aka 'unsigned char'))
1>typedef char  FAR charf;
1>              ^
1>C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared\minwindef.h(150,29):  note: expanded from macro 'FAR'
1>#define FAR                 far
1>                            ^
1>../../third_party/zlib/zconf.h(403,18):  note: previous definition is here
1>   typedef Byte  FAR Bytef;
1>                 ^
1>C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared\minwindef.h(150,29):  note: expanded from macro 'FAR'
1>#define FAR                 far
1>
 
Description: Show this description
Components: Internals>GPU>ANGLE
Possible zlib fix in https://chromium-review.googlesource.com/c/chromium/src/+/1245723

Possible jumbo workaround in https://chromium-review.googlesource.com/c/chromium/src/+/1245701

Not looked at what it would take to make angle not undef "far".
Summary: gles2_sources compilation fails with Jumbo enabled (zlib and angle are incompatible) (was: gles2_sources compilation fails with Jumbo enabled)
I'm not sure where the undef happens. But we would probably be willing to take patches.
'near' and 'far' are undefined in third_party/angle/src/common/platform.h (lines 83 and 84).
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed040aad80066a3799a7c07c25154577fc929f86

commit ed040aad80066a3799a7c07c25154577fc929f86
Author: Daniel Bratell <bratell@opera.com>
Date: Mon Oct 01 11:36:33 2018

Resolve Windows conflict between zlib and angle

Windows normally defines macros so that FAR expands to far, and
far expands to nothing.

Angle undefs far, leaving the FAR macro hanging, expanding to far
which is not a legal keyword anymore. zlib already tries to handle
that someone/something has undefined FAR but it doesn't handle
that someone/something has undefined far. This patch changes that.

This problem appeared in some jumbo builds in
gpu/command_buffer/service which uses both angle and zlib.

Bug:  889429 
Change-Id: Ia3b10a9a82fc51b302c67b24a19f30a73bdda489
Reviewed-on: https://chromium-review.googlesource.com/1245723
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595425}
[modify] https://crrev.com/ed040aad80066a3799a7c07c25154577fc929f86/third_party/zlib/zconf.h

Status: Fixed (was: Started)

Sign in to add a comment