Skip to content

MinGW: Linking error while building rustc_data_structures - ld "cannot find -lsynchronization" #49080

Closed
@petrochenkov

Description

@petrochenkov
Contributor

ping @Zoxc probably

Haven't investigated this myself yet, just posting here in case there's a known fix.

Activity

added
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
on Mar 16, 2018
Zoxc

Zoxc commented on Mar 16, 2018

@Zoxc
Contributor

Do you have a log? How did you produce this?

retep998

retep998 commented on Mar 16, 2018

@retep998
Member

Are you getting this error while building Rust itself? If so, your MinGW installation is missing libsynchronization.a.

petrochenkov

petrochenkov commented on Mar 16, 2018

@petrochenkov
ContributorAuthor

Ok, libsynchronization.a is indeed a part of mingw-w64 toolchain, but it's a relatively new part that first appeared in 6.3.0, but I use 6.2.0 due to gdb bugs in newer versions.

It looks like parking_lot depends on this library (through WaitOnAddress), and rustc_data_structures now depends on parking_lot thus bumping version requirement for mingw-w64 toolchain to 6.3.0.

I guess I'll have to do what our CI does and use newer toolchain with gdb replaced with older version.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windows-gnuToolchain: GNU, Operating system: WindowsT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Zoxc@retep998@petrochenkov

        Issue actions

          MinGW: Linking error while building `rustc_data_structures` - ld "cannot find -lsynchronization" · Issue #49080 · rust-lang/rust