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

Compilation on windows fails because of the -E script #92

Open
nevakrien opened this issue Aug 20, 2024 · 1 comment
Open

Compilation on windows fails because of the -E script #92

nevakrien opened this issue Aug 20, 2024 · 1 comment

Comments

@nevakrien
Copy link

running on Windows 10 fails on the gnu build. i tried with both zig cc and clang and both error.
not really sure how to even begin debugging it. i tried changing the target or set it explicitly but both failed

warning: [email protected]: Compiler family detection failed due to error: ToolExecError: Command "zig" "-E" "C:\\Users\\Owner\\Desktop\\FuncLang\\target\\debug\\build\\stacker-9242582375978c70\\out\\2156937602692143863detect_compiler_family.c" with args zig did not execute successfully (status code exit code: 1).
warning: [email protected]: error: UnknownOperatingSystem

error: failed to run custom build command for `stacker v0.1.15`

Caused by:
  process didn't exit successfully: `C:\Users\Owner\Desktop\FuncLang\target\debug\build\stacker-9c1c49705a09134c\build-script-build` (exit code: 1)
  --- stdout
  OUT_DIR = Some(C:\Users\Owner\Desktop\FuncLang\target\debug\build\stacker-9242582375978c70\out)
  TARGET = Some(x86_64-pc-windows-gnu)
  OPT_LEVEL = Some(0)
  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 = Some(zig cc)
  cargo:rerun-if-env-changed=CC_KNOWN_WRAPPER_CUSTOM
  CC_KNOWN_WRAPPER_CUSTOM = None
  RUSTC_WRAPPER = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:warning=Compiler family detection failed due to error: ToolExecError: Command "zig" "-E" "C:\\Users\\Owner\\Desktop\\FuncLang\\target\\debug\\build\\stacker-9242582375978c70\\out\\2156937602692143863detect_compiler_family.c" with args zig did not execute successfully (status code exit code: 1).
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(true)
  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
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:warning=error: UnknownOperatingSystem

  --- stderr


  error occurred: Command "zig" "cc" "-O0" "--target=x86_64-pc-windows-gnu" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "--target=x86_64-pc-windows-gnu" "-I" "src/arch" "-Wall" "-Wextra" "-DWINDOWS" "-o" "C:\\Users\\Owner\\Desktop\\FuncLang\\target\\debug\\build\\stacker-9242582375978c70\\out\\e4479bd7784abb10-windows.o" "-c" "src/arch/windows.c" with args zig did not execute successfully (status code exit code: 1).


warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: [email protected]: Compiler family detection failed due to error: ToolExecError: Command "zig" "-E" "C:\\Users\\Owner\\Desktop\\FuncLang\\target\\debug\\build\\psm-f4b2ee18c51e03bb\\out\\8816980950981589074detect_compiler_family.c" with args zig did not execute successfully (status code exit code: 1).
warning: [email protected]: Compiler family detection failed due to error: ToolExecError: Command "zig" "-E" "C:\\Users\\Owner\\Desktop\\FuncLang\\target\\debug\\build\\psm-f4b2ee18c51e03bb\\out\\14977092860116801484detect_compiler_family.c" with args zig did not execute successfully (status code exit code: 1).
warning: [email protected]: error: UnknownOperatingSystem

error: failed to run custom build command for `psm v0.1.21`

Caused by:
  process didn't exit successfully: `C:\Users\Owner\Desktop\FuncLang\target\debug\build\psm-e074ee174d07b3a7\build-script-build` (exit code: 1)
  --- stdout
  OPT_LEVEL = Some(0)
  TARGET = Some(x86_64-pc-windows-gnu)
  OUT_DIR = Some(C:\Users\Owner\Desktop\FuncLang\target\debug\build\psm-f4b2ee18c51e03bb\out)
  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 = Some(zig cc)
  cargo:rerun-if-env-changed=CC_KNOWN_WRAPPER_CUSTOM
  CC_KNOWN_WRAPPER_CUSTOM = None
  RUSTC_WRAPPER = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:warning=Compiler family detection failed due to error: ToolExecError: Command "zig" "-E" "C:\\Users\\Owner\\Desktop\\FuncLang\\target\\debug\\build\\psm-f4b2ee18c51e03bb\\out\\8816980950981589074detect_compiler_family.c" with args zig did not execute successfully (status code exit code: 1).
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(true)
  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
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rustc-cfg=asm
  cargo:warning=Compiler family detection failed due to error: ToolExecError: Command "zig" "-E" "C:\\Users\\Owner\\Desktop\\FuncLang\\target\\debug\\build\\psm-f4b2ee18c51e03bb\\out\\14977092860116801484detect_compiler_family.c" with args zig did not execute successfully (status code exit code: 1).
  cargo:warning=error: UnknownOperatingSystem

  --- stderr


  error occurred: Command "zig" "cc" "-O0" "--target=x86_64-pc-windows-gnu" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "--target=x86_64-pc-windows-gnu" "-Wall" "-Wextra" "-xassembler-with-cpp" "-DCFG_TARGET_OS_windows" "-DCFG_TARGET_ARCH_x86_64" "-DCFG_TARGET_ENV_gnu" "-o" "C:\\Users\\Owner\\Desktop\\FuncLang\\target\\debug\\build\\psm-f4b2ee18c51e03bb\\out\\e4479bd7784abb10-x86_64_windows_gnu.o" "-c" "src/arch/x86_64_windows_gnu.s" with args zig did not execute successfully (status code exit code: 1).



C:\Users\Owner\Desktop\FuncLang>
@nagisa
Copy link
Member

nagisa commented Aug 27, 2024

I'll redirect you to https://github.com/rust-lang/cc-rs

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

2 participants