On Fri, Jul 20, 2018 at 8:53 AM, Kinga Kasa <[email protected]> wrote: > > I have a question regarding the “Illegal instruction” error code. > > I am compiling Cryptopp on Mac 10.13 with Apple LLVM version 9.1.0 and > trying to run it on Mac 10.12 and receiving Illegal instruction error, more > specifically this:
Which version of Crypto++, and how did you build the library? Can you show one of the invocations of the compiler. We need to see the compiler flags you are using. For example, here is what I see when building the Rijndael source files on an older MacBook Pro. $ make rijndael.o rijndael-simd.o g++ -DNDEBUG -g2 -O3 -fPIC -pthread -pipe -c rijndael.cpp g++ -DNDEBUG -g2 -O3 -fPIC -pthread -pipe -msse4.1 -maes -c rijndael-simd.cpp rijndael.cpp is built with standard arch flags, which should be vanilla x86_64. rijndael-simd.cpp gets the arch flags to enable AES. > thread #1, queue = 'com.apple.main-thread', stop reason = > EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) > > frame #0: 0x00000001001c1fac > main`CryptoPP::Rijndael::Enc::AdvancedProcessBlocks(unsigned char const*, > unsigned char const*, unsigned char*, unsigned long, unsigned int) const + > 124 > > main`CryptoPP::Rijndael::Enc::AdvancedProcessBlocks: > > -> 0x1001c1fac <+124>: andnl %edx, %ecx, %r13d > > 0x1001c1fb1 <+129>: testb $0x8, %sil > > 0x1001c1fb5 <+133>: je 0x1001c1fd5 ; <+165> > > 0x1001c1fb7 <+135>: addq %r14, %rbx That looks like it is compiler generated and not coming directly from the library. We switched to BASE+SIMD at Crypto++ 6.0 which should support building on one machine, and then running on a less capable machine. If you built the library with -march=native and then tried to run on a less capable machine then this is probably expected. We will know more once you provide the other information. Also see https://www.cryptopp.com/wiki/BASE+SIMD . Jeff -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
