There's both Intel-specific and ARM-specific code in the library.

I don't have an ARM machine, so can't test it, but I'm pretty sure Jeffrey 
built it on ARM  successfully (probably on Linux, since so far there is no ARM 
Mac). 

My suspicion is - you're building it on Intel, so the stuff that determines 
what CPU capabilities are available, gets confused. Cross-compilation is tricky.

Sorry, not having an ARM-based Mac, I don't think I can help any further 
(assuming the above was helpful at all ;).



> On Oct 16, 2020, at 00:22, Tolu <tfapohu...@gmail.com> wrote:
> 
> The problem is not even with the “fat” binaries. I can’t even compile the 
> library on arm64. There are some Intel-specific code in the library (ie., in 
> cpu.h if you look at my original post). 
> 
> 
> On Fri, Oct 16, 2020 at 12:11 AM Uri Blumenthal <mouse...@gmail.com> wrote:
>> IMHO, having a fat library is bad idea because it doesn't seem to work well 
>> fur the last several years. Wasting space is another reason.
>> 
>> IMHO, you're better off recompiling once you get the new ARM-based Mac. Keep 
>> x86_64 stuff on Intel (don't drag it to ARM), and build ARM-only stuff on 
>> ARM.
>> 
>> Or keep experimenting with fat libraries and fat binaries - but be prepared 
>> to experience pain.
>> 
>> 
>>> On Oct 15, 2020, at 23:38, Tolu <tfapohu...@gmail.com> wrote:
>>> Thanks for the quick reply. 
>>> 
>>> I currently use Crypto++ in an application. The application is MacOS only. 
>>> Since Apple is switching to Arm-based MacOS machines, I need to support 
>>> both Intel and Arm CPUs. Essentially, I would need the Crypto++ built for 
>>> x86_64 and arm64 (if I want to run natively on the host machine). I do not 
>>> know all the intricacies of Crypto++.  Could you please elaborate on why 
>>> having building Crypto++ as a universal (fat) library is a bad idea? 
>>> 
>>> Thanks
>>> On Wednesday, October 14, 2020 at 11:30:59 PM UTC-4 Mouse wrote:
>>>> I have never built Crypto++ as a universal (fat) library, and personally 
>>>> think it's not a good idea.
>>>> 
>>>> 
>>>>> On Oct 14, 2020, at 20:39, Tolu <tfapo...@gmail.com> wrote:
>>>>> Hello, 
>>>> 
>>>>> 
>>>>> I am trying to create a universal library (x86_64 and arm64), however, I 
>>>>> am difficulties building the cryptopp library on arm64 on MacOS. When I 
>>>>> run the `make -f GNUmakefile-cross` I get the following errors:
>>>>> 
>>>>> integer.cpp:650:2: error: unknown token in expression
>>>>>         INTEL_NOPREFIX
>>>>>         ^
>>>>> ./cpu.h:46:25: note: expanded from macro 'INTEL_NOPREFIX'
>>>>>         #define INTEL_NOPREFIX ".intel_syntax;"
>>>>> 
>>>>> 
>>>>> Has anyone successfully built the cryptopp on MacOS as a universal 
>>>>> binary? 
>>>>> 
>>>>> Thanks in advance
>>>> 
>>>>> -- 
>>>>> 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/crypt

-- 
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 cryptopp-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/cryptopp-users/11697980-4165-4DDE-9BDB-B87B9B178D0B%40gmail.com.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to