Execution failed for task ':app:buildCMakeDebug[armeabi-v7a]'.
com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Quantam\KyberCryptoApp\app.cxx\Debug\3n5f4f58\armeabi-v7a'
[1/2] Building CXX object CMakeFiles/kyber-bridge.dir/kyber-bridge.cpp.o
[2/2] Linking CXX shared library C:\Quantam\KyberCryptoApp\app\build\intermediates\cxx\Debug\3n5f4f58\obj\armeabi-v7a\libkyber-bridge.so
FAILED: C:/Quantam/KyberCryptoApp/app/build/intermediates/cxx/Debug/3n5f4f58/obj/armeabi-v7a/libkyber-bridge.so
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Users\LOCALHOST\AppData\Local\Android\Sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi21 --sysroot=C:/Users/LOCALHOST/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -fexceptions -frtti -stdlib=libc++ -g -fno-limit-debug-info -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Qunused-arguments -Wl,--no-undefined -shared -Wl,-soname,libkyber-bridge.so -o C:\Quantam\KyberCryptoApp\app\build\intermediates\cxx\Debug\3n5f4f58\obj\armeabi-v7a\libkyber-bridge.so CMakeFiles/kyber-bridge.dir/kyber-bridge.cpp.o C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a -llog -static-libstdc++ -latomic -lm && cd ."
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(INTT) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
Try:
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:buildCMakeDebug[armeabi-v7a]'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda1(ExecuteActionsTaskExecuter.java:149)
at org.gradle.internal.Try1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunnerCallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraphInvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:324)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraphBuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
at org.gradle.execution.plan.DefaultPlanExecutorExecutorWorker.run(DefaultPlanExecutor.java:380)
at org.gradle.internal.concurrent.ExecutorPolicy1.run(ManagedExecutorImpl.java:49)
Caused by: org.gradle.internal.UncheckedException: com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Quantam\KyberCryptoApp\app.cxx\Debug\3n5f4f58\armeabi-v7a'
[1/2] Building CXX object CMakeFiles/kyber-bridge.dir/kyber-bridge.cpp.o
[2/2] Linking CXX shared library C:\Quantam\KyberCryptoApp\app\build\intermediates\cxx\Debug\3n5f4f58\obj\armeabi-v7a\libkyber-bridge.so
FAILED: C:/Quantam/KyberCryptoApp/app/build/intermediates/cxx/Debug/3n5f4f58/obj/armeabi-v7a/libkyber-bridge.so
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Users\LOCALHOST\AppData\Local\Android\Sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi21 --sysroot=C:/Users/LOCALHOST/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -fexceptions -frtti -stdlib=libc++ -g -fno-limit-debug-info -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Qunused-arguments -Wl,--no-undefined -shared -Wl,-soname,libkyber-bridge.so -o C:\Quantam\KyberCryptoApp\app\build\intermediates\cxx\Debug\3n5f4f58\obj\armeabi-v7a\libkyber-bridge.so CMakeFiles/kyber-bridge.dir/kyber-bridge.cpp.o C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a -llog -static-libstdc++ -latomic -lm && cd ."
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(INTT) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(NTT) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(multiply_NTT) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: eta1 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(keygeneration) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: k in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(keygeneration) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: eta1 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(encryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: eta2 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(encryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: du in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(encryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: k in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(encryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: dv in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(encryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: du in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(decryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: k in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(decryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: dv in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(decryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: KeccakRoundConstants in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(KeccakInitializeRoundConstants) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: KeccakRhoOffsets in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(KeccakInitializeRhoOffsets) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: intermediateValueFile in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(displayStateAs64bitWords) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(displayStateAs64bitWords) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(displayStateAs64bitWords) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: KeccakRhoOffsets in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(rho) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: KeccakRoundConstants in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(iota) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
C++ build system [build] failed while executing:
@echo off
"C:\Users\LOCALHOST\AppData\Local\Android\Sdk\cmake\3.30.4\bin\ninja.exe" ^
-C ^
"C:\Quantam\KyberCryptoApp\app\.cxx\Debug\3n5f4f58\armeabi-v7a" ^
kyber-bridge
from C:\Quantam\KyberCryptoApp\app
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:68)
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:41)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:128)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
at org.gradle.api.internal.tasks.execution.TaskExecution3.run(TaskExecution.java:242)atorg.gradle.internal.operations.1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner1.execute2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner000(ExecuteStep.java:44)
at org.gradle.internal.execution.steps.ExecuteStep1.call(ExecuteStep.ja1.call(ExecuteStep.java:56)
at org.gradle.internal.operations.DefaultBuildOperationRunnerCallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner2.execute2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)
at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)
at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:28)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.executeDelegateBroadcastingChanges(CaptureStateAfterExecutionStep.java:100)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:72)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:50)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)
at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:166)
at org.gradle.internal.execution.steps.BuildCacheStep.lambdaexecute1(BuildCacheStep.java:70)
at org.gradle.internal.Eitherexecuteexecute0(AssignWorkspaceS4.withWorkspace(TaskExecution.java:287)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:21)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:47)
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)
at org.gradle.internal.execution.impl.DefaultExecutionEngine1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter1.call(1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunnerCallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner2.execute2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraphInvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:324)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraphBuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
at org.gradle.execution.plan.DefaultPlanExecutorExecutorWorExecutorWorker.run(DefaultPlanExecutor.java:380)
at org.gradle.internal.concurrent.ExecutorPolicyCatc1.run(ManagedExecutorImpl.java:49)
Caused by: com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Quantam\KyberCryptoApp\app.cxx\Debug\3n5f4f58\armeabi-v7a'
[1/2] Building CXX object CMakeFiles/kyber-bridge.dir/kyber-bridge.cpp.o
[2/2] Linking CXX shared library C:\Quantam\KyberCryptoApp\app\build\intermediates\cxx\Debug\3n5f4f58\obj\armeabi-v7a\libkyber-bridge.so
FAILED: C:/Quantam/KyberCryptoApp/app/build/intermediates/cxx/Debug/3n5f4f58/obj/armeabi-v7a/libkyber-bridge.so
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Users\LOCALHOST\AppData\Local\Android\Sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi21 --sysroot=C:/Users/LOCALHOST/AppData/Local/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -fexceptions -frtti -stdlib=libc++ -g -fno-limit-debug-info -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Qunused-arguments -Wl,--no-undefined -shared -Wl,-soname,libkyber-bridge.so -o C:\Quantam\KyberCryptoApp\app\build\intermediates\cxx\Debug\3n5f4f58\obj\armeabi-v7a\libkyber-bridge.so CMakeFiles/kyber-bridge.dir/kyber-bridge.cpp.o C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a -llog -static-libstdc++ -latomic -lm && cd ."
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(INTT) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(NTT) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(multiply_NTT) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: eta1 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(keygeneration) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: k in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(keygeneration) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: eta1 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(encryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: eta2 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(encryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: du in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(encryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: k in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(encryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: dv in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(encryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: du in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(decryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: k in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(decryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: dv in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(kyber.o)
referenced by kyber_API.c
kyber.o:(decryption) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: KeccakRoundConstants in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(KeccakInitializeRoundConstants) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: KeccakRhoOffsets in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(KeccakInitializeRhoOffsets) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: intermediateValueFile in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(displayStateAs64bitWords) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(displayStateAs64bitWords) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(displayStateAs64bitWords) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: KeccakRhoOffsets in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
sha3.o:(rho) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: can't create dynamic relocation R_ARM_ABS32 against symbol: KeccakRoundConstants in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
defined in C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a(sha3.o)
referenced by sha3.c
--- Entry 1 ---
Filename: build.gradle
Path: build.gradle
Content:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.androidApplication) apply false
}
A catalog of dependencies accessible via the libs extension.
*/
@NonNullApi
public class LibrariesForLibs extends AbstractExternalDependencyFactory {
private final AbstractExternalDependencyFactory owner = this;
private final AndroidxLibraryAccessors laccForAndroidxLibraryAccessors = new AndroidxLibraryAccessors(owner);
private final EspressoLibraryAccessors laccForEspressoLibraryAccessors = new EspressoLibraryAccessors(owner);
private final VersionAccessors vaccForVersionAccessors = new VersionAccessors(providers, config);
private final BundleAccessors baccForBundleAccessors = new BundleAccessors(objects, providers, config, attributesFactory, capabilityNotationParser);
private final PluginAccessors paccForPluginAccessors = new PluginAccessors(providers, config);
/**
* Creates a dependency provider for appcompat (androidx.appcompat:appcompat)
* This dependency was declared in catalog libs.versions.toml
*/
public Provider<MinimalExternalModuleDependency> getAppcompat() {
return create("appcompat");
}
code
/**
* Creates a dependency provider for constraintlayout (androidx.constraintlayout:constraintlayout)
* This dependency was declared in catalog libs.versions.toml
*/
public Provider<MinimalExternalModuleDependency> getConstraintlayout() {
return create("constraintlayout");
}
code
/**
* Creates a dependency provider for junit (junit:junit)
* This dependency was declared in catalog libs.versions.toml
*/
public Provider<MinimalExternalModuleDependency> getJunit() {
return create("junit");
}
code
/**
* Creates a dependency provider for material (com.google.android.material:material)
* This dependency was declared in catalog libs.versions.toml
*/
public Provider<MinimalExternalModuleDependency> getMaterial() {
return create("material");
}
/**
Returns the group of libraries at androidx
*/
public AndroidxLibraryAccessors getAndroidx() {
return laccForAndroidxLibraryAccessors;
}
/**
Returns the group of libraries at espresso
*/
public EspressoLibraryAccessors getEspresso() {
return laccForEspressoLibraryAccessors;
}
/**
Returns the group of versions at versions
*/
public VersionAccessors getVersions() {
return vaccForVersionAccessors;
}
/**
Returns the group of bundles at bundles
*/
public BundleAccessors getBundles() {
return baccForBundleAccessors;
}
/**
Returns the group of plugins at plugins
*/
public PluginAccessors getPlugins() {
return paccForPluginAccessors;
}
public static class AndroidxLibraryAccessors extends SubDependencyFactory {
private final AndroidxTestLibraryAccessors laccForAndroidxTestLibraryAccessors = new AndroidxTestLibraryAccessors(owner);
code
public AndroidxLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); }
/**
* Returns the group of libraries at androidx.test
*/
public AndroidxTestLibraryAccessors getTest() {
return laccForAndroidxTestLibraryAccessors;
}
}
public static class AndroidxTestLibraryAccessors extends SubDependencyFactory {
private final AndroidxTestExtLibraryAccessors laccForAndroidxTestExtLibraryAccessors = new AndroidxTestExtLibraryAccessors(owner);
code
public AndroidxTestLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); }
/**
* Returns the group of libraries at androidx.test.ext
*/
public AndroidxTestExtLibraryAccessors getExt() {
return laccForAndroidxTestExtLibraryAccessors;
}
}
public static class AndroidxTestExtLibraryAccessors extends SubDependencyFactory {
code
public AndroidxTestExtLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); }
/**
* Creates a dependency provider for junit (androidx.test.ext:junit)
* This dependency was declared in catalog libs.versions.toml
*/
public Provider<MinimalExternalModuleDependency> getJunit() {
return create("androidx.test.ext.junit");
}
}
public static class EspressoLibraryAccessors extends SubDependencyFactory {
code
public EspressoLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); }
/**
* Creates a dependency provider for core (androidx.test.espresso:espresso-core)
* This dependency was declared in catalog libs.versions.toml
*/
public Provider<MinimalExternalModuleDependency> getCore() {
return create("espresso.core");
}
}
public static class VersionAccessors extends VersionFactory {
code
private final AndroidxVersionAccessors vaccForAndroidxVersionAccessors = new AndroidxVersionAccessors(providers, config);
private final EspressoVersionAccessors vaccForEspressoVersionAccessors = new EspressoVersionAccessors(providers, config);
public VersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Returns the version associated to this alias: agp (8.2.0-alpha10)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getAgp() { return getVersion("agp"); }
/**
* Returns the version associated to this alias: appcompat (1.7.0)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getAppcompat() { return getVersion("appcompat"); }
/**
* Returns the version associated to this alias: constraintlayout (2.1.4)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getConstraintlayout() { return getVersion("constraintlayout"); }
/**
* Returns the version associated to this alias: junit (4.13.2)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getJunit() { return getVersion("junit"); }
/**
* Returns the version associated to this alias: material (1.12.0)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getMaterial() { return getVersion("material"); }
/**
* Returns the group of versions at versions.androidx
*/
public AndroidxVersionAccessors getAndroidx() {
return vaccForAndroidxVersionAccessors;
}
/**
* Returns the group of versions at versions.espresso
*/
public EspressoVersionAccessors getEspresso() {
return vaccForEspressoVersionAccessors;
}
}
public static class AndroidxVersionAccessors extends VersionFactory {
code
private final AndroidxTestVersionAccessors vaccForAndroidxTestVersionAccessors = new AndroidxTestVersionAccessors(providers, config);
public AndroidxVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Returns the group of versions at versions.androidx.test
*/
public AndroidxTestVersionAccessors getTest() {
return vaccForAndroidxTestVersionAccessors;
}
}
public static class AndroidxTestVersionAccessors extends VersionFactory {
code
private final AndroidxTestExtVersionAccessors vaccForAndroidxTestExtVersionAccessors = new AndroidxTestExtVersionAccessors(providers, config);
public AndroidxTestVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Returns the group of versions at versions.androidx.test.ext
*/
public AndroidxTestExtVersionAccessors getExt() {
return vaccForAndroidxTestExtVersionAccessors;
}
}
public static class AndroidxTestExtVersionAccessors extends VersionFactory {
code
public AndroidxTestExtVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Returns the version associated to this alias: androidx.test.ext.junit (1.2.1)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getJunit() { return getVersion("androidx.test.ext.junit"); }
}
public static class EspressoVersionAccessors extends VersionFactory {
code
public EspressoVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Returns the version associated to this alias: espresso.core (3.6.1)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getCore() { return getVersion("espresso.core"); }
}
public static class BundleAccessors extends BundleFactory {
public static class PluginAccessors extends PluginFactory {
code
public PluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Creates a plugin provider for androidApplication to the plugin id 'com.android.application'
* This plugin was declared in catalog libs.versions.toml
*/
public Provider<PluginDependency> getAndroidApplication() { return createPlugin("androidApplication"); }
A catalog of dependencies accessible via the libs extension.
*/
@NonNullApi
public class LibrariesForLibsInPluginsBlock extends AbstractExternalDependencyFactory {
private final AbstractExternalDependencyFactory owner = this;
private final AndroidxLibraryAccessors laccForAndroidxLibraryAccessors = new AndroidxLibraryAccessors(owner);
private final EspressoLibraryAccessors laccForEspressoLibraryAccessors = new EspressoLibraryAccessors(owner);
private final VersionAccessors vaccForVersionAccessors = new VersionAccessors(providers, config);
private final BundleAccessors baccForBundleAccessors = new BundleAccessors(objects, providers, config, attributesFactory, capabilityNotationParser);
private final PluginAccessors paccForPluginAccessors = new PluginAccessors(providers, config);
/**
* Creates a dependency provider for appcompat (androidx.appcompat:appcompat)
* This dependency was declared in catalog libs.versions.toml
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public Provider getAppcompat() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return create("appcompat");
}
/**
Creates a dependency provider for constraintlayout (androidx.constraintlayout:constraintlayout)
This dependency was declared in catalog libs.versions.toml
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public Provider getConstraintlayout() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return create("constraintlayout");
}
/**
Creates a dependency provider for junit (junit:junit)
This dependency was declared in catalog libs.versions.toml
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public Provider getJunit() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return create("junit");
}
/**
Creates a dependency provider for material (com.google.android.material:material)
This dependency was declared in catalog libs.versions.toml
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public Provider getMaterial() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return create("material");
}
/**
Returns the group of libraries at androidx
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public AndroidxLibraryAccessors getAndroidx() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return laccForAndroidxLibraryAccessors;
}
/**
Returns the group of libraries at espresso
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public EspressoLibraryAccessors getEspresso() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return laccForEspressoLibraryAccessors;
}
/**
Returns the group of versions at versions
*/
public VersionAccessors getVersions() {
return vaccForVersionAccessors;
}
/**
Returns the group of bundles at bundles
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public BundleAccessors getBundles() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return baccForBundleAccessors;
}
/**
Returns the group of plugins at plugins
*/
public PluginAccessors getPlugins() {
return paccForPluginAccessors;
}
/**
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public static class AndroidxLibraryAccessors extends SubDependencyFactory {
private final AndroidxTestLibraryAccessors laccForAndroidxTestLibraryAccessors = new AndroidxTestLibraryAccessors(owner);
public AndroidxLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); }
/**
Returns the group of libraries at androidx.test
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public AndroidxTestLibraryAccessors getTest() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return laccForAndroidxTestLibraryAccessors;
}
}
/**
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public static class AndroidxTestLibraryAccessors extends SubDependencyFactory {
private final AndroidxTestExtLibraryAccessors laccForAndroidxTestExtLibraryAccessors = new AndroidxTestExtLibraryAccessors(owner);
public AndroidxTestLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); }
/**
Returns the group of libraries at androidx.test.ext
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public AndroidxTestExtLibraryAccessors getExt() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return laccForAndroidxTestExtLibraryAccessors;
}
}
/**
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public static class AndroidxTestExtLibraryAccessors extends SubDependencyFactory {
public AndroidxTestExtLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); }
code
/**
* Creates a dependency provider for junit (androidx.test.ext:junit)
* This dependency was declared in catalog libs.versions.toml
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public Provider getJunit() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return create("androidx.test.ext.junit");
}
}
/**
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public static class EspressoLibraryAccessors extends SubDependencyFactory {
public EspressoLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); }
code
/**
* Creates a dependency provider for core (androidx.test.espresso:espresso-core)
* This dependency was declared in catalog libs.versions.toml
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public Provider getCore() {
org.gradle.internal.deprecation.DeprecationLogger.deprecateBehaviour("Accessing libraries or bundles from version catalogs in the plugins block.").withAdvice("Only use versions or plugins from catalogs in the plugins block.").willBeRemovedInGradle9().withUpgradeGuideSection(8, "kotlin_dsl_deprecated_catalogs_plugins_block").nagUser();
return create("espresso.core");
}
}
public static class VersionAccessors extends VersionFactory {
code
private final AndroidxVersionAccessors vaccForAndroidxVersionAccessors = new AndroidxVersionAccessors(providers, config);
private final EspressoVersionAccessors vaccForEspressoVersionAccessors = new EspressoVersionAccessors(providers, config);
public VersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Returns the version associated to this alias: agp (8.2.0-alpha10)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getAgp() { return getVersion("agp"); }
/**
* Returns the version associated to this alias: appcompat (1.7.0)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getAppcompat() { return getVersion("appcompat"); }
/**
* Returns the version associated to this alias: constraintlayout (2.1.4)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getConstraintlayout() { return getVersion("constraintlayout"); }
/**
* Returns the version associated to this alias: junit (4.13.2)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getJunit() { return getVersion("junit"); }
/**
* Returns the version associated to this alias: material (1.12.0)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getMaterial() { return getVersion("material"); }
/**
* Returns the group of versions at versions.androidx
*/
public AndroidxVersionAccessors getAndroidx() {
return vaccForAndroidxVersionAccessors;
}
/**
* Returns the group of versions at versions.espresso
*/
public EspressoVersionAccessors getEspresso() {
return vaccForEspressoVersionAccessors;
}
}
public static class AndroidxVersionAccessors extends VersionFactory {
code
private final AndroidxTestVersionAccessors vaccForAndroidxTestVersionAccessors = new AndroidxTestVersionAccessors(providers, config);
public AndroidxVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Returns the group of versions at versions.androidx.test
*/
public AndroidxTestVersionAccessors getTest() {
return vaccForAndroidxTestVersionAccessors;
}
}
public static class AndroidxTestVersionAccessors extends VersionFactory {
code
private final AndroidxTestExtVersionAccessors vaccForAndroidxTestExtVersionAccessors = new AndroidxTestExtVersionAccessors(providers, config);
public AndroidxTestVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Returns the group of versions at versions.androidx.test.ext
*/
public AndroidxTestExtVersionAccessors getExt() {
return vaccForAndroidxTestExtVersionAccessors;
}
}
public static class AndroidxTestExtVersionAccessors extends VersionFactory {
code
public AndroidxTestExtVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Returns the version associated to this alias: androidx.test.ext.junit (1.2.1)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getJunit() { return getVersion("androidx.test.ext.junit"); }
}
public static class EspressoVersionAccessors extends VersionFactory {
code
public EspressoVersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Returns the version associated to this alias: espresso.core (3.6.1)
* If the version is a rich version and that its not expressible as a
* single version string, then an empty string is returned.
* This version was declared in catalog libs.versions.toml
*/
public Provider<String> getCore() { return getVersion("espresso.core"); }
}
/**
@deprecated Will be removed in Gradle 9.0.
*/
@Deprecated
public static class BundleAccessors extends BundleFactory {
public static class PluginAccessors extends PluginFactory {
code
public PluginAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); }
/**
* Creates a plugin provider for androidApplication to the plugin id 'com.android.application'
* This plugin was declared in catalog libs.versions.toml
*/
public Provider<PluginDependency> getAndroidApplication() { return createPlugin("androidApplication"); }
Instrumented test, which will execute on an Android device.
@see Testing documentation
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.kybercryptoapp", appContext.getPackageName());
}
}
// Convert Java byte arrays to C arrays
env->GetByteArrayRegion(ekpke, 0, 1568, reinterpret_cast<jbyte *>(ekpke_native));
env->GetByteArrayRegion(dkpke, 0, 1536, reinterpret_cast<jbyte *>(dkpke_native));
// Call the keygeneration function from the library
keygeneration(ekpke_native, dkpke_native);
// Set the values back to the Java arrays
env->SetByteArrayRegion(ekpke, 0, 1568, reinterpret_cast<jbyte *>(ekpke_native));
env->SetByteArrayRegion(dkpke, 0, 1536, reinterpret_cast<jbyte *>(dkpke_native));
}
// Implement JNI functions for encryption and decryption similarly
Example local unit test, which will execute on the development machine (host).
@see Testing documentation
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
code
sha3.o:(iota) in archive C:/Quantam/KyberCryptoApp/app/src/main/cpp/../../../distribution/libarmmlib/lib/armeabi-v7a/libarmmlib.a
ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
The build failure you're encountering is due to the static library libarmmlib.a being compiled without the -fPIC (Position Independent Code) flag. When you attempt to link this non-PIC library into a shared library (libkyber-bridge.so), the linker emits errors because shared libraries require all linked objects to be position-independent.
Here's a comprehensive guide to resolving this issue:
1. Understanding the Error
Error Message:
code
ld: error: can't create dynamic relocation R_ARM_ABS32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
Cause:
Static Library Without -fPIC:libarmmlib.a was compiled without the -fPIC flag, making it unsuitable for linking into a shared library.
Shared Library Requirements: Shared libraries (.so files) require all linked code to be position-independent to support features like dynamic loading and address relocation.
2. Solution Overview
Primary Solution:
Recompile libarmmlib.a with -fPIC: Ensure that all object files within the static library are compiled with the -fPIC flag.
Alternative Workarounds (Not Recommended):
Modify Linker Flags: Use linker flags like -Wl,-z,notext to bypass the requirement. (Not recommended due to potential security and compatibility issues.)
Use a Different Library: If available, use a version of libarmmlib.a that is already compiled with -fPIC.
3. Detailed Steps to Recompile libarmmlib.a with -fPIC
Step 1: Obtain the Source Code
Ensure you have access to the source code of libarmmlib. If it's a third-party library, you might need to contact the provider or check their repository/documentation.
Step 2: Modify the Build Configuration
If Using CMake:
Open the CMakeLists.txt of libarmmlib.
Enable Position-Independent Code:
cmake
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
This directive ensures that all targets in the project are compiled with -fPIC.
Alternatively, Add the -fPIC Flag Directly:
cmake
add_compile_options(-fPIC)
This explicitly adds the -fPIC flag to all compile commands.
If Using Makefiles:
Open the relevant Makefile.
Add -fPIC to CFLAGS or CXXFLAGS:
makefile
CFLAGS += -fPIC
CXXFLAGS += -fPIC
Step 3: Rebuild the Static Library
Clean Previous Builds:
bash
make clean
(Replace make with your build system's clean command if different.)
Build the Static Library:
bash
make
This will generate a new libarmmlib.a with position-independent code.
Step 4: Update Your Project with the New Library
Replace the Old Library:
Ensure that the newly compiled libarmmlib.a replaces the old one in your project directory:
Ensure that the linker has the necessary permissions to read and write to the library file.
4. Verify and Clean Your Build
Step 1: Clean the Project
Before rebuilding, it's essential to clean previous build artifacts to avoid caching issues.
bash
./gradlew clean
Step 2: Rebuild the Project
Attempt to rebuild your project to see if the issue is resolved.
bash
./gradlew assembleDebug
5. Additional Recommendations
A. Ensure Consistent NDK and CMake Versions
Check ndkVersion:
gradle
ndkVersion '23.1.7779620'
Ensure this matches the NDK version installed in your Android SDK.
Check CMake Version:
gradle
version '3.30.4'
Ensure that this version is installed. You can install or update it via the SDK Manager.
B. Update CMakeLists.txt if Necessary
Ensure that your CMakeLists.txt correctly references the new libarmmlib.a and that include directories are accurate.
cmake
# Include directories
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../../distribution/libarmmlib/include")
# Link the static library
target_link_libraries(
kyber-bridge
armmlib
log
)
C. Handle JNI Correctly
Ensure that your JNI functions correctly handle data types and memory to prevent runtime issues.
6. Avoiding Common Pitfalls
A. Mixing Architectures
Ensure that libarmmlib.a is compiled for the correct architecture (armeabi-v7a) to match your app's target ABI.
B. Library Dependencies
Check if libarmmlib.a depends on other libraries that also need to be compiled with -fPIC. All dependencies must be PIC-enabled for successful linking.
C. Gradle Sync Issues
After making changes to the native code or CMake configurations, always sync your Gradle project to ensure all changes are recognized.
7. Alternative (Temporary) Workaround: Adjust Linker Flags
⚠️ Warning: This approach is not recommended for production builds due to potential security vulnerabilities and stability issues.
If you're blocked and need a temporary workaround:
Step 1: Modify CMakeLists.txt to Add Linker Flags
Add the following line to your CMakeLists.txt to allow text relocations:
Note: This may bypass the error but can lead to runtime crashes or other unpredictable behaviors. Use this only for testing purposes.
8. Summary
The core issue stems from libarmmlib.a not being compiled with the -fPIC flag. To ensure a successful build:
Recompile libarmmlib.a with -fPIC.
Update your project to use the new library.
Clean and rebuild your project.
Ensure all build configurations (NDK, CMake) are consistent and correctly set up.
By following these steps, you should be able to resolve the linking errors and successfully build your Android application with the native C++ components.
If you continue to experience issues or need further assistance with specific steps, feel free to provide more details or ask additional questions!