Menu

Problem while compiling VeraCrypt on Windows

2019-09-26
2019-10-19
  • Felix Reichmann

    Felix Reichmann - 2019-09-26

    Hi,
    I recently tried to build the VeraCrypt Project to provide a fix for a bug
    ticket I opened on GitHub.
    Unfortunately it was not possible for me because of a problem with CL.exe
    and midl.exe. Does someone already had a similar problem and can provide a
    solution?

    Used Software:

    • Visual Studio 2017 Enterprise
    • Installed all requirements listed on Github:

    • Microsoft Visual C++ 2010 SP1 (Professional Edition or compatible)

    • Microsoft Visual C++ 1.52 (available from MSDN Subscriber Downloads)

    • Microsoft Windows SDK for Windows 7.1 (configured for Visual C++
      2010)

    • Microsoft Windows SDK for Windows 8.1 (needed for SHA-256 code
      signing)
    • Microsoft Windows Driver Kit 7.1.0 (build 7600.16385.1)
    • NASM assembler 2.08 or compatible
    • YASM 1.3.0 or newer.
    • gzip compressor
    • upx packer

    1>------ Skipped Build: Project: Boot, Configuration: Release Loader Win32

    1>Project not selected to build for this solution configuration

    2>------ Skipped Build: Project: Zip, Configuration: Debug Win32 ------

    2>Project not selected to build for this solution configuration

    3>------ Build started: Project: Crypto, Configuration: Debug x64 ------

    4>------ Skipped Build: Project: Driver, Configuration: Debug Win32 ------

    4>Project not selected to build for this solution configuration

    3>C:\Program Files
    (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(146
    ,5): error MSB6006: "CL.exe" exited with code -1073741515.

    3>Done building project "Crypto.vcxproj" -- FAILED.

    5>------ Build started: Project: Format, Configuration: Debug x64 ------

    5>64 bit Processing .\FormatCom.idl

    5>C:\Program Files
    (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(315,5): error
    MSB6006: "midl.exe" exited with code -2147024774.

    5>Done building project "Format.vcxproj" -- FAILED.

    6>------ Build started: Project: Mount, Configuration: Debug x64 ------

    6>64 bit Processing .\MainCom.idl

    6>C:\Program Files
    (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(315,5): error
    MSB6006: "midl.exe" exited with code -2147024774.

    6>Done building project "Mount.vcxproj" -- FAILED.

    7>------ Build started: Project: ExpandVolume, Configuration: Debug x64

    7>64 bit Processing ..\Mount\MainCom.idl

    7>C:\Program Files
    (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(315,5): error
    MSB6006: "midl.exe" exited with code -2147024774.

    7>Done building project "ExpandVolume.vcxproj" -- FAILED.

    8>------ Skipped Build: Project: Setup, Configuration: Debug Win32 ------

    8>Project not selected to build for this solution configuration

    9>------ Skipped Build: Project: Portable, Configuration: Debug Win32 ------

    9>Project not selected to build for this solution configuration

    ========== Build: 0 succeeded, 4 failed, 0 up-to-date, 5 skipped ==========

     
  • Mounir IDRASSI

    Mounir IDRASSI - 2019-09-26

    Hi,

    I have a build machine that has VS 2017 + VeraCrypt tradional build environement so I opened veraCrypt.sln in VS 2017 without changing or converting the projects and I was able to perform a Debug build in 64-bit like without any errors. So, your errors are pazzling.

    Did you convert or modify any of the project files? All project file explicitely set platform toolset to use to Windows7.1SDK so if they are not changed then the use of VS 2017 will not affect the build.

    If you didn't modify anything, then could you check that your VC++ 2010 and Windows SDK 7.1 are working properly and that they are able to build 64-bit targets? Maybe you didn't install 64-bit compilers when you installed VC++ 2010 or the windows 7.1 SDK.

    Do you also have the error when build 32-bit taget of VeraCrypt?

     
  • Felix Reichmann

    Felix Reichmann - 2019-09-27

    Hi,
    Thank you for the fast answer.
    Unfortunately, the problem also occurs when compiling with a 32-bit compiler. I did not change the project and just downloaded it again from Sourceforge. The Windows 7.1 SDK is also installed.
    The reason why I try to compile the project myself is that in the course of a scientific work I came across the fact that texts in the German translation are sometimes not fully displayed. In a case I reported on Github, this has resulted in several tests that subjects did not create a rescue disk even though they wanted to do so (https://github.com/veracrypt/VeraCrypt/issues/489). At the moment, I suspect that the text boxes for the English texts are sufficiently long, but that the boxes are too small for the translated strings. To verify this, I wanted to modify the piece of code which defines the length of the text boxes and check if I found the correct line. As a result, depending on the size of the problem, I could try to offer a solution to the problem or at least a problem analysis.
    I currently have the feeling that the size of the text boxes, especially the text boxes next to checkboxes, is defined by the length of the english string. Is it possible that for the text described in my issue the size of the text box is defined in the file src/Format/Format.rc line 273?
    Unfortunately, I have already found another case in the German version, where the text does not fit into the space provided (https://github.com/veracrypt/VeraCrypt/issues/492). This case is not so bad, because there are no critical understanding problems.

     
  • Mounir IDRASSI

    Mounir IDRASSI - 2019-09-27

    Hi Felix,

    Concerning your compiler issue, I think it caused by a conflict between VS2017 and WSDK 7.1 probably because you installed VC++ 2010 and WSDK 7.1 after VS2017. In my build machines, I always install build tools in their release date chronological order in order to follow Microsoft logic, so I start by installing VC++ 2010, its service pack, WSDK 7.1 and then recent versions of Visual studio one aftern another (VS2012, VS2015 and VS2017)

    Concerning the UI trancation for German language, this is indeed a big problem. As you found out, the VeraCrypt UI is not dynamic but rather it has a static size which is defined at design time based on English language. Resizing all controls and text fields to make them larger is not easy since we need to manually keep all proportions in the UI the same.
    Ideally, we should have a UI that dynamically resize itself to accomodate all texts but this requires rewriting a large part of the code.

    One things i can is to focus on critical parts of the UI where this truncation have a big impact on the user. for these cases, I can do manual resize on these specific parts without modifying the others ones.

    From your post, I identify the text for skipping rescue disk verification and the text for displaying header key. Do you have other parts in mind?
    Since the release of version 1.24 is imminent, I would prefer to include the fix for this in this version.

     
  • Felix Reichmann

    Felix Reichmann - 2019-09-27

    Hi Mounir,
    Thanks for the answer. You are right I installed VS2017 first. I will try it the other way round tomorrow.

    As for the UI, I was afraid that it might be a bigger problem than when I found out that it seemed to be the text boxes. If the problem occurs in the German translation, there are certainly other places in other languages as well. In addition to that, like you already mentioned, the size of the boxes is fix at runtime.
    In the German version I have only found the two described parts so far. More critically I estimate the part with the Rescue disk, because the label shows the opposite of what the box does.
    I have another question: Since I am currently working on hard disk encryption, I wanted to write a step-by-step tutorial for the Beginners Tutorial, as soon as I find the time. Should I submit a proposal as a GitHub pull request, or should I do it another way?
    In any case I thank you for your support.

     
  • Mounir IDRASSI

    Mounir IDRASSI - 2019-09-27

    Hi Felix,

    Thank you for proposing to contribute to the tutorial. You are welcome to submit it using Github pull request as it is very good for this.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.