I created a Bash script a while back for setting up Ubuntu for Delphi development, and update it for each new release. The script automatically installs all the required packages, along with PAServer. I recently updated it again due to an LLDB debugging issue.
Error
Unable to start LLDB kernel: ‘Symbolic link target does not exist: /home/jim/PAServer/22.0/lldb/lib/libpython3.so -> /usr/lib/x86_64-linux-gnu/libpython3.6.so.1.0
.
Please make sure that the target exists or update the link to point to the new Python 3 shared object file’.
The error is due to an updated version of Python being standard in Ubuntu 22.04 LTS Jammy Jellyfish. By default is ships wit Python version 3.10, while PAServer was hardcoded for Python 3.6. There is a known issue workaround in DocWiki to manually fix it, but I wanted to update my Bash script to do this automatically.
Solution
The fix is to update the symbolic link with whatever version of Python is installed.
1 |
ln -sf `ls -1 /usr/lib/x86_64-linux-gnu/libpython3.*.so.1.0 | tail -1` ~/PAServer/22.0/lldb/lib/libpython3.so |
ln -sf
➡️ Updates the symbolic linkls -1 /usr/lib/x86_64-linux-gnu/libpython3.*.so.1.0
➡️ Gets a file name matching the masktail -1
➡️ Gets the last file (if there are more than one)- The pipe symbol runs the ls command through tail
- Placing all of that inside the single left quotes executes those commands and uses that in the exterior statement
~/PAServer/22.0/lldb/lib/libpython3.so
➡️ Path to the old symbolic link- Note: This assumes your PAServer is installed in
~/PAServer/22.0/
so you may need to adjust your path
I’ve tested this on a few different installations and it is working reliably for me, but your millage may vary. Good luck!
Script
Or you can simply use my Bash script. It is published as a GitHub Gist https://embt.co/Ubuntu4Delphi22 where you can view the source. You can download and run it right from the command-line:
1 2 3 4 5 6 |
# these lines are necessary if you don't have curl installed sudo apt update sudo apt install curl -y # downloads and runs the script curl -L https://embt.co/SetupUbuntu4Delphi22 | bash |
I have a version for Red Hat / Fedora / CentOS too (although it isn’t as tested or updated. Sorry, I don’t use CentOS very often.)
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition
Hi Jim!
I can’t get linux cross compilation to work. My distro is PCLinuxOS. My kernel is 6.3.12-pclos1.
PAServer installs and runs fine. I can connect to PAServer and compile, until I get these errors:
[DCC Error] E2597 C:\Program Files (x86)\Embarcadero\Studio\22.0\bin\ld-linux.exe: error: cannot find -lgcc_s
SysInit.pas:1197: error: undefined reference to ‘_Unwind_Resume’
System.pas:18366: error: undefined reference to ‘_Unwind_Resume’
System.pas:18284: error: undefined reference to ‘_Unwind_Resume’
System.pas:18873: error: undefined reference to ‘_Unwind_Resume’
c:\program files (x86)\embarcadero\studio\22.0\lib\Linux64\debug\System.o:System:function System::_Unwind_RaiseException(_Unwind_Exception&): error: undefined reference to ‘_Unwind_RaiseException’
c:\program files (x86)\embarcadero\studio\22.0\lib\Linux64\debug\System.o:System:function System::_Unwind_GetRegionStart(_Unwind_Context*): error: undefined reference to ‘_Unwind_GetRegionStart’
c:\program files (x86)\embarcadero\studio\22.0\lib\Linux64\debug\System.o:System:function System::_Unwind_GetLanguageSpecificData(_Unwind_Context*): error: undefined reference to ‘_Unwind_GetLanguageSpecificData’
c:\program files (x86)\embarcadero\studio\22.0\lib\Linux64\debug\System.o:System:function System::_Unwind_GetGR(_Unwind_Context*, int): error: undefined reference to ‘_Unwind_GetGR’
c:\program files (x86)\embarcadero\studio\22.0\lib\Linux64\debug\System.o:System:function System::_Unwind_SetGR(_Unwind_Context*, int, NativeUInt): error: undefined reference to ‘_Unwind_SetGR’
c:\program files (x86)\embarcadero\studio\22.0\lib\Linux64\debug\System.o:System:function System::_Unwind_GetIP(_Unwind_Context*): error: undefined reference to ‘_Unwind_GetIP’
c:\program files (x86)\embarcadero\studio\22.0\lib\Linux64\debug\System.o:System:function System::_Unwind_SetIP(_Unwind_Context*, NativeUInt): error: undefined reference to ‘_Unwind_SetIP’
[DCC Fatal Error] F2588 Linker error code: 1 ($00000001)
Can you please assist me in getting this to compile?