darfink / detour-rs

A cross-platform detour library written in Rust
Other
406 stars 75 forks source link

Build errors #12

Closed JVictorV closed 5 years ago

JVictorV commented 5 years ago

Im kinda new to rust so, im sorry if thats not the right place to ask. When i try to run cargo build I get the following error:

E:\Rust\rusty-cube (master -> origin) λ cargo build Compiling winapi v0.2.8 Compiling libudis86-sys v0.2.0 Compiling region v2.1.0 error: failed to run custom build command for libudis86-sys v0.2.0

Caused by: process didn't exit successfully: E:\Rust\rusty-cube\target\debug\build\libudis86-sys-574469093d5e1b3f\build-script-build (exit code: 101) --- stdout TARGET = Some("x86_64-pc-windows-gnu") OPT_LEVEL = Some("0") TARGET = Some("x86_64-pc-windows-gnu") HOST = Some("x86_64-pc-windows-gnu") TARGET = Some("x86_64-pc-windows-gnu") TARGET = Some("x86_64-pc-windows-gnu") HOST = Some("x86_64-pc-windows-gnu") CC_x86_64-pc-windows-gnu = None CC_x86_64_pc_windows_gnu = None HOST_CC = None CC = None TARGET = Some("x86_64-pc-windows-gnu") HOST = Some("x86_64-pc-windows-gnu") CFLAGS_x86_64-pc-windows-gnu = None CFLAGS_x86_64_pc_windows_gnu = None HOST_CFLAGS = None CFLAGS = None DEBUG = Some("true") running: "gcc.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-m64" "-I" "libudis86" "-includestring.h" "-Wall" "-Wextra" "-o" "E:\Rust\rusty-cube\target\debug\build\libudis86-sys-1a1a1859c01f0f11\out\libudis86\decode.o" "-c" "libudis86\decode.c" cargo:warning=libudis86\decode.c:1:0: sorry, unimplemented: 64-bit mode not compiled in cargo:warning= /* udis86 - libudis86/decode.c cargo:warning= exit code: 1

--- stderr thread 'main' panicked at '

Internal error occurred: Command "gcc.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-m64" "-I" "libudis86" "-includestring.h" "-Wall" "-Wextra" "-o" "E:\Rust\rusty-cube\target\debug\build\libudis86-sys-1a1a1859c01f0f11\out\libudis86\decode.o" "-c" "libudis86\decode.c" with args "gcc.exe" did not execute successfully (status code exit code: 1).

', C:\Users\J\.cargo\registry\src\github.com-1ecc6299db9ec823\gcc-0.3.55\src\lib.rs:1672:5 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.

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

darfink commented 5 years ago

From what I can tell, it seems as if libudis86 is being compiled for x64 (a detour-rs dependency) but your GCC has not x64 support. What environment are you using (Windows version, GCC version etc)?

Potential solutions may be:

Please note that if you intend to detour applications using the MSVC ABI the *-msvc targets are preferred.

JVictorV commented 5 years ago

Tnx for the help sir, i've updated MSVC and reinstalled rust and it works now