You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Host: Macbook Pro m1 pro
Target: arm64-android
I modify the bash script (/preset/armdroid-pbc-bn254.sh) to adapt to the newer NDK (ndk 27), since the toolchain has been chained, it now works with android.toolchain.cmake, and i don't need to build the standalone toolchain.
$/relic/include/relic_types.h:169:23: error: typedef redefinition with different types ('unsigned long' vs 'unsigned int')
169 | typedef unsigned long uint_t;
| ^
$/Android/sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/sys/types.h:131:29: note: previous definition is here
131 | typedef unsigned int uint_t;
It conflicts with the definition in android library, so i rename all the uint_t in relic to relic_uint_t. And this works.
Then i run the make command, the following error occurs:
[ 85%] Linking C executable ../bin/test_bn
ld.lld: error: undefined symbol: __android_log_vprint
>>> referenced by relic_util.c
>>> relic_util.c.o:(util_printf) in archive ../lib/librelic_s.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [test/CMakeFiles/test_bn.dir/build.make:98: bin/test_bn] Error 1
make[1]: *** [CMakeFiles/Makefile2:256: test/CMakeFiles/test_bn.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
So i modify the CMakeLists.txt in /test and /bench as follows: target_link_libraries(test_${MODULE} ${RELIC_S}) to target_link_libraries(test_${MODULE} ${RELIC_S} log). target_link_libraries(bench_${MODULE} ${RELIC_S}) to target_link_libraries(bench_${MODULE} ${RELIC_S} log).
And this fixes the bugs. I try to remove option -DLDFLAGS="-L$SYSROOT/usr/lib/$TARGET/$API/ -llog" \ in the bash file, it can still work, since the android toolchain can find the relate library. Additionally, i try to use the -DARITH=arm-asm-254, it does work, and the following error occurs: /relic/src/low/arm-asm-254/relic_fp_add_low.s:644:6: error: invalid operand for instruction STR r5, [r0, #0]
The text was updated successfully, but these errors were encountered:
Environment:
Host: Macbook Pro m1 pro
Target: arm64-android
I modify the bash script (/preset/armdroid-pbc-bn254.sh) to adapt to the newer NDK (ndk 27), since the toolchain has been chained, it now works with android.toolchain.cmake, and i don't need to build the standalone toolchain.
When i run the script, i met the error:
It conflicts with the definition in android library, so i rename all the uint_t in relic to relic_uint_t. And this works.
Then i run the make command, the following error occurs:
So i modify the CMakeLists.txt in /test and /bench as follows:
target_link_libraries(test_${MODULE} ${RELIC_S})
totarget_link_libraries(test_${MODULE} ${RELIC_S} log)
.target_link_libraries(bench_${MODULE} ${RELIC_S})
totarget_link_libraries(bench_${MODULE} ${RELIC_S} log)
.And this fixes the bugs. I try to remove option
-DLDFLAGS="-L$SYSROOT/usr/lib/$TARGET/$API/ -llog" \
in the bash file, it can still work, since the android toolchain can find the relate library. Additionally, i try to use the -DARITH=arm-asm-254, it does work, and the following error occurs:/relic/src/low/arm-asm-254/relic_fp_add_low.s:644:6: error: invalid operand for instruction STR r5, [r0, #0]
The text was updated successfully, but these errors were encountered: