繁体   English   中英

在Mac OS X El Capitan 10.11.5上编译Veracrypt的问题

[英]Issues compiling Veracrypt on Mac OS X El Capitan 10.11.5

我在El Capitan上编译Veracrypt时遇到问题

这是我得到的错误:

../Crypto/Whirlpool.c:511:3: error: unknown token in expression
                KSH(2, 3, 2, 1, 0, 7)
                ^
../Crypto/Whirlpool.c:452:2: note: expanded from macro 'KSH'
        KSH##op(b, [AS_REG_6+2*2048+8*WORD_REG(di)])\
        ^
<scratch space>:264:1: note: expanded from here
KSH2
^
../Crypto/Whirlpool.c:445:2: note: expanded from macro 'KSH2'
        AS2(movq        [SSE2_workspace+8*a], mm##a)
        ^
/Users/whatnots/Desktop/veracrypt/src/Crypto/cpu.h:149:23: note: expanded from macro 'AS2'
    #define AS2(x, y) GNU_AS2(x, y)
                      ^
/Users/whatnots/Desktop/veracrypt/src/Crypto/cpu.h:144:27: note: expanded from macro 'GNU_AS2'
    #define GNU_AS2(x, y) #x ", " #y ";" NEW_LINE
                          ^
<scratch space>:270:2: note: expanded from here
"movq [%3+8*1]"
 ^
<inline asm>:162:7: note: instantiated into assembly here
movq [%r10+8*1], mm1;
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

这是我的gcc信息:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

这在Ubuntu 16.04上可以正常编译。 不知道我需要做什么。 我已经安装了所有必需的软件,甚至尝试了两个更高版本的gcc。

nasm汇编器的内联代码未正确展开,另请参见veracrypt存储库中的问题 罪魁祸首位于cpu.h中(1.19版中的第259行到263行)。 您可以尝试将其替换为

#define GNU_AS1(x) #x ";"
#define GNU_AS2(x, y) #x ", " #y ";"
#define GNU_AS3(x, y, z) #x ", " #y ", " #z ";"
#define GNU_ASL(x) "\n\t#x:"
#define GNU_ASJ(x, y, z) #x " " #y #z ";"

但是在最终的加密测试中,您可能会遇到TestPkcs5错误。

附录2017-06-08:veracrypt的最新git克隆可以正确编译,现在禁用了漩涡哈希功能中的内联汇编。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM