Porting NTL to Android environment

An NTL discussion forum

Porting NTL to Android environment

Postby peiworld » Mon Feb 22, 2016 1:20 pm

Dear Victor,

Any suggestion on cross-compiling the NTL library to the Android environment? I cross-compiled GMP with standard procedures, but NTL seems to use custom build setup. I tried with manually changing the configure and makefile files, but I think better to check with you if you know a better way to achieve this.

Development environment Mac OSX with Android NDK toolchains.

Thanks
peiworld
 
Posts: 8
Joined: Mon Feb 22, 2016 3:09 am

Re: Porting NTL to Android environment

Postby victorshoup » Mon Feb 22, 2016 2:49 pm

Hi,
Yes, I've been asked about cross compiling before.
It would be nice to allow for this.
The main thing is that some of the build process needs to execute programs
on the target machine, both to determine certain machine characteristics,
and to do some performance tuning.
I'm not sure how to deal with this, really.

Here are some thoughts.
Let's call "host" the machine where we are compiling, and "target" the
machine where we want the code to run.
Would it be possible (in your environment) to do the following:
compile a program on host
copy the program to target
run program on target
copy exit status and output back to host
For this to really work nicely, one would need to be able to do all this
from a script of some kind running on host.

If this were possible, I could help with instrumenting NTL's build scripts
to do this.
victorshoup
Site Admin
 
Posts: 32
Joined: Mon Jan 13, 2014 3:18 am

Re: Porting NTL to Android environment

Postby peiworld » Tue Feb 23, 2016 10:40 pm

Thanks for the reply.

So far, I have managed to compile the NTL library using automated script up to setup4. The WizardAux script is a bit problematic. Can I skip the following errors?

The automated script will work with a ROOTed Android phone. I guess the path forward is to either replace an actual phone with emulator or properly make the library cross-platforms. I have cross-compiled FLINT using standard procedures.

And now, I have the following problems when running #>perl WizardAux.sh (I renamed it to .sh for code highlight). See attachment!

For some reasons, this forum does not allow me to upload .txt as attachment.



MacBook-Pro-2:src ph$ perl WizardAux.sh
make: `InitSettings' is up to date.
5334 KB/s (3577620 bytes in 0.654s)
InitSettings-output: adbd is already running as root
Use of uninitialized value $name in hash element at WizardAux.sh line 106.
InitSettings-output: running InitSettings on Android...
Use of uninitialized value $name in hash element at WizardAux.sh line 106.
InitSettings-output: NTL_LEGACY_NO_NAMESPACE=0
InitSettings-output: NTL_LEGACY_INPUT_ERROR=0
InitSettings-output: NTL_THREADS=0
InitSettings-output: NTL_EXCEPTIONS=0
InitSettings-output: NTL_THREAD_BOOST=0
InitSettings-output: NTL_LEGACY_SP_MULMOD=0
InitSettings-output: NTL_DISABLE_LONGDOUBLE=0
InitSettings-output: NTL_DISABLE_LONGLONG=0
InitSettings-output: NTL_MAXIMIZE_SP_NBITS=0
InitSettings-output: NTL_GMP_LIP=1
InitSettings-output: NTL_GF2X_LIB=0
InitSettings-output: FLAG_LONG_LONG_TYPE=0
InitSettings-output: NTL_LONG_LONG_TYPE=long long
InitSettings-output: FLAG_UNSIGNED_LONG_LONG_TYPE=0
InitSettings-output: NTL_UNSIGNED_LONG_LONG_TYPE=unsigned long long
InitSettings-output: NTL_X86_FIX=0
InitSettings-output: NTL_NO_X86_FIX=0
InitSettings-output: NTL_NO_INIT_TRANS=0
InitSettings-output: NTL_CLEAN_INT=0
InitSettings-output: NTL_CLEAN_PTR=0
InitSettings-output: NTL_RANGE_CHECK=0
InitSettings-output: NTL_LONGLONG_SP_MULMOD=1
run: default default default NTL_FFT_BIGTAB
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c -I/Users/ph/android/prebuilt/include lip.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - lip.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o Poly1TimeTest Poly1TimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running Poly1TimeTest...4941 KB/s (6018292 bytes in 1.189s)
adbd is already running as root
running Poly1TimeTest on Android...
WARNING: linker: ./Poly1TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 158.
run: default default NTL_AVOID_BRANCHING NTL_FFT_BIGTAB
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_p.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_pX.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_pX1.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c vec_ZZ_p.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - FFT.o
r - ZZ_p.o
r - ZZ_pX.o
r - ZZ_pX1.o
r - vec_ZZ_p.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o Poly1TimeTest Poly1TimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running Poly1TimeTest...4838 KB/s (6016640 bytes in 1.214s)
adbd is already running as root
running Poly1TimeTest on Android...
WARNING: linker: ./Poly1TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 158.
skip: default NTL_SPMM_ULL default
skip: default NTL_SPMM_ULL NTL_AVOID_BRANCHING
run: default NTL_SPMM_ASM default NTL_FFT_BIGTAB
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
In file included from ../include/NTL/ZZ.h:22:0,
from ../include/NTL/FFT.h:5,
from FFT.c:2:
../include/NTL/sp_arith.h: In function 'long int NTL::sp_NormalizedMulMod(long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:679:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_NormalizedMulModWithQuo(long int&, long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:714:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long unsigned int NTL::sp_NormalizedPrepMulModPrecon(long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:762:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::MulModPrecon(long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:790:39: error: 'MulHiUL' was not declared in this scope
unsigned long qq = MulHiUL(a, bninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::MulModPreconWithQuo(long int&, long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:799:39: error: 'MulHiUL' was not declared in this scope
unsigned long qq = MulHiUL(a, bninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::rem(long unsigned int, long int, NTL::sp_reduce_struct)':
../include/NTL/sp_arith.h:964:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(a, red.ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_ll_red_21(long unsigned int, long unsigned int, long int, NTL::sp_ll_reduce_struct)':
../include/NTL/sp_arith.h:1047:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, dinv.inv) + H;
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_ll_red_21_normalized(long unsigned int, long unsigned int, long int, NTL::sp_ll_reduce_struct)':
../include/NTL/sp_arith.h:1084:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, dinv.inv) + H;
^
make: *** [FFT.o] Error 1
run: default NTL_SPMM_ASM NTL_AVOID_BRANCHING NTL_FFT_BIGTAB
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
In file included from ../include/NTL/ZZ.h:22:0,
from ../include/NTL/FFT.h:5,
from FFT.c:2:
../include/NTL/sp_arith.h: In function 'long int NTL::sp_NormalizedMulMod(long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:679:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_NormalizedMulModWithQuo(long int&, long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:714:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long unsigned int NTL::sp_NormalizedPrepMulModPrecon(long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:762:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::MulModPrecon(long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:790:39: error: 'MulHiUL' was not declared in this scope
unsigned long qq = MulHiUL(a, bninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::MulModPreconWithQuo(long int&, long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:799:39: error: 'MulHiUL' was not declared in this scope
unsigned long qq = MulHiUL(a, bninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::rem(long unsigned int, long int, NTL::sp_reduce_struct)':
../include/NTL/sp_arith.h:964:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(a, red.ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_ll_red_21(long unsigned int, long unsigned int, long int, NTL::sp_ll_reduce_struct)':
../include/NTL/sp_arith.h:1047:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, dinv.inv) + H;
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_ll_red_21_normalized(long unsigned int, long unsigned int, long int, NTL::sp_ll_reduce_struct)':
../include/NTL/sp_arith.h:1084:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, dinv.inv) + H;
^
make: *** [FFT.o] Error 1
run: NTL_FFT_LAZYMUL default default NTL_FFT_BIGTAB
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_p.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_pX.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_pX1.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c vec_ZZ_p.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - FFT.o
r - ZZ_p.o
r - ZZ_pX.o
r - ZZ_pX1.o
r - vec_ZZ_p.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o Poly1TimeTest Poly1TimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running Poly1TimeTest...5031 KB/s (6015908 bytes in 1.167s)
adbd is already running as root
running Poly1TimeTest on Android...
WARNING: linker: ./Poly1TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 158.
run: NTL_FFT_LAZYMUL default NTL_AVOID_BRANCHING NTL_FFT_BIGTAB
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_p.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_pX.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_pX1.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c vec_ZZ_p.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - FFT.o
r - ZZ_p.o
r - ZZ_pX.o
r - ZZ_pX1.o
r - vec_ZZ_p.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o Poly1TimeTest Poly1TimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running Poly1TimeTest...5282 KB/s (6016116 bytes in 1.112s)
adbd is already running as root
running Poly1TimeTest on Android...
WARNING: linker: ./Poly1TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 158.
skip: NTL_FFT_LAZYMUL NTL_SPMM_ULL default
skip: NTL_FFT_LAZYMUL NTL_SPMM_ULL NTL_AVOID_BRANCHING
run: NTL_FFT_LAZYMUL NTL_SPMM_ASM default NTL_FFT_BIGTAB
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
In file included from ../include/NTL/ZZ.h:22:0,
from ../include/NTL/FFT.h:5,
from FFT.c:2:
../include/NTL/sp_arith.h: In function 'long int NTL::sp_NormalizedMulMod(long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:679:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_NormalizedMulModWithQuo(long int&, long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:714:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long unsigned int NTL::sp_NormalizedPrepMulModPrecon(long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:762:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::MulModPrecon(long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:790:39: error: 'MulHiUL' was not declared in this scope
unsigned long qq = MulHiUL(a, bninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::MulModPreconWithQuo(long int&, long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:799:39: error: 'MulHiUL' was not declared in this scope
unsigned long qq = MulHiUL(a, bninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::rem(long unsigned int, long int, NTL::sp_reduce_struct)':
../include/NTL/sp_arith.h:964:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(a, red.ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_ll_red_21(long unsigned int, long unsigned int, long int, NTL::sp_ll_reduce_struct)':
../include/NTL/sp_arith.h:1047:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, dinv.inv) + H;
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_ll_red_21_normalized(long unsigned int, long unsigned int, long int, NTL::sp_ll_reduce_struct)':
../include/NTL/sp_arith.h:1084:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, dinv.inv) + H;
^
FFT.c: In function 'long unsigned int NTL::sp_NormalizedLazyPrepMulModPreconWithRem(long unsigned int&, long int, long int, long unsigned int)':
FFT.c:1082:44: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, (ninv << 1)) + H;
^
FFT.c: In function 'long unsigned int NTL::sp_NormalizedLazyPrepMulModPrecon(long int, long int, long unsigned int)':
FFT.c:1095:44: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, (ninv << 1)) + H;
^
FFT.c: In function 'long unsigned int NTL::LazyMulModPreconQuo(long unsigned int, long unsigned int, long unsigned int, long unsigned int)':
FFT.c:1235:38: error: 'MulHiUL' was not declared in this scope
unsigned long q = MulHiUL(a, bninv);
^
FFT.c: In function 'long unsigned int NTL::LazyMulModPrecon(long unsigned int, long unsigned int, long unsigned int, long unsigned int)':
FFT.c:1246:38: error: 'MulHiUL' was not declared in this scope
unsigned long q = MulHiUL(a, bninv);
^
make: *** [FFT.o] Error 1
run: NTL_FFT_LAZYMUL NTL_SPMM_ASM NTL_AVOID_BRANCHING NTL_FFT_BIGTAB
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
In file included from ../include/NTL/ZZ.h:22:0,
from ../include/NTL/FFT.h:5,
from FFT.c:2:
../include/NTL/sp_arith.h: In function 'long int NTL::sp_NormalizedMulMod(long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:679:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_NormalizedMulModWithQuo(long int&, long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:714:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long unsigned int NTL::sp_NormalizedPrepMulModPrecon(long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:762:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::MulModPrecon(long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:790:39: error: 'MulHiUL' was not declared in this scope
unsigned long qq = MulHiUL(a, bninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::MulModPreconWithQuo(long int&, long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:799:39: error: 'MulHiUL' was not declared in this scope
unsigned long qq = MulHiUL(a, bninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::rem(long unsigned int, long int, NTL::sp_reduce_struct)':
../include/NTL/sp_arith.h:964:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(a, red.ninv);
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_ll_red_21(long unsigned int, long unsigned int, long int, NTL::sp_ll_reduce_struct)':
../include/NTL/sp_arith.h:1047:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, dinv.inv) + H;
^
../include/NTL/sp_arith.h: In function 'long int NTL::sp_ll_red_21_normalized(long unsigned int, long unsigned int, long int, NTL::sp_ll_reduce_struct)':
../include/NTL/sp_arith.h:1084:41: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, dinv.inv) + H;
^
FFT.c: In function 'long unsigned int NTL::sp_NormalizedLazyPrepMulModPreconWithRem(long unsigned int&, long int, long int, long unsigned int)':
FFT.c:1082:44: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, (ninv << 1)) + H;
^
FFT.c: In function 'long unsigned int NTL::sp_NormalizedLazyPrepMulModPrecon(long int, long int, long unsigned int)':
FFT.c:1095:44: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, (ninv << 1)) + H;
^
FFT.c: In function 'long unsigned int NTL::LazyMulModPreconQuo(long unsigned int, long unsigned int, long unsigned int, long unsigned int)':
FFT.c:1235:38: error: 'MulHiUL' was not declared in this scope
unsigned long q = MulHiUL(a, bninv);
^
FFT.c: In function 'long unsigned int NTL::LazyMulModPrecon(long unsigned int, long unsigned int, long unsigned int, long unsigned int)':
FFT.c:1246:38: error: 'MulHiUL' was not declared in this scope
unsigned long q = MulHiUL(a, bninv);
^
make: *** [FFT.o] Error 1
run: default default default default
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_p.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_pX.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_pX1.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c vec_ZZ_p.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - FFT.o
r - ZZ_p.o
r - ZZ_pX.o
r - ZZ_pX1.o
r - vec_ZZ_p.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o Poly1TimeTest Poly1TimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running Poly1TimeTest...4660 KB/s (6018156 bytes in 1.261s)
adbd is already running as root
running Poly1TimeTest on Android...
WARNING: linker: ./Poly1TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

Argument "" isn't numeric in multiplication (*) at WizardAux.sh line 190.
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_p.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_pX.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c ZZ_pX1.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c -I/Users/ph/android/prebuilt/include lip.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c vec_ZZ_p.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - FFT.o
r - ZZ_p.o
r - ZZ_pX.o
r - ZZ_pX1.o
r - lip.o
r - vec_ZZ_p.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o GF2XTimeTest GF2XTimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running GF2XTimeTest...4829 KB/s (5338584 bytes in 1.079s)
adbd is already running as root
running GF2XTimeTest on Android...
WARNING: linker: ./GF2XTimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
000034908075401 [8594]

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 219.
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c GF2X.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - GF2X.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o GF2XTimeTest GF2XTimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running GF2XTimeTest...5033 KB/s (5332880 bytes in 1.034s)
adbd is already running as root
running GF2XTimeTest on Android...
WARNING: linker: ./GF2XTimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
000047125506072 [6175] NTL_GF2X_ALTCODE

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 219.
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c GF2X.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - GF2X.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o GF2XTimeTest GF2XTimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running GF2XTimeTest...5024 KB/s (5337900 bytes in 1.037s)
adbd is already running as root
running GF2XTimeTest on Android...
WARNING: linker: ./GF2XTimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
000046987634832 [6335] NTL_GF2X_ALTCODE1

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 219.
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c GF2X.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - GF2X.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o GF2XTimeTest GF2XTimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running GF2XTimeTest...4946 KB/s (5319800 bytes in 1.050s)
adbd is already running as root
running GF2XTimeTest on Android...
WARNING: linker: ./GF2XTimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
000027007497064 [11071] NTL_GF2X_NOINLINE

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 219.
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c GF2X.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - GF2X.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o GF2XTimeTest GF2XTimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running GF2XTimeTest...5070 KB/s (5316540 bytes in 1.023s)
adbd is already running as root
running GF2XTimeTest on Android...
WARNING: linker: ./GF2XTimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
000027342325920 [10972] NTL_GF2X_ALTCODE NTL_GF2X_NOINLINE

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 219.
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c GF2X.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - GF2X.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o GF2XTimeTest GF2XTimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running GF2XTimeTest...5098 KB/s (5319744 bytes in 1.018s)
adbd is already running as root
running GF2XTimeTest on Android...
WARNING: linker: ./GF2XTimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
000027372706282 [10972] NTL_GF2X_ALTCODE1 NTL_GF2X_NOINLINE

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 219.
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c GF2X.c
GF2X.c:20:2: error: #error "NTL_PCLMUL only works on 64-bit machines"
#error "NTL_PCLMUL only works on 64-bit machines"
^
GF2X.c:23:23: fatal error: wmmintrin.h: No such file or directory
#include <wmmintrin.h>
^
compilation terminated.
make: *** [GF2X.o] Error 1
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c GF2X.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c GF2X1.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - GF2X.o
r - GF2X1.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o Poly2TimeTest Poly2TimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running Poly2TimeTest...5374 KB/s (6007176 bytes in 1.091s)
adbd is already running as root
running Poly2TimeTest on Android...
WARNING: linker: ./Poly2TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 305.
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c -I/Users/ph/android/prebuilt/include lip.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - lip.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o Poly2TimeTest Poly2TimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running Poly2TimeTest...4986 KB/s (6010716 bytes in 1.177s)
adbd is already running as root
running Poly2TimeTest on Android...
WARNING: linker: ./Poly2TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 305.
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c -I/Users/ph/android/prebuilt/include lip.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - lip.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o Poly3TimeTest Poly3TimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running Poly3TimeTest...5057 KB/s (6010320 bytes in 1.160s)
adbd is already running as root
running Poly3TimeTest on Android...
WARNING: linker: ./Poly3TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 327.
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c -I/Users/ph/android/prebuilt/include lip.c
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ar ruv wntl.a FFT.o GetTime.o GetPID.o ctools.o ZZ.o ZZVec.o ZZ_p.o ZZ_pX.o ZZ_pX1.o lip.o tools.o vec_ZZ.o vec_ZZ_p.o GF2.o WordVector.o vec_GF2.o GF2X.o GF2X1.o thread.o BasicThreadPool.o fileio.o
r - lip.o
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-ranlib wntl.a
/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -fPIE -pie -march=iwmmxt -std=c++11 -o Poly3TimeTest Poly3TimeTest.c wntl.a -L/Users/ph/android/prebuilt/lib -lgmp -lm -lstdc++

*** running Poly3TimeTest...4871 KB/s (6024088 bytes in 1.207s)
adbd is already running as root
running Poly3TimeTest on Android...
WARNING: linker: ./Poly3TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

Argument "" isn't numeric in numeric lt (<) at WizardAux.sh line 327.


*** the wizard is done!!

make: `DispSettings' is up to date.
adbd is already running as root
running DispSettings on Android...
4979 KB/s (3569300 bytes in 0.699s)


Basic Configuration Options:
NTL_GMP_LIP

Resolution of double-word types:
long long
unsigned long long

Performance Options:
NTL_CRT_ALTCODE_SMALL


MacBook-Pro-2:src ph$
peiworld
 
Posts: 8
Joined: Mon Feb 22, 2016 3:09 am

Re: Porting NTL to Android environment

Postby victorshoup » Wed Feb 24, 2016 3:28 pm

It looks like InitSettings is running on the device.
Maybe it has to run on the host?
In any case, it has run on the same machine that the Wizard script is running.

I think with a little effort, you should be able to work out a solution.
And then we can hopefully wrap it up into something that is more generally useful.

Two other comments:

First, I'm sorry if my build system is not so "standard". None of these standard tools
really existed when I started, and I haven't put in the effort to switch over.
Maybe I should, but my time is limited.

Second, it is important that we can do a build with an actual device present,
especially for performance tuning. I guess an emulator would work for some things,
like basic feature detection. That said, once you have a build that works with a real
device, you can then distribute the code with a fixed configuration (either
in binary, or in source: after everything is configured, you just need to rum make ntl.a,
although with packaging mechanism may need some tweaking).
victorshoup
Site Admin
 
Posts: 32
Joined: Mon Jan 13, 2014 3:18 am

Re: Porting NTL to Android environment

Postby peiworld » Thu Feb 25, 2016 2:19 am

You are right.

The following programs are run on the phone.
DispSettings
GF2XTimeTest
InitSettings
Poly1TimeTest
Poly2TimeTest
Poly3TimeTest

After going through these source files, I realized that you want perform some tests in order to identify the optimized set of flags, with minimum run time. If this is true, then we still need to run *Test on the phone, right?

This is do able if the code can be compile properly. So I have
InitSettings - for initializing the flags (on Host)
Poly1TimeTest - this and the next three are tests (run on the Phone and get back the running time)
Poly2TimeTest
Poly3TimeTest
GF2XTimeTest
DispSettings - for displaying the flags (on Host)


Any idea on these two problems:
WARNING: linker: ./Poly1TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
In file included from ../include/NTL/ZZ.h:22:0,
from ../include/NTL/FFT.h:5,
from FFT.c:2:
../include/NTL/sp_arith.h: In function 'long int NTL::sp_NormalizedMulMod(long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:679:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, nine);
peiworld
 
Posts: 8
Joined: Mon Feb 22, 2016 3:09 am

Re: Porting NTL to Android environment

Postby peiworld » Thu Feb 25, 2016 4:19 am

Another comment: I ran a valgrind memcheck. Not sure whether the first problem is caused by the memory leak.

Among other system dependent things, the following block seems related to NTL.
==73290== 1,040 bytes in 1 blocks are still reachable in loss record 59 of 68
==73290== at 0x10008351B: malloc (vg_replace_malloc.c:303)
==73290== by 0x1003C01DC: atexit_register (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003C030B: __cxa_atexit (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x100011C3F: NTL::PlainMul(NTL::ZZ_pX&, NTL::ZZ_pX const&, NTL::ZZ_pX const&) (ZZ_pX.c:634)
==73290== by 0x100001567: main (Poly1TimeTest.c:110)


More details below

MacBook-Pro-2:src ph$ valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./Poly1TimeTest
==73290== Memcheck, a memory error detector
==73290== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==73290== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info
==73290== Command: ./Poly1TimeTest
==73290==
--73290-- UNKNOWN fcntl 97!
--73290-- UNKNOWN fcntl 97! (repeated 2 times)
--73290-- UNKNOWN fcntl 97! (repeated 4 times)
--73290-- UNKNOWN fcntl 97! (repeated 8 times)
--73290-- UNKNOWN fcntl 97! (repeated 16 times)
--73290-- UNKNOWN fcntl 97! (repeated 32 times)
--73290-- UNKNOWN task message [id 3406, to mach_task_self(), reply 0x60f]
--73290-- UNKNOWN host message [id 412, to mach_host_self(), reply 0x60f]
--73290-- UNKNOWN host message [id 222, to mach_host_self(), reply 0x60f]
--73290-- UNKNOWN task message [id 3410, to mach_task_self(), reply 0x60f]
==73290== Conditional jump or move depends on uninitialised value(s)
==73290== at 0x1005EFBFF: _platform_memchr$VARIANT$Haswell (in /usr/lib/system/libsystem_platform.dylib)
==73290== by 0x10039FF84: __sfvwrite (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003AA65A: __vfprintf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003D06C8: __v2printf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A6389: vfprintf_l (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A4223: printf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x100001DB6: main (Poly1TimeTest.c:209)
==73290==
001069631428571 [28] FFT_LAZYMUL AVOID_BRANCHING
==73290==
==73290== FILE DESCRIPTORS: 3 open at exit.
==73290== Open file descriptor 2: /dev/ttys008
==73290== <inherited from parent>
==73290==
==73290== Open file descriptor 1: /dev/ttys008
==73290== <inherited from parent>
==73290==
==73290== Open file descriptor 0: /dev/ttys008
==73290== <inherited from parent>
==73290==
==73290==
==73290== HEAP SUMMARY:
==73290== in use at exit: 28,204 bytes in 196 blocks
==73290== total heap usage: 932 allocs, 736 frees, 3,703,796 bytes allocated
==73290==
==73290== 32 bytes in 1 blocks are indirectly lost in loss record 21 of 68
==73290== at 0x10008351B: malloc (vg_replace_malloc.c:303)
==73290== by 0x10038197F: __Balloc_D2A (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x10037E553: __rv_alloc_D2A (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x10037EB52: __dtoa (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A73E6: __vfprintf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003D06C8: __v2printf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A6389: vfprintf_l (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A4223: printf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x100001DB6: main (Poly1TimeTest.c:209)
==73290==
==73290== 36 bytes in 1 blocks are indirectly lost in loss record 22 of 68
==73290== at 0x10008351B: malloc (vg_replace_malloc.c:303)
==73290== by 0x10038197F: __Balloc_D2A (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x10038221F: __d2b_D2A (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x10037E877: __dtoa (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A73E6: __vfprintf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003D06C8: __v2printf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A6389: vfprintf_l (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A4223: printf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x100001DB6: main (Poly1TimeTest.c:209)
==73290==
==73290== 48 bytes in 1 blocks are still reachable in loss record 24 of 68
==73290== at 0x100083DEB: malloc_zone_calloc (vg_replace_malloc.c:632)
==73290== by 0x1006A583B: NXCreateHashTableFromZone (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A57B9: NXCreateMapTableFromZone (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A5293: _read_images (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006AA9EB: object_setClass (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006B81C0: layout_bitmap_set_ivar (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A68C4: realizeClass(objc_class*) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A6300: copySwiftV1MangledName(char const*, bool) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A62E9: copySwiftV1MangledName(char const*, bool) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A62E9: copySwiftV1MangledName(char const*, bool) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A62E9: copySwiftV1MangledName(char const*, bool) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A4CE9: _read_images (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A35DA: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006B5C6C: batchFinalizeOnTwoThreads(_malloc_zone_t*, void (*)(auto_zone_cursor*, void (*)(void*, void*), void*), auto_zone_cursor*, unsigned long) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x7FFF5FC047CF: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC04516: dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x10030589D: dyld_register_image_state_change_handler (in /usr/lib/system/libdyld.dylib)
==73290== by 0x1006A207B: _objc_init (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1002ADBC7: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002ADBB3: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
==73290==
==73290== 64 bytes in 1 blocks are possibly lost in loss record 33 of 68
==73290== at 0x100083C19: calloc (vg_replace_malloc.c:630)
==73290== by 0x1006A6231: NXMapGet (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A62E9: copySwiftV1MangledName(char const*, bool) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A62E9: copySwiftV1MangledName(char const*, bool) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A4CE9: _read_images (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A35DA: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006B5C6C: batchFinalizeOnTwoThreads(_malloc_zone_t*, void (*)(auto_zone_cursor*, void (*)(void*, void*), void*), auto_zone_cursor*, unsigned long) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x7FFF5FC047CF: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC04516: dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x10030589D: dyld_register_image_state_change_handler (in /usr/lib/system/libdyld.dylib)
==73290== by 0x1006A207B: _objc_init (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1002ADBC7: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002ADBB3: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x10010BA01: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
==73290== by 0x7FFF5FC12F8A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC13103: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F73C: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F6D1: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5C2: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F832: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==73290==
==73290== 64 bytes in 1 blocks are indirectly lost in loss record 35 of 68
==73290== at 0x100083C19: calloc (vg_replace_malloc.c:630)
==73290== by 0x1002AF204: _dispatch_calloc (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002AEF6C: _voucher_atm_create (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002AEEA9: _voucher_activity_heap_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002AE33E: _dispatch_client_callout (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002AE236: dispatch_once_f (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002AED12: voucher_activity_get_metadata_buffer (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x10062F3FB: _libtrace_init (in /usr/lib/system/libsystem_trace.dylib)
==73290== by 0x10010BA15: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
==73290== by 0x7FFF5FC12F8A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC13103: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F73C: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F6D1: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5C2: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F832: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC020AA: dyld::initializeMainExecutable() (in /usr/lib/dyld)
==73290== by 0x7FFF5FC05DA8: dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC01275: dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC01035: _dyld_start (in /usr/lib/dyld)
==73290==
==73290== 128 bytes in 2 blocks are possibly lost in loss record 43 of 68
==73290== at 0x100083C19: calloc (vg_replace_malloc.c:630)
==73290== by 0x1006A6231: NXMapGet (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A62E9: copySwiftV1MangledName(char const*, bool) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A4CE9: _read_images (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A35DA: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006B5C6C: batchFinalizeOnTwoThreads(_malloc_zone_t*, void (*)(auto_zone_cursor*, void (*)(void*, void*), void*), auto_zone_cursor*, unsigned long) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x7FFF5FC047CF: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC04516: dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x10030589D: dyld_register_image_state_change_handler (in /usr/lib/system/libdyld.dylib)
==73290== by 0x1006A207B: _objc_init (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1002ADBC7: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002ADBB3: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x10010BA01: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
==73290== by 0x7FFF5FC12F8A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC13103: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F73C: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F6D1: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5C2: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F832: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC020AA: dyld::initializeMainExecutable() (in /usr/lib/dyld)
==73290==
==73290== 148 (80 direct, 68 indirect) bytes in 1 blocks are definitely lost in loss record 44 of 68
==73290== at 0x10008351B: malloc (vg_replace_malloc.c:303)
==73290== by 0x1003818D6: __Balloc_D2A (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x10038221F: __d2b_D2A (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x10037E877: __dtoa (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A73E6: __vfprintf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003D06C8: __v2printf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A6389: vfprintf_l (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A4223: printf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x100001DB6: main (Poly1TimeTest.c:209)
==73290==
==73290== 160 bytes in 4 blocks are indirectly lost in loss record 45 of 68
==73290== at 0x100083C19: calloc (vg_replace_malloc.c:630)
==73290== by 0x1006A3464: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006B5C6C: batchFinalizeOnTwoThreads(_malloc_zone_t*, void (*)(auto_zone_cursor*, void (*)(void*, void*), void*), auto_zone_cursor*, unsigned long) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x7FFF5FC047CF: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC04516: dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x10030589D: dyld_register_image_state_change_handler (in /usr/lib/system/libdyld.dylib)
==73290== by 0x1006A207B: _objc_init (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1002ADBC7: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002ADBB3: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x10010BA01: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
==73290== by 0x7FFF5FC12F8A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC13103: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F73C: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F6D1: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5C2: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F832: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC020AA: dyld::initializeMainExecutable() (in /usr/lib/dyld)
==73290== by 0x7FFF5FC05DA8: dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC01275: dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC01035: _dyld_start (in /usr/lib/dyld)
==73290==
==73290== 200 (40 direct, 160 indirect) bytes in 1 blocks are definitely lost in loss record 50 of 68
==73290== at 0x100083C19: calloc (vg_replace_malloc.c:630)
==73290== by 0x1006A3464: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006B5C6C: batchFinalizeOnTwoThreads(_malloc_zone_t*, void (*)(auto_zone_cursor*, void (*)(void*, void*), void*), auto_zone_cursor*, unsigned long) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x7FFF5FC047CF: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC04516: dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x10030589D: dyld_register_image_state_change_handler (in /usr/lib/system/libdyld.dylib)
==73290== by 0x1006A207B: _objc_init (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1002ADBC7: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002ADBB3: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x10010BA01: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
==73290== by 0x7FFF5FC12F8A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC13103: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F73C: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F6D1: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5C2: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F832: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC020AA: dyld::initializeMainExecutable() (in /usr/lib/dyld)
==73290== by 0x7FFF5FC05DA8: dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC01275: dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC01035: _dyld_start (in /usr/lib/dyld)
==73290==
==73290== 320 (256 direct, 64 indirect) bytes in 1 blocks are definitely lost in loss record 53 of 68
==73290== at 0x100083C19: calloc (vg_replace_malloc.c:630)
==73290== by 0x1002AF204: _dispatch_calloc (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002AF4A8: _voucher_activity_create_with_atm (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002AEEDA: _voucher_activity_heap_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002AE33E: _dispatch_client_callout (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002AE236: dispatch_once_f (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002AED12: voucher_activity_get_metadata_buffer (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x10062F3FB: _libtrace_init (in /usr/lib/system/libsystem_trace.dylib)
==73290== by 0x10010BA15: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
==73290== by 0x7FFF5FC12F8A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC13103: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F73C: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F6D1: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5C2: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F832: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC020AA: dyld::initializeMainExecutable() (in /usr/lib/dyld)
==73290== by 0x7FFF5FC05DA8: dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC01275: dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC01035: _dyld_start (in /usr/lib/dyld)
==73290==
==73290== 1,040 bytes in 1 blocks are still reachable in loss record 59 of 68
==73290== at 0x10008351B: malloc (vg_replace_malloc.c:303)
==73290== by 0x1003C01DC: atexit_register (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003C030B: __cxa_atexit (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x100011C3F: NTL::PlainMul(NTL::ZZ_pX&, NTL::ZZ_pX const&, NTL::ZZ_pX const&) (ZZ_pX.c:634)
==73290== by 0x100001567: main (Poly1TimeTest.c:110)
==73290==
==73290== 2,064 bytes in 1 blocks are indirectly lost in loss record 63 of 68
==73290== at 0x1000837DC: malloc_zone_malloc (vg_replace_malloc.c:305)
==73290== by 0x1006B2EFD: _objc_copyClassNamesForImage (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A52D4: _read_images (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006AA9EB: object_setClass (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A446E: objc_opt::objc_stringhash_t::hash(char const*, unsigned long) const (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A35DA: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006B5C6C: batchFinalizeOnTwoThreads(_malloc_zone_t*, void (*)(auto_zone_cursor*, void (*)(void*, void*), void*), auto_zone_cursor*, unsigned long) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x7FFF5FC047CF: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC04516: dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x10030589D: dyld_register_image_state_change_handler (in /usr/lib/system/libdyld.dylib)
==73290== by 0x1006A207B: _objc_init (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1002ADBC7: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002ADBB3: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x10010BA01: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
==73290== by 0x7FFF5FC12F8A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC13103: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F73C: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F6D1: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5C2: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F832: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==73290==
==73290== 2,088 (24 direct, 2,064 indirect) bytes in 1 blocks are definitely lost in loss record 64 of 68
==73290== at 0x1000837DC: malloc_zone_malloc (vg_replace_malloc.c:305)
==73290== by 0x1006A51E4: _read_images (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006AA9EB: object_setClass (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A446E: objc_opt::objc_stringhash_t::hash(char const*, unsigned long) const (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A35DA: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006B5C6C: batchFinalizeOnTwoThreads(_malloc_zone_t*, void (*)(auto_zone_cursor*, void (*)(void*, void*), void*), auto_zone_cursor*, unsigned long) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x7FFF5FC047CF: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC04516: dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x10030589D: dyld_register_image_state_change_handler (in /usr/lib/system/libdyld.dylib)
==73290== by 0x1006A207B: _objc_init (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1002ADBC7: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002ADBB3: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x10010BA01: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
==73290== by 0x7FFF5FC12F8A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC13103: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F73C: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F6D1: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5C2: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F832: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC020AA: dyld::initializeMainExecutable() (in /usr/lib/dyld)
==73290==
==73290== 2,624 bytes in 41 blocks are possibly lost in loss record 65 of 68
==73290== at 0x100083C19: calloc (vg_replace_malloc.c:630)
==73290== by 0x1006A6231: NXMapGet (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A4CE9: _read_images (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A35DA: map_images_nolock (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006B5C6C: batchFinalizeOnTwoThreads(_malloc_zone_t*, void (*)(auto_zone_cursor*, void (*)(void*, void*), void*), auto_zone_cursor*, unsigned long) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x7FFF5FC047CF: dyld::notifyBatchPartial(dyld_image_states, bool, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC04516: dyld::registerImageStateBatchChangeHandler(dyld_image_states, char const* (*)(dyld_image_states, unsigned int, dyld_image_info const*)) (in /usr/lib/dyld)
==73290== by 0x10030589D: dyld_register_image_state_change_handler (in /usr/lib/system/libdyld.dylib)
==73290== by 0x1006A207B: _objc_init (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1002ADBC7: _os_object_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x1002ADBB3: libdispatch_init (in /usr/lib/system/libdispatch.dylib)
==73290== by 0x10010BA01: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
==73290== by 0x7FFF5FC12F8A: ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC13103: ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F73C: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F6D1: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5C2: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F832: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC020AA: dyld::initializeMainExecutable() (in /usr/lib/dyld)
==73290== by 0x7FFF5FC05DA8: dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) (in /usr/lib/dyld)
==73290==
==73290== 4,096 bytes in 1 blocks are still reachable in loss record 67 of 68
==73290== at 0x10008351B: malloc (vg_replace_malloc.c:303)
==73290== by 0x1003A0AF5: __smakebuf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003B5B49: __swsetup (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003D0481: __v2printf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A6389: vfprintf_l (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x1003A4223: printf (in /usr/lib/system/libsystem_c.dylib)
==73290== by 0x100001DB6: main (Poly1TimeTest.c:209)
==73290==
==73290== 4,096 bytes in 1 blocks are definitely lost in loss record 68 of 68
==73290== at 0x10008454A: malloc_zone_memalign (vg_replace_malloc.c:769)
==73290== by 0x1006A7823: addSubclass(objc_class*, objc_class*) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A7452: realizeClass(objc_class*) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x1006A70A0: realizeClass(objc_class*) (in /usr/lib/libobjc.A.dylib)
==73290== by 0x7FFF5FC01DE0: dyld::notifySingle(dyld_image_states, ImageLoader const*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F729: ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5C2: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F5F0: ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC0F832: ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC020AA: dyld::initializeMainExecutable() (in /usr/lib/dyld)
==73290== by 0x7FFF5FC05DA8: dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC01275: dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) (in /usr/lib/dyld)
==73290== by 0x7FFF5FC01035: _dyld_start (in /usr/lib/dyld)
==73290==
==73290== LEAK SUMMARY:
==73290== definitely lost: 4,496 bytes in 5 blocks
==73290== indirectly lost: 2,356 bytes in 8 blocks
==73290== possibly lost: 2,816 bytes in 44 blocks
==73290== still reachable: 5,184 bytes in 3 blocks
==73290== suppressed: 13,352 bytes in 136 blocks
==73290==
==73290== For counts of detected and suppressed errors, rerun with: -v
==73290== Use --track-origins=yes to see where uninitialised values come from
==73290== ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 12 from 12)
peiworld
 
Posts: 8
Joined: Mon Feb 22, 2016 3:09 am

Re: Porting NTL to Android environment

Postby victorshoup » Thu Feb 25, 2016 10:39 pm

I'm not too concerned about the valgrind output. In any case, it shouldn't affect what you are doing. The main thing is to figure out what programs need to run on the device, what needs to run on the host, and what files need to be shuttled back and forth. It shouldn't be too hard to figure out.

Also, I have no idea what that warning is about. Never seen it before.
victorshoup
Site Admin
 
Posts: 32
Joined: Mon Jan 13, 2014 3:18 am

Re: Porting NTL to Android environment

Postby peiworld » Fri Feb 26, 2016 2:57 am

As I mentioned in the following reply, all *Test were run on the device. Only the two *Settings were run on the host. I am not sure how to proceeding as GDB didn't say anything useful for debugging.

peiworld wrote:You are right.

The following programs are run on the phone.
DispSettings
GF2XTimeTest
InitSettings
Poly1TimeTest
Poly2TimeTest
Poly3TimeTest

After going through these source files, I realized that you want perform some tests in order to identify the optimized set of flags, with minimum run time. If this is true, then we still need to run *Test on the phone, right?

This is do able if the code can be compile properly. So I have
InitSettings - for initializing the flags (on Host)
Poly1TimeTest - this and the next three are tests (run on the Phone and get back the running time)
Poly2TimeTest
Poly3TimeTest
GF2XTimeTest
DispSettings - for displaying the flags (on Host)


Any idea on these two problems:
WARNING: linker: ./Poly1TimeTest has text relocations. This is wasting memory and prevents security hardening. Please fix.
Illegal instruction

/Users/ph/android/arm-android-21-toolchain/bin/arm-linux-androideabi-g++ --sysroot=/Users/ph/devel_tools/android-ndk-r10e/platforms/android-21/arch-arm -I../include -I. -g -O2 -fPIE -march=iwmmxt -std=c++11 -c FFT.c
In file included from ../include/NTL/ZZ.h:22:0,
from ../include/NTL/FFT.h:5,
from FFT.c:2:
../include/NTL/sp_arith.h: In function 'long int NTL::sp_NormalizedMulMod(long int, long int, long int, long unsigned int)':
../include/NTL/sp_arith.h:679:37: error: 'MulHiUL' was not declared in this scope
unsigned long Q = MulHiUL(H, nine);
peiworld
 
Posts: 8
Joined: Mon Feb 22, 2016 3:09 am

Re: Porting NTL to Android environment

Postby victorshoup » Fri Feb 26, 2016 12:31 pm

For the first problem, a google of the error message turned up this:

http://stackoverflow.com/questions/2014 ... ty-risk-pl

For the second, can you tell me where in the build process this is happening?
victorshoup
Site Admin
 
Posts: 32
Joined: Mon Jan 13, 2014 3:18 am

Re: Porting NTL to Android environment

Postby peiworld » Mon Feb 29, 2016 5:41 am

victorshoup wrote:For the first problem, a google of the error message turned up this:

http://stackoverflow.com/questions/2014 ... ty-risk-pl

For the second, can you tell me where in the build process this is happening?


I am using the latest NDK. So it might not be the same problem.

For the second problem, please refer to my post on Thu Feb 25, 2016 4:19 am.
peiworld
 
Posts: 8
Joined: Mon Feb 22, 2016 3:09 am

Next

Return to NTL

Who is online

Users browsing this forum: No registered users and 1 guest

cron