Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

cargo build --profile production fails with linker error when ran on the substrate repo #13376

@athei

Description

@athei

The production profile is used for benchmarking. I get the following error when linking node-template:

= note: Undefined symbols for architecture arm64:
            "wasmtime_runtime::libcalls::trampolines::impl_table_fill_funcref::heae340996f2a67ea", referenced from:
                _table_fill_funcref in node_template-b694b63f0433be47.node_template.30339334-cgu.0.rcgu.o
            "wasmtime_runtime::libcalls::trampolines::impl_table_grow_funcref::hd4e8b458d7fde540", referenced from:
                _table_grow_funcref in node_template-b694b63f0433be47.node_template.30339334-cgu.0.rcgu.o
          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

There are more crates who throw this and similar errors. They are all related to wasmtime. Apparently it only happens when lto is enabled (which is only the case with the production profile). The error was introduced with #13160. The commit before this PR works fine but the commit that includes this PR does not.

Please note that this does not only happen for me locally but also when trying to bench with the benchmarking machine.

I suggest rolling back this PR until we resolved this issue.

cc @koute @alvicsam @ggwpez

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions