Bug 453950 - The MSBuild Craft build system crashes when the build time is MinSizeRel
Summary: The MSBuild Craft build system crashes when the build time is MinSizeRel
Status: REPORTED
Alias: None
Product: Craft
Classification: Developer tools
Component: Core (show other bugs)
Version: master
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-17 19:33 UTC by kdebugs@noahandrews.me
Modified: 2022-05-17 20:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kdebugs@noahandrews.me 2022-05-17 19:33:12 UTC
SUMMARY
When trying to build KDE Connect on Windows using MSVC for the first time, the build failed because liblzma apparently specified a build type of MinSizeRel, which the MSBuild build system does not support.

STEPS TO REPRODUCE
1. Follow the steps to install Craft and build KDE Connect on Windows using MSVC: https://community.kde.org/KDEConnect/Build_Windows

OBSERVED RESULT

Relevant log output:

*** Handling package: libs/liblzma, action: all ***
*** Action: fetch-binary for libs/liblzma ***
Could not find libs/liblzma=5.2.3 in https://files.kde.org/craft/master/22.05/windows/msvc2019_64/cl/MinSizeRel
*** libs/liblzma not found in cache ***
*** Action: fetch for libs/liblzma ***
*** Action: unpack for libs/liblzma ***
Please enable Windows 10 development mode to enable support for symlinks.
This will enable faster extractions.
https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development
*** Action: compile for libs/liblzma ***
entering the source directory!
*** Craft all succeeded: libs/liblzma after 0 seconds ***
'MinSizeRel'
Traceback (most recent call last):
  File "C:\CraftRoot\craft\bin\craft.py", line 274, in <module>
    success = main(timer)
  File "C:\CraftRoot\craft\bin\craft.py", line 264, in main
    if not CraftCommands.run(package, action, tempArgs):
  File "C:\CraftRoot\craft\bin\CraftCommands.py", line 425, in run
    if not handlePackage(info, action, directTargets=directTargets):
  File "C:\CraftRoot\craft\bin\CraftCommands.py", line 94, in handlePackage
    success = doExec(package, action)
  File "C:\CraftRoot\craft\bin\CraftCommands.py", line 58, in doExec
    ret = package.instance.runAction(action)
  File "C:\CraftRoot\craft\bin\Package\PackageBase.py", line 247, in runAction
    if not getattr(self, step)():
  File "C:\CraftRoot\craft\bin\BuildSystem\BuildSystemBase.py", line 89, in compile
    return configure() and make()
  File "C:\CraftRoot\craft\bin\BuildSystem\MSBuildBuildSystem.py", line 46, in make
    buildType =self.buildTypes[self.buildType()]
KeyError: 'MinSizeRel'


EXPECTED RESULT

The software should build successfully

SOFTWARE/OS VERSIONS
Windows: Windows 11 Pro 21H2
Comment 1 kdebugs@noahandrews.me 2022-05-17 20:41:05 UTC
Merge request submitted here: https://invent.kde.org/packaging/craft/-/merge_requests/76