2016-09-21 102 views
0

我有在埃爾卡皮坦編譯Veracrypt問題問題在Mac OS X埃爾卡皮坦編譯Veracrypt 10.11.5

這是錯誤我得到:

../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。

+0

根據^所在的位置,%r10是「未知令牌」?這似乎是可能的,如果(不知何故)你編譯爲32位。或者,或者脫字符號在錯誤的地方,它不能識別的mm1? –

回答

0

nasm彙編程序的內聯代碼未正確展開,另請參閱此 issue in veracrypt repository。肇事者位於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克隆編譯沒有問題,漩渦散列函數中的內聯彙編現在被禁用。

相關問題