Skip to content

multiple definition in librand with parallel codegen #18243

Closed
@msiemens

Description

@msiemens

When building rustc with parallel codegen, linking librand fails:

rustc: i686-w64-mingw32/stage0/bin/rustlib/i686-w64-mingw32/lib/librand
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.1.o:(.rdata+0x2c0): multiple definition of `isaac::IsaacRng.Rng::next_u32::_MSG_FILE_LINE::hc349c9a6706e0477dMb'
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.0.o:(.rdata+0x410): first defined here
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.1.o:(.rdata+0x310): multiple definition of `isaac::Isaac64Rng.Rng::next_u64::_MSG_FILE_LINE::hc349c9a6706e0477Mgc'
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.0.o:(.rdata+0x460): first defined here
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.2.o:(.rdata+0x190): multiple definition of `isaac::IsaacRng.Rng::next_u32::_MSG_FILE_LINE::hc349c9a6706e0477dMb'
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.0.o:(.rdata+0x410): first defined here
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.2.o:(.rdata+0x1e0): multiple definition of `isaac::Isaac64Rng.Rng::next_u64::_MSG_FILE_LINE::hc349c9a6706e0477Mgc'
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.0.o:(.rdata+0x460): first defined here
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.3.o:(.rdata+0x2b50): multiple definition of `isaac::IsaacRng.Rng::next_u32::_MSG_FILE_LINE::hc349c9a6706e0477dMb'
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.0.o:(.rdata+0x410): first defined here
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.3.o:(.rdata+0x3bc0): multiple definition of `isaac::Isaac64Rng.Rng::next_u64::_MSG_FILE_LINE::hc349c9a6706e0477Mgc'
i686-w64-mingw32\stage0\bin\rustlib\i686-w64-mingw32\lib\rand-4e7c5e5c.0.o:(.rdata+0x460): first defined here
collect2.exe: error: ld returned 1 exit status

I'm using Windows 7 x64 with MSYS2

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions