Skip to content

Unable to link mingw64 + rust nightly undefined reference to `__imp___acrt_iob_func' #59604

Closed
@norru

Description

@norru

I am trying to compile https://github.com/vulkano-rs/vulkano on nightly.

OS: Windows 10 + mingw64, pacman -Syu to latest mingw64 from MSYS2
Toolchain: nightly-x86_64-pc-windows-gnu
rustc 1.35.0-nightly (bc44841ad 2019-03-14)

MINGW64 /f/Projects/3rdParty/vulkano
$ cargo build
   Compiling vulkano-shaders v0.11.1 (F:\Projects\3rdParty\vulkano\vulkano-shaders)
error: linking with `gcc` failed: exit code: 1
  |
  = note: "gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-nostdlib" "-m64" 

[...snip...]

  = note: F:\Projects\3rdParty\vulkano\target\debug\deps\libshaderc-f274fa1b371f550d.rlib(ShaderLang.cpp.obj):ShaderLang.cpp:(.text$_ZL6printfPKcz+0x29): undefined reference to `__imp___acrt_iob_func'
          F:\Projects\3rdParty\vulkano\target\debug\deps\libshaderc-f274fa1b371f550d.rlib(ossource.cpp.obj):ossource.cpp:(.text$_Z6printfPKcz[_Z6printfPKcz]+0x29): undefined reference to `__imp___acrt_iob_func'
          F:\Projects\3rdParty\vulkano\target\debug\deps\libshaderc-f274fa1b371f550d.rlib(glslang_tab.cpp.obj):glslang_tab.cpp:(.text$_ZL14yy_stack_printPsS_+0xd): undefined reference to `__imp___acrt_iob_func'
          F:\Projects\3rdParty\vulkano\target\debug\deps\libshaderc-f274fa1b371f550d.rlib(glslang_tab.cpp.obj):glslang_tab.cpp:(.text$_ZL10yydestructPKciP7YYSTYPEPN7glslang13TParseContextE.isra.13+0x23): undefinedference to `__imp___acrt_iob_func'
          F:\Projects\3rdParty\vulkano\target\debug\deps\libshaderc-f274fa1b371f550d.rlib(glslang_tab.cpp.obj):glslang_tab.cpp:(.text$_Z7yyparsePN7glslang13TParseContextE+0x8cc): undefined reference to `__imp___aciob_func'
          F:\Projects\3rdParty\vulkano\target\debug\deps\libshaderc-f274fa1b371f550d.rlib(glslang_tab.cpp.obj):glslang_tab.cpp:(.text$_Z7yyparsePN7glslang13TParseContextE+0x90a): more undefined references to `__im_acrt_iob_func' follow


error: aborting due to previous error

error: Could not compile `vulkano-shaders`.

To learn more, run the command again with --verbose.

Building on stable succeeds but I need nightly for development. Building on stable-*-msvc works.

Activity

jonas-schievink

jonas-schievink commented on Apr 1, 2019

@jonas-schievink
Contributor

The Vulkano readme states:

windows-gnu toolchain is not supported but you can instead cross-compile to windows-gnu from windows-msvc

so this looks like a user error to me, even if it did happen to work in the past?

norru

norru commented on Apr 1, 2019

@norru
Author

Ah right, I missed that bit. Thanks.

2 remaining items

Loading
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @norru@jonas-schievink

        Issue actions

          Unable to link mingw64 + rust nightly undefined reference to `__imp___acrt_iob_func' · Issue #59604 · rust-lang/rust