Menu

Build failure on arm64

Kev
2025-06-25
2025-07-08
  • Kev

    Kev - 2025-06-25

    The latest git for Veracrypt fails to build on arm with the following error

    src/Common/Crypto.h:207:17: fatal error: argon2.h: No such file or directory
    207 | # include "argon2.h"

     
  • Mounir IDRASSI

    Mounir IDRASSI - 2025-06-26

    Thanks for the report. I have pushed a fix.

    This error was caused by ongoing changes to integrate Argon2 support in VeraCrypt.
    Now, Argon2 was fully implemented on Windows. Next step is Linux and macOS.

     
  • Kev

    Kev - 2025-06-26

    Thanks for the quick reply but unfortunately i get a different error now

    In file included from ../Crypto/Argon2/src/opt_avx2.c:25:
    ../Crypto/Argon2/src/blake2/blamka-round-opt.h:23:10: fatal error: emmintrin.h: No such file or directory
    23 | #include <emmintrin.h></emmintrin.h>

     
  • Mounir IDRASSI

    Mounir IDRASSI - 2025-06-26

    I have pushed a change that should fix the issue.
    Can you please try?

    I don't have access now to an arm64 machine to test. Your feedback is helpful.

     
  • Kev

    Kev - 2025-06-26

    Glad to help in a tiny way.

    The changes you've made allow it to create the file now, so that's great. There is some extra output in the build process, not sure if this is expected or useful?

    src/Crypto/Argon2/include/argon2.h:23,
                     from ../Crypto/Argon2/src/core.h:23,
                     from ../Crypto/Argon2/src/core.c:21:
    ../Crypto/Argon2/src/core.c: In function ‘allocate_memory’:
    <path>/src/Common/Tcdefs.h:292:17: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
      292 | #define TCalloc malloc
          |                 ^~~~~~
    ../Crypto/Argon2/src/core.c:73:19: note: in expansion of macro ‘TCalloc’
       73 |         *memory = TCalloc(memory_size);
          |                   ^~~~~~~
    ../Crypto/Argon2/src/core.c:24:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
       23 | #include "blake2/blake2-impl.h"
      +++ |+#include <stdlib.h>
       24 | 
    <path>/src/Common/Tcdefs.h:292:17: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
      292 | #define TCalloc malloc
          |                 ^~~~~~
    ../Crypto/Argon2/src/core.c:73:19: note: in expansion of macro ‘TCalloc’
       73 |         *memory = TCalloc(memory_size);
          |                   ^~~~~~~
    <path>/src/Common/Tcdefs.h:292:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
      292 | #define TCalloc malloc
          |                 ^~~~~~
    ../Crypto/Argon2/src/core.c:73:19: note: in expansion of macro ‘TCalloc’
       73 |         *memory = TCalloc(memory_size);
          |                   ^~~~~~~
    ../Crypto/Argon2/src/core.c: In function ‘free_memory’:
    <path>/src/Common/Tcdefs.h:293:16: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
      293 | #define TCfree free
          |                ^~~~
    ../Crypto/Argon2/src/core.c:90:9: note: in expansion of macro ‘TCfree’
       90 |         TCfree(memory);
          |         ^~~~~~
    <path>/src/Common/Tcdefs.h:293:16: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
      293 | #define TCfree free
          |                ^~~~
    ../Crypto/Argon2/src/core.c:90:9: note: in expansion of macro ‘TCfree’
       90 |         TCfree(memory);
          |         ^~~~~~
    <path>/src/Common/Tcdefs.h:293:16: warning: incompatible implicit declaration of built-in function ‘free’ [-Wbuiltin-declaration-mismatch]
      293 | #define TCfree free
          |                ^~~~
    ../Crypto/Argon2/src/core.c:90:9: note: in expansion of macro ‘TCfree’
       90 |         TCfree(memory);
          |         ^~~~~~
    <path>/src/Common/Tcdefs.h:293:16: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
      293 | #define TCfree free
          |                ^~~~
    ../Crypto/Argon2/src/core.c:90:9: note: in expansion of macro ‘TCfree’
       90 |         TCfree(memory);
          |         ^~~~~~
    
    Compiling Aes_hw_armv8.c
    In function ‘aes256_hw_decrypt_blocks’,
        inlined from ‘aes_hw_cpu_decrypt_32_blocks’ at ../Crypto/Aes_hw_armv8.c:303:5:
    ../Crypto/Aes_hw_armv8.c:241:40: warning: iteration 1152921504606846976 invokes undefined behavior [-Waggressive-loop-optimizations]
      241 |         uint8x16_t B = vld1q_u8(buffer + 16 * i);
          |                                 ~~~~~~~^~~~~~~~
    ../Crypto/Aes_hw_armv8.c:240:25: note: within this loop
      240 |     for(size_t i = 0; i != blocks; ++i) {
          |                       ~~^~~~~~~~~
    In function ‘aes256_hw_encrypt_blocks’,
        inlined from ‘aes_hw_cpu_encrypt_32_blocks’ at ../Crypto/Aes_hw_armv8.c:313:5:
    ../Crypto/Aes_hw_armv8.c:137:40: warning: iteration 1152921504606846976 invokes undefined behavior [-Waggressive-loop-optimizations]
      137 |         uint8x16_t B = vld1q_u8(buffer + 16 * i);
          |                                 ~~~~~~~^~~~~~~~
    ../Crypto/Aes_hw_armv8.c:136:25: note: within this loop
      136 |     for(size_t i = 0; i != blocks; ++i) {
          |                       ~~^~~~~~~~~
    
    In file included from 
    <path>/src/Crypto/Argon2/include/argon2.h:23,
                     from ../Crypto/Argon2/src/core.h:23,
                     from ../Crypto/Argon2/src/core.c:21:
    ../Crypto/Argon2/src/core.c: In function ‘allocate_memory’:
    <path>/src/Common/Tcdefs.h:292:17: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
      292 | #define TCalloc malloc
          |                 ^~~~~~
    ../Crypto/Argon2/src/core.c:73:19: note: in expansion of macro ‘TCalloc’
       73 |         *memory = TCalloc(memory_size);
          |                   ^~~~~~~
    ../Crypto/Argon2/src/core.c:24:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
       23 | #include "blake2/blake2-impl.h"
      +++ |+#include <stdlib.h>
       24 | 
    <path>/src/Common/Tcdefs.h:292:17: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
      292 | #define TCalloc malloc
          |                 ^~~~~~
    ../Crypto/Argon2/src/core.c:73:19: note: in expansion of macro ‘TCalloc’
       73 |         *memory = TCalloc(memory_size);
          |                   ^~~~~~~
    <path>/src/Common/Tcdefs.h:292:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
      292 | #define TCalloc malloc
          |                 ^~~~~~
    ../Crypto/Argon2/src/core.c:73:19: note: in expansion of macro ‘TCalloc’
       73 |         *memory = TCalloc(memory_size);
          |                   ^~~~~~~
    ../Crypto/Argon2/src/core.c: In function ‘free_memory’:
    <path>/src/Common/Tcdefs.h:293:16: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
      293 | #define TCfree free
          |                ^~~~
    ../Crypto/Argon2/src/core.c:90:9: note: in expansion of macro ‘TCfree’
       90 |         TCfree(memory);
          |         ^~~~~~
    <path>/src/Common/Tcdefs.h:293:16: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
      293 | #define TCfree free
          |                ^~~~
    ../Crypto/Argon2/src/core.c:90:9: note: in expansion of macro ‘TCfree’
       90 |         TCfree(memory);
          |         ^~~~~~
    <path>/src/Common/Tcdefs.h:293:16: warning: incompatible implicit declaration of built-in function ‘free’ [-Wbuiltin-declaration-mismatch]
      293 | #define TCfree free
          |                ^~~~
    ../Crypto/Argon2/src/core.c:90:9: note: in expansion of macro ‘TCfree’
       90 |         TCfree(memory);
          |         ^~~~~~
    <path>/src/Common/Tcdefs.h:293:16: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
      293 | #define TCfree free
          |                ^~~~
    ../Crypto/Argon2/src/core.c:90:9: note: in expansion of macro ‘TCfree’
       90 |         TCfree(memory);
          |         ^~~~~~
    
    Compiling Aes_hw_armv8.c
    In function ‘aes256_hw_decrypt_blocks’,
        inlined from ‘aes_hw_cpu_decrypt_32_blocks’ at ../Crypto/Aes_hw_armv8.c:303:5:
    ../Crypto/Aes_hw_armv8.c:241:40: warning: iteration 1152921504606846976 invokes undefined behavior [-Waggressive-loop-optimizations]
      241 |         uint8x16_t B = vld1q_u8(buffer + 16 * i);
          |                                 ~~~~~~~^~~~~~~~
    ../Crypto/Aes_hw_armv8.c:240:25: note: within this loop
      240 |     for(size_t i = 0; i != blocks; ++i) {
          |                       ~~^~~~~~~~~
    In function ‘aes256_hw_encrypt_blocks’,
        inlined from ‘aes_hw_cpu_encrypt_32_blocks’ at ../Crypto/Aes_hw_armv8.c:313:5:
    ../Crypto/Aes_hw_armv8.c:137:40: warning: iteration 1152921504606846976 invokes undefined behavior [-Waggressive-loop-optimizations]
      137 |         uint8x16_t B = vld1q_u8(buffer + 16 * i);
          |                                 ~~~~~~~^~~~~~~~
    ../Crypto/Aes_hw_armv8.c:136:25: note: within this loop
      136 |     for(size_t i = 0; i != blocks; ++i) {
          |                       ~~^~~~~~~~~
    
    CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
      Compatibility with CMake < 2.8.12 will be removed from a future version of
      CMake.
    
     
  • Kev

    Kev - 2025-07-08

    Hello. Sorry to say that the build on arm is failing again:

    Compiling EncryptionAlgorithm.cpp
    In file included from EncryptionMode.h:17,
    from EncryptionAlgorithm.h:18,
    from EncryptionAlgorithm.cpp:13:
    /src/Common/Crypto.h:208:17: fatal error: blake2b.h: No such file or directory
    208 | # include "blake2b.h"

     

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.