Compilation on arm64 fails

#2 · closed · 11 comments

View on GitHub ↗

jhagerer

After apt-get installing all dependencies as written in the README.md, `make` fails as shown below. Architecture is Raspberry Pi 4, i.e., arm64-v71, with Raspbian 10. Any advice? ``` pi@raspberrypi:~/libdecsync $ make ./gradlew linkReleaseSharedLinuxX64 Downloading https://services.gradle.org/distributions/gradle-6.5-bin.zip ................................................................................................. Welcome to Gradle 6.5! Here are the highlights of this release: - Experimental file-system watching - Improved version ordering - New samples For more details see https://docs.gradle.org/6.5/release-notes.html Starting a Gradle Daemon (subsequent builds will be faster) > Configure project : Please wait while Kotlin/Native compiler 1.4.32 is being installed. Download https://download.jetbrains.com/kotlin/native/builds/releases/1.4.32/linux/kotlin-native-prebuilt-linux-1.4.32.tar.gz (84.01 MB) Download https://download.jetbrains.com/kotlin/native/builds/releases/1.4.32/linux/kotlin-native-prebuilt-linux-1.4.32.tar.gz finished, took 30 s 235 ms Unpack Kotlin/Native compiler to /home/pi/.konan/kotlin-native-prebuilt-linux-1.4.32 Unpack Kotlin/Native compiler to /home/pi/.konan/kotlin-native-prebuilt-linux-1.4.32 finished, took 12 s 83 ms The Kotlin source set androidAndroidTestRelease was configured but not added to any Kotlin compilation. You can add a source set to a target's compilation by connecting it with the compilation's default source set using 'dependsOn'. See https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#connecting-source-sets > Task :compileKotlinLinuxX64 Downloading native dependencies (LLVM, sysroot etc). This is a one-time action performed only on the first run of the compiler. Downloading dependency: https://download.jetbrains.com/kotlin/native/target-gcc-toolchain-3-linux-x86-64.tar.gz (58.4 MiB/58.4 MiB). Done. Extracting dependency: /home/pi/.konan/cache/target-gcc-toolchain-3-linux-x86-64.tar.gz into /home/pi/.konan/dependencies Downloading dependency: https://download.jetbrains.com/kotlin/native/libffi-3.2.1-2-linux-x86-64.tar.gz (55.1 kiB/55.1 kiB). Done. Extracting dependency: /home/pi/.konan/cache/libffi-3.2.1-2-linux-x86-64.tar.gz into /home/pi/.konan/dependencies Downloading dependency: https://download.jetbrains.com/kotlin/native/lldb-3-linux.tar.gz (45.5 MiB/45.5 MiB). Done. Extracting dependency: /home/pi/.konan/cache/lldb-3-linux.tar.gz into /home/pi/.konan/dependencies Downloading dependency: https://download.jetbrains.com/kotlin/native/clang-llvm-8.0.0-linux-x86-64.tar.gz (581.9 MiB/581.9 MiB). Done. Extracting dependency: /home/pi/.konan/cache/clang-llvm-8.0.0-linux-x86-64.tar.gz into /home/pi/.konan/dependencies w: /home/pi/libdecsync/src/commonMain/kotlin/org/decsync/library/Decsync.kt: (450, 17): Variable 'version' is never used w: /home/pi/libdecsync/src/commonMain/kotlin/org/decsync/library/DecsyncV1.kt: (66, 13): Name shadowed: entries w: /home/pi/libdecsync/src/nativeMain/kotlin/org/decsync/library/Decsync.kt: (344, 20): 'getAppId(String, Int? = ...): String' is deprecated. Use generateAppId instead w: /home/pi/libdecsync/src/nativeMain/kotlin/org/decsync/library/Decsync.kt: (348, 20): 'getAppId(String, Int? = ...): String' is deprecated. Use generateAppId instead > Task :linkReleaseSharedLinuxX64 e: Compilation failed: /home/pi/.konan/kotlin-native-prebuilt-linux-1.4.32/konan/nativelib/8343535217294103928/libllvmstubs.so: /home/pi/.konan/kotlin-native-prebuilt-linux-1.4.32/konan/nativelib/8343535217294103928/libllvmstubs.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch) * Source files: * Compiler version info: Konan: 1.4.32 / Kotlin: 1.4.32 * Output kind: DYNAMIC e: java.lang.UnsatisfiedLinkError: /home/pi/.konan/kotlin-native-prebuilt-linux-1.4.32/konan/nativelib/8343535217294103928/libllvmstubs.so: /home/pi/.konan/kotlin-native-prebuilt-linux-1.4.32/konan/nativelib/8343535217294103928/libllvmstubs.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at kotlinx.cinterop.JvmUtilsKt.loadKonanLibrary(JvmUtils.kt:106) at llvm.llvm.<clinit>(llvm.kt:6039) at org.jetbrains.kotlin.backend.konan.llvm.BitcodePhasesKt$contextLLVMSetupPhase$1.invoke(BitcodePhases.kt:34) at org.jetbrains.kotlin.backend.konan.llvm.BitcodePhasesKt$contextLLVMSetupPhase$1.invoke(BitcodePhases.kt) at org.jetbrains.kotlin.backend.konan.KonanLoweringPhasesKt$makeKonanModuleOpPhase$1.invoke(KonanLoweringPhases.kt:62) at org.jetbrains.kotlin.backend.konan.KonanLoweringPhasesKt$makeKonanModuleOpPhase$1.invoke(KonanLoweringPhases.kt:60) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94) at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:23) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94) at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:30) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94) at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:23) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94) at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:30) at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94) at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:41) at org.jetbrains.kotlin.backend.konan.KonanDriverKt.runTopLevelPhases(KonanDriver.kt:29) at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:78) at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:35) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45) at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227) at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithGradleRenderer$1.invoke(K2Native.kt:286) at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithGradleRenderer$1.invoke(K2Native.kt:270) at org.jetbrains.kotlin.util.UtilKt.profileIf(Util.kt:27) at org.jetbrains.kotlin.util.UtilKt.profile(Util.kt:21) at org.jetbrains.kotlin.cli.bc.K2Native$Companion.mainNoExitWithGradleRenderer(K2Native.kt:285) at org.jetbrains.kotlin.cli.bc.K2NativeKt.mainNoExitWithGradleRenderer(K2Native.kt:485) at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt:43) at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt) at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:17) at org.jetbrains.kotlin.cli.utilities.MainKt.daemonMain(main.kt:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.runInProcess(KotlinToolRunner.kt:124) at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.run(KotlinToolRunner.kt:73) at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinNativeCompile.compile(KotlinNativeTasks.kt:334) at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink.compile(KotlinNativeTasks.kt:657) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:49) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:42) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:726) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:693) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.run(ExecuteActionsTaskExecuter.java:569) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387) at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:554) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:537) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:108) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:278) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:267) at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:33) at java.util.Optional.orElseGet(Optional.java:267) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:33) at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26) at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:67) at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:36) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:49) at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:34) at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:43) at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73) at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54) at org.gradle.internal.execution.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34) at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:44) at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:54) at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:38) at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:49) at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:159) at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:72) at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:43) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44) at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38) at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24) at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92) at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:85) at java.util.Optional.map(Optional.java:215) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55) at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76) at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94) at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:79) at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:53) at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78) at java.util.Optional.orElseGet(Optional.java:267) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28) at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:194) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:186) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114) at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52) at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:409) at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:399) at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:94) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52) at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:356) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182) at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) at java.lang.Thread.run(Thread.java:748) > Task :linkReleaseSharedLinuxX64 FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':linkReleaseSharedLinuxX64'. > Compilation finished with errors * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings BUILD FAILED in 8m 29s 2 actionable tasks: 2 executed make: *** [Makefile:14: build/bin/linuxX64/releaseShared/libdecsync_api.h] Error 1 ```

Comments

jhagerer

Is it due to Kotlin Native aka Konan? Presumably it should work on the Raspberry Pi 3, but also on 4? https://willowtreeapps.com/ideas/a-look-into-kotlin-native

39aldo39

Yes, Kotlin Native does support ARM on Linux (see also https://kotlinlang.org/docs/mpp-supported-platforms.html), but I had to explicitly add support for it. I did have issues building it on a Raspberry Pi, but building it on a normal computer did work fine, although I didn't test running it. If you do want to build it on a normal computer, you have to execute `./gradlew linkReleaseSharedLinuxArm64` or `./gradlew linkReleaseSharedLinuxArm32Hfp` and install the files. The locations can be derived from the Makefile, but you can also ask if you have problems there.

jhagerer

Compilation works flawlessly on Intel laptop with `./gradlew linkReleaseSharedLinuxArm64`. To run Radicale with DecSync storage backend, I installed everything according to the [readme](https://github.com/39aldo39/Radicale-DecSync) and copied the libs like this: ``` $ sudo pip3 install radicale $ sudo pip3 install radicale_storage_decsync $ nano ~/.config/radicale/config # adding the config $ sudo cp ~/libdecsync/build/bin/linuxArm64/releaseShared/libdecsync.so . /usr/local/lib/python3.7/dist-packages/libdecsync/libs $ sudo chmod 644 /usr/local/lib/python3.7/dist-packages/libdecsync/libs/libdecsync.so $ radicale [2021-05-11 13:38:57 +0200] [19703] [CRITICAL] An exception occurred during server startup: Failed to load storage module 'radicale_storage_decsync': libdecsync: A 64bit platform is required. Found '32bit'. ``` I also tried it with the binaries from linuxArm32Hfp, but it yields the same results. Any ideas? Thanks a lot BTW!

39aldo39

This is because the Python bindings check for a 64bit platform, corresponding to the original `libdecsync.so`. As you are already changing the library, you might as well try changing that too. See [here](https://github.com/39aldo39/libdecsync-bindings-python3/blob/master/libdecsync/__init__.py#L40) for the relevant part.

jhagerer

Uncommenting lines 40 and 41 yields ``` [2021-05-17 19:44:17 +0200] [3881] [CRITICAL] An exception occurred during server startup: Failed to load storage module 'radicale_storage_decsync': /usr/local/lib/python3.7/dist-packages/libdecsync/libs/libdecsync.so: cannot open shared object file: No such file or directory ``` The file under that file path exists though. It is the 32-bit binary, as Raspberry Pi OS and its kernel is still 32-bit per default (arm71, the CPU is 64-bit capable, but not Raspberry Pi OS). Also python3 is 32-bit compiled. I don't know how to get it running.

39aldo39

The latest version of the Python bindings do have the suitable .so files. Does that work? (If you are still trying.)

julianfairfax

I get this error when building the AUR package on my PinePhone: ```==> Starting build()... ./gradlew linkReleaseSharedlinuxArm64 Starting a Gradle Daemon (subsequent builds will be faster) > Configure project : Please wait while Kotlin/Native compiler 1.5.31 is being installed. Download https://download.jetbrains.com/kotlin/native/builds/releases/1.5.31/linux-aarch64/kotlin-native-prebuilt-linux-aarch64-1.5.31.tar.gz FAILURE: Build failed with an exception. * Where: Build file '/home/alarm/.cache/yay/libdecsync/src/libdecsync-2.1.2/build.gradle' line: 74 * What went wrong: A problem occurred evaluating root project 'libdecsync-2.1.2'. > Could not resolve all files for configuration ':detachedConfiguration2'. > Could not resolve :kotlin-native-prebuilt-linux-aarch64:1.5.31. Required by: project : > Could not resolve :kotlin-native-prebuilt-linux-aarch64:1.5.31. > Could not get resource 'https://download.jetbrains.com/kotlin/native/builds/releases/1.5.31/linux-aarch64/kotlin-native-prebuilt-linux-aarch64-1.5.31.tar.gz'. > Could not HEAD 'https://download-cdn.jetbrains.com/kotlin/native/builds/releases/1.5.31/linux-aarch64/kotlin-native-prebuilt-linux-aarch64-1.5.31.tar.gz'. Received status code 403 from server: Forbidden * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings BUILD FAILED in 4m 59s make: *** [Makefile:35: build/bin/linuxArm64/releaseShared/libdecsync_api.h] Error 1 ==> Entering fakeroot environment... ==> Starting package()... ./gradlew linkReleaseSharedlinuxArm64 Exception in thread "main" java.lang.RuntimeException: Could not create parent directory for lock file /root/.gradle/wrapper/dists/gradle-6.5-bin/6nifqtx7604sqp1q6g8wikw7p/gradle-6.5-bin.zip.lck at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:43) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63) make: *** [Makefile:35: build/bin/linuxArm64/releaseShared/libdecsync_api.h] Error 1 ==> ERROR: A failure occurred in package(). Aborting... -> error making: libdecsync ```

0chroma

I found this relevant discussion regarding compiling kotlin on arm64: https://youtrack.jetbrains.com/issue/KT-36871 It looks like arm64 isn't supported as a host, but might be supported in the future. It might be worth creating a binary package for AUR in the meantime

0chroma

I just created the AUR package [libdecsync-bin](https://aur.archlinux.org/packages/libdecsync-bin) exclusive to aarch64 for the pinephone/pinephone pro If you could make the .so files available in the releases that would make things easier!

39aldo39

Thanks! I will also add them to the releases.

julianfairfax

> I just created the AUR package [libdecsync-bin](https://aur.archlinux.org/packages/libdecsync-bin) exclusive to aarch64 for the pinephone/pinephone pro > > If you could make the .so files available in the releases that would make things easier! libxcrypt-compat should be added as a dependency due to issue #14