Skip to content

[backport/1.22] Release 1.22 build fix#23951

Merged
phlax merged 2 commits intoenvoyproxy:release/v1.22from
phlax:release-1.22-build-fix
Nov 16, 2022
Merged

[backport/1.22] Release 1.22 build fix#23951
phlax merged 2 commits intoenvoyproxy:release/v1.22from
phlax:release-1.22-build-fix

Conversation

@phlax
Copy link
Copy Markdown
Member

@phlax phlax commented Nov 11, 2022

Fix #23156

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only repokitteh-read-only Bot added the deps Approval required for changes to Envoy's external dependencies label Nov 11, 2022
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @wrowe

🐱

Caused by: #23951 was opened by phlax.

see: more, trace.

@phlax
Copy link
Copy Markdown
Member Author

phlax commented Nov 11, 2022

/wait for #23842

@phlax phlax added this to the 1.22.6 milestone Nov 11, 2022
@phlax phlax changed the title [backport/1.22] Release 1.22 build fix [WIP/backport/1.22] Release 1.22 build fix Nov 11, 2022
@phlax phlax marked this pull request as draft November 11, 2022 14:46
@phlax
Copy link
Copy Markdown
Member Author

phlax commented Nov 11, 2022

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Check envoy-presubmit isn't fully completed, but will still attempt retrying.
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #23951 (comment) was created by @phlax.

see: more, trace.

As noted in envoyproxy#21060, building with gcc in "opt" mode results in a compilation error:
```
ERROR: /workspaces/envoy/source/common/config/BUILD:414:17: Compiling source/common/config/watch_map.cc failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 154 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox
source/common/config/watch_map.cc: In member function 'virtual void Envoy::Config::WatchMap::onConfigUpdate(const google::protobuf::RepeatedPtrField<envoy::service::discovery::v3::Resource>&, const google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char> >&, const string&)':
source/common/config/watch_map.cc:215:69: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
  215 |       type_url_, reinterpret_cast<std::vector<DecodedResourcePtr>&>(decoded_resources),
      |                                                                     ^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
```
This PR changes the type of the original vector to be the base class type.

Risk Level: Low-Medium (no features changes, but updates config-plane code).
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Adi Suissa-Peleg <adip@google.com>
Signed-off-by: Ryan Northey <ryan@synca.io>
@phlax phlax force-pushed the release-1.22-build-fix branch from 02a3dee to 77f0f31 Compare November 15, 2022 16:01
@phlax phlax changed the title [WIP/backport/1.22] Release 1.22 build fix [backport/1.22] Release 1.22 build fix Nov 15, 2022
@phlax phlax marked this pull request as ready for review November 15, 2022 16:01
@phlax
Copy link
Copy Markdown
Member Author

phlax commented Nov 15, 2022

cc @adisuissa

Copy link
Copy Markdown
Contributor

@adisuissa adisuissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

…22-build-fix

Signed-off-by: Ryan Northey <ryan@synca.io>
@phlax phlax enabled auto-merge (rebase) November 16, 2022 11:13
@phlax phlax merged commit e6b65bb into envoyproxy:release/v1.22 Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deps Approval required for changes to Envoy's external dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants