Skip to content

Tests compilation fails with "Undefined symbols for architecture x86_64" #107513

New issue

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

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

Already on GitHub? # to your account

Open
fafhrd91 opened this issue Jan 31, 2023 · 9 comments
Open
Labels
A-async-await Area: Async & Await AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example

Comments

@fafhrd91
Copy link

Cannot compile tests. Started with 1.65, but I am not sure. I started to use GAT in my library. Reproducible on OSX, Linux, Windows.

Here is link to public build

  = note: Undefined symbols for architecture x86_64:
            "core::future::from_generator::h1dc043fb97652d62", referenced from:
                ntex_mqtt::v5::dispatcher::factory::_$u7b$$u7b$closure$u7d$$u7d$::hc1c12b2e69da9f3b in test_server_v5-71091bd1c6e9897d.6cnbfx9nzh3wubt.rcgu.o
            "core::future::from_generator::h21569d3b120a00ed", referenced from:
                ntex_mqtt::v5::dispatcher::factory::_$u7b$$u7b$closure$u7d$$u7d$::ha65332eee6
....
@fafhrd91 fafhrd91 added the C-bug Category: This is a bug. label Jan 31, 2023
@fafhrd91
Copy link
Author

tests work with "cargo llvm-cov" though

@Noratrieb
Copy link
Member

Does it work on the latest nightly?
cc @Swatinem

@Noratrieb Noratrieb added the A-async-await Area: Async & Await label Jan 31, 2023
@fafhrd91
Copy link
Author

no, it doesn't

@Swatinem
Copy link
Contributor

If it happens in 1.65, it predates my work to remove core::future::from_generator.

@Swatinem
Copy link
Contributor

Although nightly would print a different linker error?

@fafhrd91
Copy link
Author

yes, nightly produces different output

  = note: Undefined symbols for architecture x86_64:
            "core::future::identity_future::hc6c42408f0556a34", referenced from:
                subs::main::hfe24f8373e798c51 in subs-215ee2078c3fd6c3.2jehmlx5juwji94z.rcgu.o
            "ntex_rt::builder::SystemRunner::block_on::h8f82d2ac5177ec22", referenced from:
                subs::main::hfe24f8373e798c51 in subs-215ee2078c3fd6c3.2jehmlx5juwji94z.rcgu.o
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

@Swatinem
Copy link
Contributor

            "ntex_rt::builder::SystemRunner::block_on::h8f82d2ac5177ec22", referenced from:
                subs::main::hfe24f8373e798c51 in subs-215ee2078c3fd6c3.2jehmlx5juwji94z.rcgu.o

That doesn’t involve any async internals, though it might include inlined things.

@fafhrd91
Copy link
Author

here link to GitHub action with failures with different versions of rust

https://github.com/ntex-rs/ntex-mqtt/actions/runs/4053694163

@eholk
Copy link
Contributor

eholk commented Feb 13, 2023

It'd be good to get a smaller test case if possible! It may not be directly async related.

@eholk eholk added AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Feb 13, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-async-await Area: Async & Await AsyncAwait-Triaged Async-await issues that have been triaged during a working group meeting. C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
Projects
None yet
Development

No branches or pull requests

4 participants