Skip to content

Regression: linking errors since latest nightly #34754

Closed

Description

@tomaka

Unfortunately I don't have any repro case, as my repro case is my big closed source project that I don't want to be public. Some other smaller projects of mine which use the same libraries and which I thought would trigger the same issue in fact do not trigger the same issue.
After some discussion on IRC, I decided to open an issue despite having no repro to show.

With the 2016-07-03 nightly (commit 696b703), the project compiles fine.
But with the 2016-07-08 nightly (commit 5e18b4b), I'm getting linking errors:

note: libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error L
NK2001: unresolved external symbol _ZN8encoding5types8Encoding11whatwg_name17h8a
002847172e0962E
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding6encode17hc2acf21d2f0b5a
ecE
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding9encode_to17h6b8d0fb5b17
6ec15E
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding6decode17hcc02e59307da6d
60E
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding9decode_to17h8ed258278c1
7edfbE
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding11whatwg_name17h2074370d
10042f2aE
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding6encode17hca510ee43466fc
10E
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding9encode_to17ha87086244a6
f2cbcE
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding6decode17h0667439a4d87c3
8bE
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding9decode_to17h2e8fed91f82
31f7fE
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding6encode17h254265be7b9110
6eE
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding9encode_to17h3a460bcb9f9
fafd2E
libencoding-b89c0661000f249b.rlib(encoding-b89c0661000f249b.1.o) : error LNK2001
: unresolved external symbol _ZN8encoding5types8Encoding6decode17hcaedeaf591cc63
ddE

... (many more) ...

This is with the MSVC 64bits version of Rust.

According to IRC, the culprit is likely #33890

Activity

  1. changed the title [-]Regression: linking errors since last nightly[/-] [+]Regression: linking errors since latest nightly[/+] on Jul 10, 2016
  2. jonas-schievink commented on Jul 10, 2016

    @jonas-schievink
    Contributor
  3. tomaka commented on Jul 10, 2016

    @tomaka
    ContributorAuthor
  4. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jul 10, 2016
  5. tomaka commented on Jul 11, 2016

    @tomaka
    ContributorAuthor

    Couldn't reproduce on Linux. This is likely specific to MSVC.

  6. michaelwoerister commented on Jul 11, 2016

    @michaelwoerister
    Member

    @tomaka Thanks that's all already very valuable information.

    It seems that you are compiling things with multiple codegen units. Does the error also occur if you with just one codegen unit?

  7. tomaka commented on Jul 11, 2016

    @tomaka
    ContributorAuthor

    @michaelwoerister Good point, I had totally forgotten about codegen units. Compiling with codegen-units = 1 fixes the problem.

  8. michaelwoerister commented on Jul 11, 2016

    @michaelwoerister
    Member

    @tomaka OK, that narrows the problem down somewhat.

  9. michaelwoerister commented on Jul 11, 2016

    @michaelwoerister
    Member
    • Are all the linker errors for default methods?
    • Do the errors occur while compiling libencoding or when compiling something that depends on libencoding?
  10. tomaka commented on Jul 11, 2016

    @tomaka
    ContributorAuthor

    Are all the linker errors for default methods?

    All the errors are the ones I linked above. The 5 default methods and the 4 methods of the trait implementation (of which only 1 overwrites a default method).

    Do the errors occur while compiling libencoding or when compiling something that depends on libencoding?

    No. encoding is only pulled because it is an indirect dependency of one of my crates named "browser", which is itself a dependency of the big project. However compiling an example of "browser" works fine.

    That's why I don't really know where to look for to find a repro.

  11. tomaka commented on Jul 11, 2016

    @tomaka
    ContributorAuthor

    If you wish so I can also upload the project to a private location.

  12. michaelwoerister commented on Jul 11, 2016

    @michaelwoerister
    Member

    @tomaka That would be helpful.

  13. 2 remaining items

  14. pnkfelix commented on Jul 21, 2016

    @pnkfelix
    Contributor

    triage: P-high

  15. michaelwoerister commented on Jul 22, 2016

    @michaelwoerister
    Member

    I'll see that I'll take care of this next week.

  16. brson commented on Aug 4, 2016

    @brson
    Contributor

    @mw status update?

    This will go to beta on 8/18.

  17. michaelwoerister commented on Aug 4, 2016

    @michaelwoerister
    Member

    There were a few refactorings I needed to do before being able to fix this. These have landed by now, so I expect that the actual fix should be ready before beta.

  18. brson commented on Aug 4, 2016

    @brson
    Contributor

    Sweet!

  19. nikomatsakis commented on Aug 11, 2016

    @nikomatsakis
    Contributor

    Update from @rust-lang/compiler meeting: fix is in the queue, upping priority since this is a regression.

  20. michaelwoerister commented on Aug 15, 2016

    @michaelwoerister
    Member

    So, this should be fixed (via #35534) but there is no nightly containing the fix yet.

  21. michaelwoerister commented on Aug 18, 2016

    @michaelwoerister
    Member

    OK, the latest nightly contains the fix. Could you please test whether it solves your problem? (and close the issue if it does)

  22. tomaka commented on Aug 18, 2016

    @tomaka
    ContributorAuthor

    Thanks, seems to work!

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

Metadata

Metadata

Labels

P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions