Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking failed when trying to compile the binary from the envoy 1.29.1 #33832

Open
alanalanyu opened this issue Apr 27, 2024 · 2 comments
Open

Comments

@alanalanyu
Copy link

alanalanyu commented Apr 27, 2024

Title:
Linking failed when trying to compile the binary from the envoy 1.29.1

Description:
Call to envoy_cc_binary

envoy_cc_binary(
    name = "my-gateway",
    repository = "@envoy",
    deps = [
        "my-filter-lib",
        "@envoy//source/exe:envoy_main_entry_lib",
    ],
)

How I build the my-gateway

ADDITIONAL_BAZEL_ARGS=--disk_cache=/bazel-cache --repository_cache=/bazel-repo-cache
bazel-6.3.2 build -c opt ${ADDITIONAL_BAZEL_ARGS} //:my-gateway

Envoy proxy version 1.29.1, bazel version 6.3.2

My .bazelrc

import %workspace%/envoy/.bazelrc
build --features=external_include_paths

The error is as follows

Linking my-gateway failed: (Exit 1): gcc failed: error executing command (from target //:my-gateway) /usr/bin/gcc @bazel-out/k8-opt/bin/my-gateway-2.params
2024-04-27T09:11:31.2881143Z 
2024-04-27T09:11:31.2881775Z Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
2024-04-27T09:11:31.2882863Z /usr/bin/ld.gold: warning: bazel-out/k8-opt/bin/external/envoy/source/extensions/filters/http/grpc_field_extraction/message_converter/_objs/message_converter_lib/message_converter.o: top level DIE is not DW_TAG_compile_unit or DW_TAG_type_unit
2024-04-27T09:11:31.2883941Z /usr/bin/ld.gold: warning: bazel-out/k8-opt/bin/external/envoy/source/extensions/tracers/xray/_objs/config/config.o: top level DIE is not DW_TAG_compile_unit or DW_TAG_type_unit
2024-04-27T09:11:31.2884917Z /usr/bin/ld.gold: warning: bazel-out/k8-opt/bin/external/v8/_objs/v8_libshared_noicu/debug-stack-trace-iterator.o: top level DIE is not DW_TAG_compile_unit or DW_TAG_type_unit
2024-04-27T09:11:31.2885831Z /usr/bin/ld.gold: warning: bazel-out/k8-opt/bin/external/v8/_objs/v8_libshared_noicu/bytecode-flags.o: top level DIE is not DW_TAG_compile_unit or DW_TAG_type_unit
2024-04-27T09:11:31.2886797Z /usr/bin/ld.gold: warning: bazel-out/k8-opt/bin/external/v8/_objs/v8_libshared_noicu/property.o: top level DIE is not DW_TAG_compile_unit or DW_TAG_type_unit
2024-04-27T09:11:31.2887563Z /usr/bin/ld.gold: warning: bazel-out/k8-opt/bin/external/v8/_objs/v8_libshared_noicu/code-space-access.o: top level DIE is not DW_TAG_compile_unit or DW_TAG_type_unit
2024-04-27T09:11:31.2891840Z /usr/bin/ld.gold: warning: bazel-out/k8-opt/bin/external/v8/_objs/v8_libshared_noicu/proxy-has-property-tq-csa.o: top level DIE is not DW_TAG_compile_unit or DW_TAG_type_unit
2024-04-27T09:11:31.2893363Z /usr/bin/ld.gold: warning: bazel-out/k8-opt/bin/external/v8/_objs/v8_libshared_noicu/reflect-tq-csa.o: top level DIE is not DW_TAG_compile_unit or DW_TAG_type_unit
2024-04-27T09:11:31.2895011Z /usr/bin/ld.gold: warning: bazel-out/k8-opt/bin/external/envoy/source/extensions/config_subscription/rest/_objs/rest_api_fetcher_lib/rest_api_fetcher.o: top level DIE is not DW_TAG_compile_unit or DW_TAG_type_unit
@alanalanyu alanalanyu added the triage Issue requires triage label Apr 27, 2024
@adisuissa
Copy link
Contributor

Thanks for reporting this.
Was the building successful with Envoy version 1.29.0? If not, what was the latest version that was successfully built?

cc @phlax

@adisuissa adisuissa added area/build and removed triage Issue requires triage labels Apr 29, 2024
@phlax
Copy link
Member

phlax commented Apr 29, 2024

i would check on @adisuissa 's suggestion first

the issue is related to gcc (cf https://www.spinics.net/lists/libreoffice/msg08609.html)

i would recommend using llvm via ci/run_envoy_docker.sh to ensure you have the correct version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants