Skip to content

x86_64-pc-windows-gnu toolchains are unable to compile C code on windows-latest runners #173

@Taaitaaiger

Description

@Taaitaaiger

Compiling C code with x86_64-pc-windows-gnu toolchains fails on windows-latest runners, but succeeds on windows-2022 runners. I expect that this issue is related to the recent image update which bumped gcc from 14.2.0 to 15.2.0. I'm not sure if this issue lies with this action, the runner, or somewhere else entirely.

The output I see is:

warning: jlrs-sys@0.1.0: Compiler family detection failed due to error: ToolExecError: command did not execute successfully (status code exit code: 1): "gcc.exe" "-E" "D:\\a\\jlrs\\jlrs\\target\\debug\\build\\jlrs-sys-f5509454f4233fca\\out\\5209160664153460877detect_compiler_family.c"
warning: jlrs-sys@0.1.0: Compiler family detection failed due to error: ToolExecError: command did not execute successfully (status code exit code: 1): "gcc.exe" "-E" "D:\\a\\jlrs\\jlrs\\target\\debug\\build\\jlrs-sys-f5509454f4233fca\\out\\7934276841006892625detect_compiler_family.c"
error: failed to run custom build command for `jlrs-sys v0.1.0 (D:\a\jlrs\jlrs\crates\ffi\jlrs_sys)`

Caused by:
  process didn't exit successfully: `D:\a\jlrs\jlrs\target\debug\build\jlrs-sys-33b483cca500711d\build-script-build` (exit code: 1)
  --- stdout
  cargo::rustc-check-cfg=cfg(julia_1_10,julia_1_11,julia_1_12,julia_1_13)
  cargo::metadata=version=1.12.1
  cargo::metadata=is_dev=0
  cargo::rustc-cfg=julia_1_12
  cargo::rerun-if-changed=src/jlrs_cc/jlrs_cc_ext.c
  cargo::rerun-if-changed=src/jlrs_cc/jlrs_cc_hacks.c
  cargo::rerun-if-changed=src/jlrs_cc/jlrs_cc_reexport.c
  cargo::rerun-if-changed=src/jlrs_cc/jlrs_cc_fast_tls.c
  cargo::rerun-if-changed=src/jlrs_cc/jlrs_cc_ext.h
  cargo::rerun-if-changed=src/jlrs_cc/jlrs_cc_hacks.h
  cargo::rerun-if-changed=src/jlrs_cc/jlrs_cc_reexport.h
  cargo::rerun-if-changed=src/jlrs_cc/jlrs_cc.h
  cargo::rerun-if-changed=src/jlrs_cc/jlrs_cc_fast_tls.h
  cargo::rerun-if-env-changed=JLRS_JULIA_DIR
  cargo::rerun-if-env-changed=PATH
  cargo::rerun-if-env-changed=LD_LIBRARY_PATH
  cargo::rerun-if-env-changed=DYLD_LIBRARY_PATH
  OUT_DIR = Some(D:\a\jlrs\jlrs\target\debug\build\jlrs-sys-f5509454f4233fca\out)
  OPT_LEVEL = Some(0)
  TARGET = Some(x86_64-pc-windows-gnu)
  CARGO_ENCODED_RUSTFLAGS = Some()
  HOST = Some(x86_64-pc-windows-gnu)
  cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
  CC_x86_64-pc-windows-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
  CC_x86_64_pc_windows_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:warning=Compiler family detection failed due to error: ToolExecError: command did not execute successfully (status code exit code: 1): "gcc.exe" "-E" "D:\\a\\jlrs\\jlrs\\target\\debug\\build\\jlrs-sys-f5509454f4233fca\\out\\5209160664153460877detect_compiler_family.c"
  RUSTC_WRAPPER = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(true)
  CARGO_CFG_TARGET_FEATURE = Some(cmpxchg16b,fxsr,sse,sse2,sse3)
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
  CFLAGS_x86_64_pc_windows_gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
  CFLAGS_x86_64-pc-windows-gnu = None
  OUT_DIR = Some(D:\a\jlrs\jlrs\target\debug\build\jlrs-sys-f5509454f4233fca\out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:warning=Compiler family detection failed due to error: ToolExecError: command did not execute successfully (status code exit code: 1): "gcc.exe" "-E" "D:\\a\\jlrs\\jlrs\\target\\debug\\build\\jlrs-sys-f5509454f4233fca\\out\\7934276841006892625detect_compiler_family.c"
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  TARGET = Some(x86_64-pc-windows-gnu)
  CARGO_CFG_TARGET_FEATURE = Some(cmpxchg16b,fxsr,sse,sse2,sse3)
  HOST = Some(x86_64-pc-windows-gnu)
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
  CFLAGS_x86_64_pc_windows_gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
  CFLAGS_x86_64-pc-windows-gnu = None

  --- stderr


  error occurred in cc-rs: command did not execute successfully (status code exit code: 1): "gcc.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-I" "C:\\hostedtoolcache\\windows\\julia\\1.12.1\\x64\\include/julia" "-Wall" "-Wextra" "-DJLRS_FAST_TLS" "-o" "D:\\a\\jlrs\\jlrs\\target\\debug\\build\\jlrs-sys-f5509454f4233fca\\out\\c45ff6e1048f4190-jlrs_cc_ext.o" "-c" "src/jlrs_cc/jlrs_cc_ext.c"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions