Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[msys2] fails to build on GCC-based environments #9245

Closed
ognevny opened this issue Dec 22, 2023 · 10 comments
Closed

[msys2] fails to build on GCC-based environments #9245

ognevny opened this issue Dec 22, 2023 · 10 comments

Comments

@ognevny
Copy link

ognevny commented Dec 22, 2023

build script for version 0.1.9 (package ruff_cli) fails with

  error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
    |
    = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" <a huge number of files invoked>
    = note: D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.aho_corasick-bc7bfad95b99dc10.aho_corasick.b96c42f095208567-cgu.07.rcgu.o.rcgu.o:aho_corasick.b96c4:(.text+0x2043): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.aho_corasick-bc7bfad95b99dc10.aho_corasick.b96c42f095208567-cgu.07.rcgu.o.rcgu.o:aho_corasick.b96c4:(.text+0x2113): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr2_raw2FN17h7e29201c65c3cb9bE'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.aho_corasick-bc7bfad95b99dc10.aho_corasick.b96c42f095208567-cgu.07.rcgu.o.rcgu.o:aho_corasick.b96c4:(.text+0x220b): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr3_raw2FN17ha0437855073b6886E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.aho_corasick-bc7bfad95b99dc10.aho_corasick.b96c42f095208567-cgu.07.rcgu.o.rcgu.o:aho_corasick.b96c4:(.text+0x22de): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.aho_corasick-bc7bfad95b99dc10.aho_corasick.b96c42f095208567-cgu.07.rcgu.o.rcgu.o:aho_corasick.b96c4:(.text+0x2372): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr2_raw2FN17h7e29201c65c3cb9bE'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.aho_corasick-bc7bfad95b99dc10.aho_corasick.b96c42f095208567-cgu.07.rcgu.o.rcgu.o:aho_corasick.b96c4:(.text+0x2405): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr3_raw2FN17ha0437855073b6886E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.libcst_native-729622e976b52f45.libcst_native.4faaf57094d1fd9-cgu.12.rcgu.o.rcgu.o:libcst_native.4faa:(.text+0x10d7): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr2_raw2FN17h7e29201c65c3cb9bE'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.libcst_native-729622e976b52f45.libcst_native.4faaf57094d1fd9-cgu.12.rcgu.o.rcgu.o:libcst_native.4faa:(.text+0x1c98): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr2_raw2FN17h7e29201c65c3cb9bE'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex-4f57ff077656d547.regex.52d01696f5b97498-cgu.03.rcgu.o.rcgu.o:regex.52d01696f5b9:(.text+0x8d8): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x5d7e): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr2_raw2FN17h7e29201c65c3cb9bE'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x5fb9): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr3_raw2FN17ha0437855073b6886E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x60a3): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x63de): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr2_raw2FN17h7e29201c65c3cb9bE'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x64d9): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr3_raw2FN17ha0437855073b6886E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x66b3): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x6c56): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr3_raw2FN17ha0437855073b6886E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x6d28): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x6e01): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr2_raw2FN17h7e29201c65c3cb9bE'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x6ed4): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x7495): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr3_raw2FN17ha0437855073b6886E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x75aa): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr2_raw2FN17h7e29201c65c3cb9bE'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x76a2): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x78e8): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr2_raw2FN17h7e29201c65c3cb9bE'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.02.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x7e17): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr3_raw2FN17ha0437855073b6886E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.10.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x636e): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.10.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x64a2): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr2_raw2FN17h7e29201c65c3cb9bE'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.10.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x65f5): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr11memchr3_raw2FN17ha0437855073b6886E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.14.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x1990): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.14.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x19c3): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.regex_automata-68811d2bf19a347d.regex_automata.cf7c7b0cc1719559-cgu.14.rcgu.o.rcgu.o:regex_automata.cf7:(.text+0x1cc6): undefined reference to `__imp__ZN6memchr4arch6x86_646memchr10memchr_raw2FN17h6e22d7878904c6e1E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.tracing-9c7748c7eeb2656e.tracing.c906aa592a079469-cgu.01.rcgu.o.rcgu.o:tracing.c906aa592a:(.text+0x85): undefined reference to `__imp__ZN12tracing_core10dispatcher15GLOBAL_DISPATCH17h25fad95899cc9180E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.tracing-9c7748c7eeb2656e.tracing.c906aa592a079469-cgu.01.rcgu.o.rcgu.o:tracing.c906aa592a:(.text+0xa1): undefined reference to `__imp__ZN12tracing_core10dispatcher15GLOBAL_DISPATCH17h25fad95899cc9180E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.tracing-9c7748c7eeb2656e.tracing.c906aa592a079469-cgu.01.rcgu.o.rcgu.o:tracing.c906aa592a:(.text+0x275): undefined reference to `__imp__ZN12tracing_core10dispatcher15GLOBAL_DISPATCH17h25fad95899cc9180E'
            D:/M/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\_\B\src\ruff-0.1.9\target\release\deps\ruff-7982543447b9eecc.tracing-9c7748c7eeb2656e.tracing.c906aa592a079469-cgu.01.rcgu.o.rcgu.o:tracing.c906aa592a:(.text+0x2a0): undefined reference to `__imp__ZN12tracing_core10dispatcher15GLOBAL_DISPATCH17h25fad95899cc9180E'
            collect2.exe: error: ld returned 1 exit status
            
    = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
    = note: use the `-l` flag to specify native libraries to link
    = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
  
  error: could not compile `ruff_cli` (bin "ruff") due to previous error
  💥 maturin failed
    Caused by: Failed to build a native library through cargo
    Caused by: Cargo build finished with "exit code: 101": `"cargo" "rustc" "--all-features" "--message-format" "json-render-diagnostics" "--locked" "--manifest-path" "C:\\_\\B\\src\\ruff-0.1.9\\crates\\ruff_cli\\Cargo.toml" "--release" "--bin" "ruff" "--" "-C" "link-arg=-s"`

see PR actions for full log

on GCC-based environments (MINGW64 and UCRT64). clang-based environment (CLANG64) work fine

@ognevny ognevny changed the title [msys2] failed to build on GCC-based environments [msys2] fails to build on GCC-based environments Dec 22, 2023
@BurntSushi
Copy link
Member

This looks like something wrong in the environment, or more likely, something wrong in the toolchain. From what I can see, you're getting linker errors from Rust symbols. That generally shouldn't happen AIUI. But to be honest, I don't know much about the x86_64-w64-mingw32-gcc target.

For reference, one of the functions in the linker error is this one. And the only way that function isn't defined is if target_os != "x86_64".

One thing that catches my eye is that the target seems to be 64-bit, but it also has a "32" in the name via mingw32. I wonder if there is some significance to that.

The memchr crate is widely use in the Rust ecosystem. Do you have any trouble building other Rust programs for the same target?

@ognevny
Copy link
Author

ognevny commented Jan 4, 2024

mingw32 is just the name like win32. msys2 uses mingw-w64, which supports 64-bit of course. in msys2 we actively maintain rust toolchain and we already have dozens of packages compiled with rust. but there is no x86_64-w64-mingw32 target, so we use some hacks while building rust. we didn't encounter any issues with memchr target

@BurntSushi
Copy link
Member

Yeah I dunno. I'm also the maintainer of memchr, regex-automata and aho-corasick. The linker errors for Rust symbols definitely lead me to guess that the issue is not on our/my end. But I don't have any guesses beyond that unfortunately.

@mati865
Copy link

mati865 commented Jan 4, 2024

I don't know much about the x86_64-w64-mingw32-gcc target.

here is no x86_64-w64-mingw32 target, so we use some hacks while building rust

There are no hacks involved, x86_64-w64-mingw32 is GNU name for this target and x86_64-pc-windows-gnu is LLVM name (inherited by Rust) but they mean the same thing.

Looking at the logs it looks like the statics might incorrectly imported/exported or the link order is wrong but that shouldn't be caused by these crates. It's likely an issue with rustc but I won't have time to debug it soon.

@ognevny
Copy link
Author

ognevny commented Jan 4, 2024

Looking at the logs it looks like the statics might incorrectly imported/exported or the link order is wrong but that shouldn't be caused by these crates. It's likely an issue with rustc but I won't have time to debug it soon.

I haven't tested ruff 0.1.11 yet and also didn't try to rebuild with rust 1.75.0. I can do this only on January 8th

@mati865
Copy link

mati865 commented Jan 4, 2024

I have tested current git repo with 1.74 and 1.75, they both have the same issue.

@mati865
Copy link

mati865 commented Jan 4, 2024

It has "regressed" in 3ce145c and changing lto = "thin" to lto = "fat" makes it build which sounds like rust-lang/rust#109797

@ognevny
Copy link
Author

ognevny commented Jan 5, 2024

It has "regressed" in 3ce145c and changing lto = "thin" to lto = "fat" makes it build which sounds like rust-lang/rust#109797

thanks for investigation!

@ognevny
Copy link
Author

ognevny commented Jan 8, 2024

we fixed the issue. can be closed

@ognevny ognevny closed this as completed Jan 8, 2024
@cr1901
Copy link

cr1901 commented Feb 17, 2024

I ran into this exact error while trying to add ruff as a dependency to a pdm project. This is a virtual/isolated environment, and I have to do a source build due to wheels not being provided for mingw by PyPI. I also wanted to avoid the need to fork the ruff repo just to tweak the release profile to remove thin LTO (and manually track new versions).

Since per-target profiles aren't really a thing, I was able to get around this issue by setting the environment variable CARGO_PROFILE_RELEASE_LTO to false. This'll work for me for now until rust-lang/rust#109797 is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants