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

[SDL1:x86-windows] build failure #7535

Closed
Christsnatcher opened this issue Aug 3, 2019 · 12 comments
Closed

[SDL1:x86-windows] build failure #7535

Christsnatcher opened this issue Aug 3, 2019 · 12 comments
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@Christsnatcher
Copy link

Christsnatcher commented Aug 3, 2019

Host Environment

  • Windows 8.1 x64
  • MSVC++ 14.22 _MSC_VER == 1922 Visual Studio 2019

To Reproduce
vcpkg install sdl1:x86-windows

Failure logs
D:\Code\Repos\vcpkg>vcpkg install sdl1:x86-windows
The following packages will be built and installed:
sdl1[core]:x86-windows
Starting package 1/1: sdl1:x86-windows
Building package sdl1[core]:x86-windows...
-- Downloading https://github.com/SDL-Mirror/SDL/archive/release-1.2.15.tar.gz...
-- Extracting source D:/Code/Repos/vcpkg/downloads/SDL-Mirror-SDL-release-1.2.15.tar.gz
-- Applying patch export-symbols-only-in-shared-build.patch
-- Using source at D:/Code/Repos/vcpkg/buildtrees/sdl1/src/ase-1.2.15-2ca6426de6
-- Installing: D:/Code/Repos/vcpkg/buildtrees/sdl1/src/ase-1.2.15-2ca6426de6/VisualC/SDL/SDL.vcxproj
-- Installing: D:/Code/Repos/vcpkg/buildtrees/sdl1/src/ase-1.2.15-2ca6426de6/VisualC/SDLmain/SDLmain.vcxproj
-- Building VisualC/SDL1_2017.sln for Release
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:58 (message):
Command failed: msbuild D:/Code/Repos/vcpkg/buildtrees/sdl1/x86-windows-rel/ase-1.2.15-2ca6426de6/VisualC/SDL1_2017.sln /p:Configuration=Release /t:Rebuild /p:Platform=Win32 /p:PlatformToolset=v142 /p:VCPkgLocalAppDataDisabled=true /p:UseIntelMKL=No /p:WindowsTargetPlatformVersion=10.0.18362.0 /m
Working Directory: D:/Code/Repos/vcpkg/buildtrees/sdl1/x86-windows-rel/ase-1.2.15-2ca6426de6
Error code: 1
See logs for more information:
D:\Code\Repos\vcpkg\buildtrees\sdl1\build-x86-windows-rel-out.log

Call Stack (most recent call first):
scripts/cmake/vcpkg_install_msbuild.cmake:157 (vcpkg_execute_required_process)
ports/sdl1/portfile.cmake:27 (vcpkg_install_msbuild)
scripts/ports.cmake:74 (include)

Error: Building package sdl1:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: sdl1:x86-windows
Vcpkg version: 2019.07.18-nohash

Additional context
Building sdl1 x64 did work flawlessly, but since the latest update I'm unable to build x86 as you can see. I already tried to change my environmental variables on my x64 system to point to the resp. 32-bit files / folders, but no success. Many thanks in advance for your help!
SDL1_x86.zip

@Christsnatcher Christsnatcher added the category:port-bug The issue is with a library, which is something the port should already support label Aug 3, 2019
@Christsnatcher Christsnatcher changed the title [<port name>] build failure [SDL1] build failure Aug 3, 2019
@Christsnatcher Christsnatcher changed the title [SDL1] build failure [SDL1:x86-windows] build failure Aug 3, 2019
@greenbrettmichael
Copy link
Contributor

greenbrettmichael commented Aug 6, 2019

there appears to be an issue with an escape character in the download D:/Code/Repos/vcpkg/buildtrees/sdl1/x86-windows-rel/ase-1.2.15-2ca6426de6

I am able to reproduce this issue

@Christsnatcher
Copy link
Author

Ah, that's good to know (and relieving), thank you very much. Hopefully it will be possible to fix it "soon".

@JackBoosY
Copy link
Contributor

Hi @Christsnatcher, thanks for reporting this issue!
I cannot repro this issue on Win10/VS2017, please provide the failure log D:\Code\Repos\vcpkg\buildtrees\sdl1\build-x86-windows-rel-out.log.

Thanks.

@JackBoosY JackBoosY added requires:repro The issue is not currently repro-able and removed category:port-bug The issue is with a library, which is something the port should already support labels Aug 15, 2019
@Christsnatcher
Copy link
Author

Christsnatcher commented Aug 15, 2019

Hello @JackBoosY, the failure log is included in the .zipfile attached to my initial post, in particular in "sdl1_buildtrees\sdl1". I just tried to compile the source (ase-1.2.15-2ca6426de6) manually using Visual Studio 2017 / 2019 with the Windows SDSs 8.1 / 10 and the Toolsets v141 / v142 (see attachment), and you're right, all v141 builds are succfessful no matter which SDK is being used, while all v142 builds fail. So it seems that vcpkg resp. cmake retargets the solution to use the v142 toolset which makes it fail eventually (at least that's my conclusion).
Compiling_SDL1.zip

@JackBoosY JackBoosY added category:port-bug The issue is with a library, which is something the port should already support and removed requires:repro The issue is not currently repro-able labels Aug 15, 2019
@JackBoosY
Copy link
Contributor

JackBoosY commented Aug 16, 2019

Confirmed. It's a windows SDK bug. I have two workarounds:
1, Switch your compiler to Visual Studio 2017.
2, Modify the vcpkg/ports/sdl1/SDL_dynamic.vcxproj(SDL_static.vcxproj), add line
<WindowsTargetPlatformVersion> INSTALLED_WIN_SDK_VER </WindowsTargetPlatformVersion> under label <PropertyGroup Label="Globals"> , the INSTALLED_WIN_SDK_VER must be lower than 10.0.18362.0.

We have to wait for the windows SDK teams to fix this issue.

@Christsnatcher
Copy link
Author

Christsnatcher commented Aug 16, 2019

Hello,
firstly, thank you for the explanation. I tried the second method first and it doesn't work, apparently, because not the .vcxproject file in "ports" is used for building, but instead the one in "buildtrees\sdl1\x86-windows-rel\ase-1.2.15-2ca6426de6\VisualC" (see attachment). I then altered this file, but it apparently gets hash-checked and overwritten with the original one which has the "wrong" SDK version; this happens even if I set the file to read-only.

So my question would be (sorry), how to actually switch the compiler used by vcpkg to Visual Studio 2017 by default without having to uninstall VS 2019?

Thanks again!
SDL1.zip

EDIT:

Also, as shown in my previous post compiling using SDK 10.0.18362.0. in VS 2019 was successful, as long as the Toolset used was v141, so are you sure it's an SDK issue?

@JackBoosY
Copy link
Contributor

@Christsnatcher Add set(VCPKG_PLATFORM_TOOLSET v141) to vcpkg\triplets\YOU_CHOSSEN_TRIPLET.cmake.

And yes, I confirm this is a SDK bug.

@JackBoosY
Copy link
Contributor

JackBoosY commented Aug 16, 2019

I have a tiny solution:
Modify vcpkg/ports/sdl1/portfile.cmake:
Add TARGET_PLATFORM_VERSION INSTALLED_WIN_SDK_VER to the end of vcpkg_install_msbuild.
Like:

vcpkg_install_msbuild(
    SOURCE_PATH ${SOURCE_PATH}
    PROJECT_SUBPATH VisualC/SDL1_2017.sln
    INCLUDES_SUBPATH include
    LICENSE_SUBPATH COPYING
    ALLOW_ROOT_INCLUDES
    TARGET_PLATFORM_VERSION 10.0.17763.0
)

And, INSTALLED_WIN_SDK_VER must be lower than 10.0.18362.0.

@Christsnatcher
Copy link
Author

Thank you very much, your "tiny solution" did work pretty fine - without having to manually edit / set the "INSTALLED_WIN_SDK_VER" value, Anyways, many thanks again!

@tan-wei
Copy link

tan-wei commented Aug 23, 2019

Works for me after given a target platform version.

@PhoebeHui
Copy link
Contributor

PR #8327 should address this issue, this appears to be an existing issue with sdl1 that was exposed with the sdk update.

@JackBoosY
Copy link
Contributor

Since #8327 has been merged, this issue should be fixed.
Please update vcpkg and rebuild sdl1.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

No branches or pull requests

5 participants