Menu

Build errors with g++ 11

2021-04-28
2021-04-28
  • Thomas Horsley

    Thomas Horsley - 2021-04-28

    Apparently latest C++ includes a std::byte and the way veracrypt source uses byte it now conflicts with the typedef in the veracrypt source.

    In file included from Cipher.cpp:17:
    /zooty/build/veracrypt/VeraCrypt_1.24-Update7/src/Crypto/Twofish.h:58:62: error: reference to 'byte' is ambiguous
       58 | void twofish_encrypt_blocks(TwofishInstance *instance, const byte* in_blk, byte* out_blk, uint32 blockCount);
          |                                                              ^~~~
    In file included from /zooty/build/veracrypt/VeraCrypt_1.24-Update7/src/Platform/PlatformBase.h:16,
                     from /zooty/build/veracrypt/VeraCrypt_1.24-Update7/src/Platform/Platform.h:16,
                     from Cipher.cpp:13:
    /usr/include/c++/11/cstddef:69:14: note: candidates are: 'enum class std::byte'
       69 |   enum class byte : unsigned char {};
          |              ^~~~
    

    Ths is gcc version 11.0.1 20210324 (Red Hat 11.0.1-0) (GCC) on fedora 34 with veracrypt 1.24 update 7 source

     
  • Thomas Horsley

    Thomas Horsley - 2021-04-28

    I got it to build by hacking up a little perl script and running it over every source file to change "byte" to "BITE" (except Crypto/cpu.c where there is inline assembly with a .byte directive).

     

Log in to post a comment.