Reputation: 39
I have a requirement to run PAServer on a Debian ARM Virtual Machine.
I recently upgraded to an Apple Mac Studio M2 silicon computer. The Mac Studio is ARM, and thus I cannot virtualize X86/X64. However, I can virtualize Debian ARM Linux as a Virtual Machine (VM) using Parallels. The VM runs fantastic, but obviously the PAServer binary is not compatible because the PAServer binary for Linux is AMD64.
In an attempt to get the PAServer binary to run on the ARM64 VM, I added the AMD64 architecture to the Debian ARM VM as follows:
sudo apt-get install binfmt-support qemu-user-static
sudo update-binfmts --display
sudo dpkg --add-architecture amd64
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install hello:amd64
hello
Adding the AMD64 architecture worked, because the 'hello' binary that was installed on the second last line launched as expected.
However, when I attempted to launch PAServer, I got the following error:
./paserver: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
This error was fixed by installing zlib1g for AMD64 as follows:
sudo apt install zlib1g:amd64
Installing zlib1g worked, and I now have PAServer running on the Debian ARM VM.
Here is the error I can't seem to get past:
Thinking I was home free, I used the Delphi Connection Profile Manager to add a new 'Debian ARM' profile, and then tried to update the SDK resulting in the following error in a popup window:
Directory does not exist: /usr/include/x86_64-linux-gnu/
Directory does not exist: /usr/include/x86_64-linux-gnu/c++/
Directory does not exist: /usr/lib/gcc/x86_64-linux-gnu/
Directory does not exist: /usr/lib/gcc/x86_64-redhat-linux/
Directory does not exist: /usr/lib/gcc/x86_64-linux-gnu/
Directory does not exist: /usr/lib/gcc/x86_64-redhat-linux/
So close...
I thought that these errors might not be relevant, so I tried creating a multi-device application targeting the Debian ARM profile, but the build fails.
I feel like I'm close, but this is where my knowledge runs out. It seems like Delphi is perhaps looking in the missing folders for gcc to compile the binary, but the folders/files are missing.
I tried manually creating the folders hoping that updating the SDK would push the missing files, but this didn't work.
I have two questions:
My setup is:
Kelly
Upvotes: -1
Views: 432
Reputation: 39
I don't have an answer for question 1 (native ARM version of PAServer).
However, I did manage to get my Firemonkey app to compile on Debian ARM:
I had to install these additional packages:
sudo apt install binutils-aarch64-linux-gnu:amd64
sudo apt install libc6-dev-arm64-cross:amd64
sudo apt install gcc:amd64
sudo apt install libgl1-mesa-dev:amd64
sudo apt install libgtk-3-0:amd64
The end result is that I can now develop Delphi Firemonkey apps completely on my Mac Studio without having to use separate X64 hardware to host a Debian system running PAServer.
Upvotes: 0