Comments (10)
You were right. From a policies and procedures point of view we need to supply something that builds against a release zip.
I added a cryptopp82
directory with the cryptopp-android.sh
script ported to 8.2. I also added a top level heading Crypto++ 8.2 to the README. You are named in the README. If you don't want credit then please speak up.
I'm deleting the manual procedure a few comments up.
Thanks for pointing that out.
from cryptopp-android-mk.
[x86_64] Compile++ : cryptopp_static <= integer.cpp
rm -f /Users/logan.blevins/Documents/cryptopp/obj/local/x86_64/objs/cryptopp_static/integer.o
/Users/logan.blevins/Documents/screen-monitoring/.icebox/androidNDK/android-ndk-r20/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -MMD -MP -MF /Users/logan.blevins/Documents/cryptopp/obj/local/x86_64/objs/cryptopp_static/integer.o.d -target x86_64-none-linux-android23 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot /Users/logan.blevins/Documents/screen-monitoring/.icebox/androidNDK/android-ndk-r20/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -fno-addrsig -fno-exceptions -fno-rtti -fPIC -O2 -DNDEBUG -I/Users/logan.blevins/Documents/screen-monitoring/.icebox/androidNDK/android-ndk-r20/sources/android/cpufeatures -I/Users/logan.blevins/Documents/screen-monitoring/.icebox/androidNDK/android-ndk-r20/sources/cxx-stl/llvm-libc++/include -I/Users/logan.blevins/Documents/screen-monitoring/.icebox/androidNDK/android-ndk-r20/sources/cxx-stl/llvm-libc++/../llvm-libc++abi/include -I/Users/logan.blevins/Documents/cryptopp -std=c++11 -DANDROID -nostdinc++ -Wa,--noexecstack -Wformat -Werror=format-security -Wall -frtti -fexceptions -c /Users/logan.blevins/Documents/cryptopp/integer.cpp -o /Users/logan.blevins/Documents/cryptopp/obj/local/x86_64/objs/cryptopp_static/integer.o
/Users/logan.blevins/Documents/cryptopp/integer.cpp:650:2: error: unknown token in expression
INTEL_NOPREFIX
^
...
I think Crypto++ 8.1 has the old monolithic config.h
.
You may need this in your config.h
. It is present but commented-out:
#define CRYPTOPP_DISABLE_MIXED_ASM 1
I also added a section on the wiki at Android.mk | Problems. But I've got a feeling it is like trying to put out a fire with a wet sponge.
from cryptopp-android-mk.
Thanks @loganblevins,
cryptest.exe
should build on all platforms (sans 32-bit iPhone and WatchOS due to some Clang problems).
Are you using Crypto++ Master? Or a release version?
from cryptopp-android-mk.
@noloader Building with 8.1 release and following your build instructions with ndk-build as close as possible.
from cryptopp-android-mk.
OK, thanks. That's due to cryptopp-android following Crypto++ Master. We'll add cryptopp-android release zip files with the next library release. (Prior to last week, the Android build was broken so there was no sense in releasing).
Go to Android.mk : 110
, and change to the following. You need donna_32.cpp
.
ifeq ($(TARGET_ARCH),arm64)
CRYPTOPP_LIB_FILES := $(filter-out %avx.cpp,$(CRYPTOPP_LIB_FILES))
CRYPTOPP_LIB_FILES := $(filter-out sse_simd.cpp,$(CRYPTOPP_LIB_FILES))
# CRYPTOPP_LIB_FILES := $(filter-out donna_32.cpp,$(CRYPTOPP_LIB_FILES))
CRYPTOPP_LIB_FILES := $(filter-out donna_sse.cpp,$(CRYPTOPP_LIB_FILES))
endif
If you switch to Crypto++ Master, then you will get about a 30% speedup in Integer
multiply operations due to Commit 5499cefb8b54. Crypto++ Master does not need the workaround.
(The last commit to this repo, Commit 8b7b93b1773b, was the one the cut-over from 32-bit to 64-bit).
from cryptopp-android-mk.
Thank you for your prompt help - really appreciate it.
I had used your zip file on this release: https://github.com/noloader/cryptopp-android/tree/CRYPTOPP_8_1_0 coupled with cryptocpp 8.1 release thinking they'd work hand-in-hand but did not.
Was that incorrect thinking?
from cryptopp-android-mk.
Alas, it seems the suggestion got me past my prior stumbling block on arm64 yet now have an integer problem on x86_64. I'm happy to switch to 8.2 or even master
, but would prefer to build a tagged release for historical purposes.
[x86_64] Compile++ : cryptopp_static <= integer.cpp
rm -f /Users/logan.blevins/Documents/cryptopp/obj/local/x86_64/objs/cryptopp_static/integer.o
/Users/logan.blevins/Documents/screen-monitoring/.icebox/androidNDK/android-ndk-r20/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -MMD -MP -MF /Users/logan.blevins/Documents/cryptopp/obj/local/x86_64/objs/cryptopp_static/integer.o.d -target x86_64-none-linux-android23 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot /Users/logan.blevins/Documents/screen-monitoring/.icebox/androidNDK/android-ndk-r20/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -fno-addrsig -fno-exceptions -fno-rtti -fPIC -O2 -DNDEBUG -I/Users/logan.blevins/Documents/screen-monitoring/.icebox/androidNDK/android-ndk-r20/sources/android/cpufeatures -I/Users/logan.blevins/Documents/screen-monitoring/.icebox/androidNDK/android-ndk-r20/sources/cxx-stl/llvm-libc++/include -I/Users/logan.blevins/Documents/screen-monitoring/.icebox/androidNDK/android-ndk-r20/sources/cxx-stl/llvm-libc++/../llvm-libc++abi/include -I/Users/logan.blevins/Documents/cryptopp -std=c++11 -DANDROID -nostdinc++ -Wa,--noexecstack -Wformat -Werror=format-security -Wall -frtti -fexceptions -c /Users/logan.blevins/Documents/cryptopp/integer.cpp -o /Users/logan.blevins/Documents/cryptopp/obj/local/x86_64/objs/cryptopp_static/integer.o
/Users/logan.blevins/Documents/cryptopp/integer.cpp:650:2: error: unknown token in expression
INTEL_NOPREFIX
^
/Users/logan.blevins/Documents/cryptopp/cpu.h:46:25: note: expanded from macro 'INTEL_NOPREFIX'
#define INTEL_NOPREFIX ".intel_syntax;"
^
<inline asm>:1:20: note: instantiated into assembly here
.intel_syntax;neg %rcx;
^
/Users/logan.blevins/Documents/cryptopp/integer.cpp:653:2: error: unknown token in expression
AS2( mov %0,[%3+8*%1])
^
/Users/logan.blevins/Documents/cryptopp/cpu.h:812:20: note: expanded from macro 'AS2'
#define AS2(x, y) GNU_AS2(x, y)
^
/Users/logan.blevins/Documents/cryptopp/cpu.h:802:24: note: expanded from macro 'GNU_AS2'
#define GNU_AS2(x, y) #x ", " #y ";" NEW_LINE
^
<scratch space>:58:2: note: expanded from here
"mov %0"
^
...
from cryptopp-android-mk.
Here's a script that will build Crypto++ 8.2 for Android...
Redacted. See the Comment 546494926.
from cryptopp-android-mk.
I have yet to try a new version. Prior we depended on 5.6.5 and after experiencing a mysterious, uncaught runtime exception on 8.1, we moved back to the original 5.6.5 for now. Thought it would be a problem to build 5.6.5 on NDK 20 though did have success on all but x86_64.
from cryptopp-android-mk.
Thank you for ongoing help - really appreciate it.
from cryptopp-android-mk.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cryptopp-android-mk.