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

[unrar] Don't use a custom struct member alignment #8053

Merged
merged 1 commit into from
Sep 6, 2019
Merged

[unrar] Don't use a custom struct member alignment #8053

merged 1 commit into from
Sep 6, 2019

Conversation

FaultyRAM
Copy link
Contributor

For some reason unrar's .vcxproj files specify a non-default member alignment, even though the source code already uses pack pragmas. With newer versions of the Windows SDK this actually breaks the build, as this build log snippet shows:

[...]
                     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX64\x86\CL.exe /c /Zi /nologo /W3 /WX- /diagnostics:column /O2 /Oi /Oy /D RARDLL /D UNRAR /D SILENT /D _WINDLL /D _MBCS /Gm- /EHsc /MT /Zp4 /GS /Gy /arch:IA32 /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Yc"rar.hpp" /Fp"build\unrardll32\Release\obj\UnRAR.pch" /Fo"build\unrardll32\Release\obj\\" /Fd"build\unrardll32\Release\obj\vc142.pdb" /Gd /TP /wd4007 /wd4996 /analyze- /FC /errorReport:queue /MP rarpch.cpp (TaskId:40)
                     Tracking command: (TaskId:40)
                     C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Tracker.exe /d "C:\Program Files (x86)\MSBuild\15.0\FileTracker\FileTracker32.dll" /i C:\vcpkg\buildtrees\unrar\src\unrar\build\unrardll32\Release\obj\UnRAR.tlog /r C:\VCPKG\BUILDTREES\UNRAR\SRC\UNRAR\RARPCH.CPP /b MSBuildConsole_CancelEventb780407467ca4a77a133ce5f154828e9  /c "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\HostX64\x86\CL.exe"  /c /Zi /nologo /W3 /WX- /diagnostics:column /O2 /Oi /Oy /D RARDLL /D UNRAR /D SILENT /D _WINDLL /D _MBCS /Gm- /EHsc /MT /Zp4 /GS /Gy /arch:IA32 /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Yc"rar.hpp" /Fp"build\unrardll32\Release\obj\UnRAR.pch" /Fo"build\unrardll32\Release\obj\\" /Fd"build\unrardll32\Release\obj\vc142.pdb" /Gd /TP /wd4007 /wd4996 /analyze- /FC /errorReport:queue /MP rarpch.cpp (TaskId:40)
                     rarpch.cpp (TaskId:40)
14:53:55.341     1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\winnt.h(2482,40): error C2338:  Windows headers require the default packing option. Changing this can lead to memory corruption. This diagnostic can be disabled by building with WINDOWS_IGNORE_PACKING_MISMATCH defined. [C:\vcpkg\buildtrees\unrar\src\unrar\UnRARDll.vcxproj]
                     The command exited with code 2. (TaskId:40)
                   Done executing task "CL" -- FAILED. (TaskId:40)
[...]

I've added a patch for unrar that just deletes the <StructMemberAlignment> specifications from UnRARDll.vcxproj, which fixes the build.

@msftclas
Copy link

msftclas commented Sep 5, 2019

CLA assistant check
All CLA requirements met.

@ras0219-msft
Copy link
Contributor

LGTM, thanks for the PR!

@ras0219-msft ras0219-msft merged commit 17785fa into microsoft:master Sep 6, 2019
@ras0219-msft ras0219-msft self-assigned this Sep 6, 2019
@FaultyRAM FaultyRAM deleted the patch-UnRARDll.vcxproj branch September 7, 2019 00:32
@ghost ghost unassigned Rastaban Sep 23, 2020
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

Successfully merging this pull request may close these issues.

4 participants