Jump to content
softtouch

Delphi 11.2 - Ubuntu Debugger error

Recommended Posts

I am trying to debug a small Delphi 11.2 code with Linux target. I can compile, deploy and run just fine, but when I try to debug, or run with F9, I get:

Quote

Unable to start LLDB kernel: Symbolic link target does not exist: ....

Please make sure that the target exists or update the link to point to the new Python 3 shared object file

I have no clue what to do about this. Does anybody has a hint?

Edited by softtouch

Share this post


Link to post

It works here without issue after fixing up the python library symbolic link in the PAServer-22.0 directory. Can debug including setting break points and stepping through a command line program targeted to a Ubuntu 22.10 Server.  Below are the commands I used to test on a fresh + updated Ubuntu 22.10 server install:
 

# Ubuntu : run commands from home directory to get required pre-requisites and PAServer archive and unpack
# do other apt update/upgrade etc before this
sudo apt install joe wget p7zip-full curl openssh-server build-essential zlib1g-dev libcurl4-gnutls-dev libncurses5 lldb
wget https://altd.embarcadero.com/releases/studio/22.0/112/LinuxPAServer22.0.tar.gz
tar -xvf LinuxPAServer22.0.tar.gz

cd PAServer-22.0/lldb/lib
# rename current symbolic link so we can add the correct one
mv libpython3.so libpython3.so_
# this depends on the current Linux distribution for where and what it is called - this one is for Ubuntu 22.10 Server:
ln -s  /usr/lib/x86_64-linux-gnu/libpython3.10.so.1.0 libpython3.so

Do see a quality central bug report for the error you are seeing however: [RSP-39793] Linux - unsupported DW_FORM value: 0x1f - Embarcadero Technologies

 

 

Edited by Brian Evans

Share this post


Link to post

Does not work for me. I attached some screenshots. One shows the properties of the symlink, the next the output in the paserver window, and another showing the exception in the IDE.

Ubuntu_22.04_LTS_on_SOFTTOUCH-PC2_-_Virtual_Machin_2022-11-12_23-23-20.png

Windows_11_on_SOFTTOUCH-PC2_-_Virtual_Machine_Conn_2022-11-12_23-25-10.png

Windows_11_on_SOFTTOUCH-PC2_-_Virtual_Machine_Conn_2022-11-12_23-25-23.png

Share this post


Link to post

"Delphi Linux Enterprise" requires Delphi Enterprise or Architect versions, not works on Community or Professional. Delphi App Development Product Editions

FMXLinux package available in GetIt Package Manager. (However D11.2 trial version requires manual download from https://www.fmxlinux.com/  > "Download Free Trial v 1.71" and "fmxlinux-trial-1_71.exe" installation. Unfortunately FMXLinux Trial messages appear each time app starts.)

Platform Status shows supported platforms and operating systems as Ubuntu 20.04 LTS, Ubuntu 18.04 LTS, RedHat Enterprise Linux (version 8 ). However "Yum" python package support removed from versions above "Ubuntu 18.04.0 LTS", Ubuntu decided to develop their own package "dnf" instead of "yum" package RedHat initialized. https://unix.stackexchange.com/questions/673762/installing-yum-on-ubuntu  Instead of Ubuntu 18.04.0 LTS, if you try 18.04.1, 19, 20 etc. versions, you get "yum" loading messages. Without "yum" Delphi Linux SDK files cannot be loaded completely. Also for desktop app development, "desktop" iso required. If "server" iso installed, console apps shall be compiled. RedHat Enterprise Linux (version 8 ) RHEL8 costs 349 usd https://linuxhint.com/redhat_linux_pricing/   For Intel CPUs, no need to search iso without "amd" word, all iso files are loaded Intel ones, as well. http://cdimage.ubuntu.com/netboot/18.04/  https://old-releases.ubuntu.com/releases/18.04.5/
To proceed download "ubuntu-18.04-desktop-amd64.iso" from https://old-releases.ubuntu.com/releases/18.04.5/

Virtualbox/VMWare virtual machines default settings permits Ubuntu setup. Changing settings is not required even in AMD PCs. After selecting "ubuntu-18.04-desktop-amd64.iso" for CD in Settings > Storage > Controller: IDE , Ubuntu 18.04 gets installed fast.

After Ubuntu 18.04 starts, steps for Yum, Connection Profile Manager and PAServer installation: Linux Application Development
Yum installation: https://low-orbit.net/how-to-install-yum-on-ubuntu
Terminal >

 

 

 

sudo apt update

sudo apt full-upgrade

sudo apt install build-essential

sudo yum install zlib-devel

 

sudo apt update -y

sudo apt install -y yum-utils

 

// testing yum:

yum --help

yum list all      

yum search nginx        

 

After Yum installation to run PAServer :
C:\Program Files (x86)\Embarcadero\Studio\22.0\PAServer\LinuxPAServer22.0.tar.gz file extracted on Ubuntu desktop. Right click in "PAServer-22.0" window and select "Open in Terminal" 

 

Linux Delphi 11.2 FMX Ubuntu 18.04 desktop app development

Share this post


Link to post

So it seems to compile and run fine also on the latest Ubuntu 22.x, but can debug only when using older ubuntu versions?

I have no issue at all as long I do not try to debug.

Edited by softtouch

Share this post


Link to post

I installed new Ubuntu 20.04, followed the Embarcadero doc to setup everything, and I get the same "Exception class stop (17)", with a play new project without any code.

Share this post


Link to post

I created a setup script for Ubuntu. I just updated it to address the Python 3.6 dependency issue.

 

https://embt.co/Ubuntu4Delphi22

 

I've tested it on several different installs, and it works great.

 

If you only want to fix the Python 3.6 dependency issue:

Quote

Unable to start LLDB kernel: 'Symbolic link target does not exist: ~/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'.

You can use the following

sudo apt install python3 libpython3-dev -y 
ln -sf `ls -1 /usr/lib/x86_64-linux-gnu/libpython3.*.so.1.0 | tail -1` ~/PAServer-22.0/lldb/lib/libpython3.so
  • The first line ensures you have Python3 installed, but if you have a recent Ubuntu, that shouldn't be an issue. I usually had Python 3.10 installed. 
  • The second line looks in /usr/lib/x86_64-linux-gnu/ for a file matching the mask libpython3.*.so.1.0 and then updates the symbolic link 
  • Note: It assumes you installed PAServer in the folder ~/PAServer-22.0

Good luck!
 

  • Thanks 3

Share this post


Link to post
On 11/14/2022 at 10:35 PM, softtouch said:

I installed new Ubuntu 20.04, followed the Embarcadero doc to setup everything, and I get the same "Exception class stop (17)", with a play new project without any code.

Same here.

I installed Ubuntu 20.04.5 LTS (in VMware Workstation 17), then executed script from Jim.

Next, in Delphi 11.2.1 I added connection profile, so it automatically fetched SDK files from Ubuntu.

Next, using GetIt I installed FMXLinux.

Created new multi-platform project with proper connection.

 

I can compile project, and run without debugging.

But as soon as I try to debug - "Project LinGuiApp raised exception class Stop (17).".

 

Also, I noticed that when I try to debug the console app, it works.

Edited by Chief

Share this post


Link to post

I am seeing those messages as well now. Hitting continue a couple times gets past a bunch of raised exception class Stop (17) messages and I then get the FMX GUI application form visible and break points work. 

 

Here doing Setting Tools -> Options,  in the dialog: Debugger, Embarcadero Debuggers, Native OS Exceptions:  64-bit Linux Exceptions and Signals,  Stopped (signal) (SIGSTOP) ($11) to have on resume column to run handled.  The dialog never comes up at all and break points work. 

 

The number of times I needed to press continue seems to correspond with the number of warnings I see for bad DW_FORM values from LLDB in the command window paserver is running in.. 

 

Share this post


Link to post

The LLDB seems to require a Python distribution compiled with the "--enable-shared" flag. The regular APT Python distribution doesn't use the dynamically linked interpreter. However, Installing python3.x-dev and libpython3.x-dev should be enough for this case.

 

Make sure to install the same versions.

Edited by lmbelo
  • Like 2

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×