Rust-SDL2 / rust-sdl2

SDL2 bindings for Rust
MIT License
2.76k stars 473 forks source link

MSB1009 when building sdl2-sys with bundled on in Cargo Workspace, W10, VS2019 installed. #1018

Open mysteriouspants opened 4 years ago

mysteriouspants commented 4 years ago

This is the error I got.

PS C:\Code\seven_valleys> cargo build
    Updating crates.io index
  Downloaded adler v0.2.3
  Downloaded c_vec v1.3.3
  Downloaded cc v1.0.58
  Downloaded cmake v0.1.44
  Downloaded sdl2 v0.34.2
  Downloaded unidiff v0.3.3
  Downloaded tar v0.4.29
  Downloaded version-compare v0.0.10
  Downloaded sdl2-sys v0.34.2
  Downloaded libc v0.2.73
  Downloaded 10 crates (1.3 MB) in 4.55s
   Compiling cfg-if v0.1.10
   Compiling memchr v2.3.3
   Compiling winapi v0.3.9
   Compiling libc v0.2.73
   Compiling crc32fast v1.2.0
   Compiling lazy_static v1.4.0
   Compiling encoding_rs v0.8.23
   Compiling regex-syntax v0.6.18
   Compiling adler v0.2.3
   Compiling cc v1.0.58
   Compiling version-compare v0.0.10
   Compiling bitflags v1.2.1
   Compiling sdl2 v0.34.2
   Compiling c_vec v1.3.3
   Compiling thread_local v1.0.1
   Compiling miniz_oxide v0.4.0
   Compiling aho-corasick v0.7.13
   Compiling flate2 v1.0.16
   Compiling cmake v0.1.44
   Compiling regex v1.3.9
   Compiling filetime v0.2.10
   Compiling tar v0.4.29
   Compiling unidiff v0.3.3
   Compiling sdl2-sys v0.34.2
error: failed to run custom build command for `sdl2-sys v0.34.2`

Caused by:
  process didn't exit successfully: `C:\Code\seven_valleys\target\debug\build\sdl2-sys-c775d2d62dcf7412\build-script-build` (exit code: 101)
--- stdout
running: "cmake" "C:\\Code\\seven_valleys\\target\\debug\\build\\sdl2-sys-bc767439f5ce6669\\out\\SDL2-2.0.10" "-G" "Visual Studio 16 2019" "-Thost=x64" "-Ax64" "-DSDL_SHARED=ON" "-DSDL_STATIC=OFF" "-DCMAKE_INSTALL_PREFIX=C:\\Code\\seven_valleys\\target\\debug\\build\\sdl2-sys-bc767439f5ce6669\\out" "-DCMAKE_C_FLAGS= -nologo -MD -Brepro" "-DCMAKE_C_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_BUILD_TYPE=release"
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
-- The C compiler identification is MSVC 19.26.28806.0
-- The CXX compiler identification is MSVC 19.26.28806.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Performing Test HAVE_WIN32_CC
-- Performing Test HAVE_WIN32_CC - Success
-- Performing Test HAVE_XINPUT_H
-- Performing Test HAVE_XINPUT_H - Success
-- Performing Test HAVE_XINPUT_GAMEPAD_EX
-- Performing Test HAVE_XINPUT_GAMEPAD_EX - Failed
-- Performing Test HAVE_XINPUT_STATE_EX
-- Performing Test HAVE_XINPUT_STATE_EX - Failed
-- Looking for d3d9.h
-- Looking for d3d9.h - found
-- Looking for d3d11_1.h
-- Looking for d3d11_1.h - found
-- Looking for ddraw.h
-- Looking for ddraw.h - found
-- Looking for dsound.h
-- Looking for dsound.h - found
-- Looking for dinput.h
-- Looking for dinput.h - found
-- Looking for dxgi.h
-- Looking for dxgi.h - found
-- Looking for mmdeviceapi.h
-- Looking for mmdeviceapi.h - found
-- Looking for audioclient.h
-- Looking for audioclient.h - found
-- Looking for endpointvolume.h
-- Looking for endpointvolume.h - found
--
-- SDL2 was configured with the following options:
--
-- Platform: Windows-10.0.19041
-- 64-bit:   TRUE
-- Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe
--
-- Subsystems:
--   Atomic:    ON
--   Audio:     ON
--   Video:     ON
--   Render:    ON
--   Events:    ON
--   Joystick:  ON
--   Haptic:    ON
--   Power:     ON
--   Threads:   ON
--   Timers:    ON
--   File:      ON
--   Loadso:    ON
--   CPUinfo:   ON
--   Filesystem:        ON
--   Dlopen:    ON
--   Sensor:    ON
--
-- Options:
--   3DNOW                  (Wanted: ON): OFF
--   ALSA                   (Wanted: OFF): OFF
--   ALSA_SHARED            (Wanted: OFF): OFF
--   ALTIVEC                (Wanted: ON): OFF
--   ARTS                   (Wanted: OFF): OFF
--   ARTS_SHARED            (Wanted: OFF): OFF
--   ASSEMBLY               (Wanted: ON): OFF
--   ASSERTIONS             (Wanted: auto): auto
--   BACKGROUNDING_SIGNAL   (Wanted: OFF): OFF
--   CLOCK_GETTIME          (Wanted: OFF): OFF
--   DIRECTFB_SHARED        (Wanted: OFF): OFF
--   DIRECTX                (Wanted: ON): ON
--   DISKAUDIO              (Wanted: ON): ON
--   DUMMYAUDIO             (Wanted: ON): ON
--   ESD                    (Wanted: OFF): OFF
--   ESD_SHARED             (Wanted: OFF): OFF
--   FOREGROUNDING_SIGNAL   (Wanted: OFF): OFF
--   FUSIONSOUND            (Wanted: OFF): OFF
--   FUSIONSOUND_SHARED     (Wanted: OFF): OFF
--   GCC_ATOMICS            (Wanted: OFF): OFF
--   HIDAPI                 (Wanted: ON): ON
--   INPUT_TSLIB            (Wanted: OFF): OFF
--   JACK                   (Wanted: OFF): OFF
--   JACK_SHARED            (Wanted: OFF): OFF
--   KMSDRM_SHARED          (Wanted: OFF): OFF
--   LIBC                   (Wanted: OFF): OFF
--   LIBSAMPLERATE          (Wanted: OFF): OFF
--   LIBSAMPLERATE_SHARED   (Wanted: OFF): OFF
--   MMX                    (Wanted: ON): OFF
--   NAS                    (Wanted: OFF): OFF
--   NAS_SHARED             (Wanted: OFF): OFF
--   OSS                    (Wanted: OFF): OFF
--   PTHREADS               (Wanted: OFF): OFF
--   PTHREADS_SEM           (Wanted: OFF): OFF
--   PULSEAUDIO             (Wanted: OFF): OFF
--   PULSEAUDIO_SHARED      (Wanted: OFF): OFF
--   RENDER_D3D             (Wanted: ON): ON
--   RPATH                  (Wanted: OFF): OFF
--   SDL_DLOPEN             (Wanted: ON): OFF
--   SDL_STATIC_PIC         (Wanted: OFF): OFF
--   SDL_TEST               (Wanted: OFF): OFF
--   SNDIO                  (Wanted: OFF): OFF
--   SNDIO_SHARED           (Wanted: OFF): OFF
--   SSE                    (Wanted: ON): ON
--   SSE2                   (Wanted: ON): ON
--   SSE3                   (Wanted: ON): ON
--   SSEMATH                (Wanted: ON): OFF
--   VIDEO_COCOA            (Wanted: OFF): OFF
--   VIDEO_DIRECTFB         (Wanted: OFF): OFF
--   VIDEO_DUMMY            (Wanted: ON): ON
--   VIDEO_KMSDRM           (Wanted: OFF): OFF
--   VIDEO_OPENGL           (Wanted: ON): ON
--   VIDEO_OPENGLES         (Wanted: ON): ON
--   VIDEO_RPI              (Wanted: OFF): OFF
--   VIDEO_VIVANTE          (Wanted: OFF): OFF
--   VIDEO_VULKAN           (Wanted: ON): ON
--   VIDEO_WAYLAND          (Wanted: OFF): OFF
--   VIDEO_WAYLAND_QT_TOUCH (Wanted: OFF): OFF
--   VIDEO_X11              (Wanted: OFF): OFF
--   VIDEO_X11_XCURSOR      (Wanted: OFF): OFF
--   VIDEO_X11_XINERAMA     (Wanted: OFF): OFF
--   VIDEO_X11_XINPUT       (Wanted: OFF): OFF
--   VIDEO_X11_XRANDR       (Wanted: OFF): OFF
--   VIDEO_X11_XSCRNSAVER   (Wanted: OFF): OFF
--   VIDEO_X11_XSHAPE       (Wanted: OFF): OFF
--   VIDEO_X11_XVM          (Wanted: OFF): OFF
--   WASAPI                 (Wanted: ON): OFF
--   WAYLAND_SHARED         (Wanted: OFF): OFF
--   X11_SHARED             (Wanted: OFF): OFF
--
--  CFLAGS:         -nologo -MD -Brepro  -IC:/Code/seven_valleys/target/debug/build/sdl2-sys-bc767439f5ce6669/out/SDL2-2.0.10/src/hidapi/hidapi
--  EXTRA_CFLAGS:
--  EXTRA_LDFLAGS:
--  EXTRA_LIBS:    user32;gdi32;winmm;imm32;ole32;oleaut32;version;uuid;advapi32;setupapi;shell32;vcruntime;dinput8
--
--  Build Shared Library: ON
--  Build Static Library: OFF
--
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Code/seven_valleys/target/debug/build/sdl2-sys-bc767439f5ce6669/out/build
running: "cmake" "--build" "." "--target" "install" "--config" "release" "--"
Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: install.vcxproj

--- stderr
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_ASM_FLAGS
    CMAKE_ASM_FLAGS_RELEASE

thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', C:\Users\Christopher R Miller\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.44\src\lib.rs:885:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The following are the Cargo.toml files of interest.

# \Code\seven_valleys\Cargo.toml
[workspace]
members = [ "sv-bin", "sv-lib" ]

# \Code\seven_valleys\sv-lib\Cargo.toml
[package]
name = "sv-lib"
version = "0.1.0"
edition = "2018"
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies.sdl2]
version = "0.34.2"
default-features = false
features = [ "ttf", "image", "gfx", "mixer", "bundled" ]
paulbricman commented 3 years ago

Hi @mysteriouspants, did you manage to fix the issue by any chance?

mysteriouspants commented 3 years ago

Sorry, I don't have anything else to show here - had to work on some other projects. When I get back to this if I find a fix I'll open a PR.