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

Unable to compile sha2-asm v0.6.3 #4

Open
DogewowegoD opened this issue Mar 4, 2024 · 4 comments
Open

Unable to compile sha2-asm v0.6.3 #4

DogewowegoD opened this issue Mar 4, 2024 · 4 comments

Comments

@DogewowegoD
Copy link

The following warnings were emitted during compilation:

warning: [email protected]: cl : Command line warning D9024 : unrecognized source file type 'src/sha512_x64.S', object file assumed
warning: [email protected]: cl : Command line warning D9027 : source file 'src/sha512_x64.S' ignored

error: failed to run custom build command for sha2-asm v0.6.3

Caused by:
process didn't exit successfully: C:\Users\REMOVED\Desktop\pow20-miner-master\target\release\build\sha2-asm-3884818a8e185d6b\build-script-build (exit code: 1)
--- stdout
TARGET = Some("x86_64-pc-windows-msvc")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-pc-windows-msvc")
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
CC_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
CC_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
DEBUG = Some("false")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
CFLAGS_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
CFLAGS_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
running: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\cl.exe" "-nologo" "-MD" "-O2" "-Brepro" "-W4" "-c" "-FoC:\Users\REMOVED\Desktop\pow20-miner-master\target\release\build\sha2-asm-1c8ab5b0128ab4cd\out\src/sha512_x64.o" "-c" "src/sha512_x64.S"
cargo:warning=cl : Command line warning D9024 : unrecognized source file type 'src/sha512_x64.S', object file assumed

cargo:warning=cl : Command line warning D9027 : source file 'src/sha512_x64.S' ignored

cl : Command line warning D9021 : no action performed
exit code: 0
cargo:rerun-if-env-changed=AR_x86_64-pc-windows-msvc
AR_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=AR_x86_64_pc_windows_msvc
AR_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_AR
HOST_AR = None
cargo:rerun-if-env-changed=AR
AR = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64-pc-windows-msvc
ARFLAGS_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64_pc_windows_msvc
ARFLAGS_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_ARFLAGS
HOST_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS
ARFLAGS = None
running: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\lib.exe" "-out:C:\Users\REMOVED\Desktop\pow20-miner-master\target\release\build\sha2-asm-1c8ab5b0128ab4cd\out\libsha512.a" "-nologo" "C:\Users\REMOVED\Desktop\pow20-miner-master\target\release\build\sha2-asm-1c8ab5b0128ab4cd\out\src/sha512_x64.o"
LINK : fatal error LNK1181: cannot open input file 'C:\Users\REMOVED\Desktop\pow20-miner-master\target\release\build\sha2-asm-1c8ab5b0128ab4cd\out\src\sha512_x64.o'
exit code: 1181

--- stderr

error occurred: Command "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\lib.exe" "-out:C:\Users\REMOVED\Desktop\pow20-miner-master\target\release\build\sha2-asm-1c8ab5b0128ab4cd\out\libsha512.a" "-nologo" "C:\Users\REMOVED\Desktop\pow20-miner-master\target\release\build\sha2-asm-1c8ab5b0128ab4cd\out\src/sha512_x64.o" with args "lib.exe" did not execute successfully (status code exit code: 1181).

warning: build failed, waiting for other jobs to finish...

@utxo-detective
Copy link
Contributor

To get this to compile on windows you can edit Cargo.toml and replace sha2 = { version = "=0.10.6", features = ["asm"] } with sha2 = { version = "=0.10.6" }

@Zhell1
Copy link

Zhell1 commented Mar 4, 2024

another easy solution on windows is to use WSL

@utxo-detective
Copy link
Contributor

@Zhell1 do you know if that can be compiled using a feature flag like asm is?

@yanowo
Copy link

yanowo commented Mar 6, 2024

To use asm on Windows, MinGW-W64 GCC is required.

  1. Install MinGW-W64 GCC

  2. Switch to using GNU
    rustup default stable-x86_64-pc-windows-gnu

  3. build
    cargo build --release

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