Editing proc-macro crate = undefined symbol

73fdeb6
Opened by Sage Griffin at 2023-10-04 04:29:51

Note: This is with incremental-comp turned off, and a compiler built yesterday.

Occasionally when working on Diesel's codegen crates, I'll get an error like this:

error: dlsym(0x113560e00, __rustc_derive_registrar__55df2b44c5129c66de0914ff53563457_89): symbol not found
   --> diesel/src/lib.rs:121:1
    |
121 | extern crate diesel_derives2;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The only fix when this happens is to cargo clean. It randomly happens when I change some code, but not 100% of the time.

  1. I can confirm this happens.

    @sgrif As a workaround to not clean everything, I do:

    find target -name \*culprit-crate-name\* | xargs rm -rf
    

    Anthony Ramine at 2018-02-04 14:15:42

  2. I think this was fixed by https://github.com/rust-lang/rust/pull/47494, so closing.

    Alex Crichton at 2018-03-06 00:08:32

  3. Reopening because #47494 merged on Jan 18 and this was reported on a compiler built Jan 31.

    David Tolnay at 2018-03-06 00:10:40

  4. Oh oops, indeed!

    Alex Crichton at 2018-03-06 00:17:01

  5. Triage: Is this still a problem? Wanted to ask since 5 years have passed and circumstances might have changed.

    Martin Nordholts at 2023-10-04 04:29:51