Undefined Symbol: rpn

Moderators: cyao, soliday

Post Reply
randalc
Posts: 2
Joined: 17 Jun 2022, 14:42

Undefined Symbol: rpn

Post by randalc » 24 Sep 2024, 10:56

Hello,

I am having an issue with importing sdds in python 3.12 where I get the following error.

>>> import sdds
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/sdds.py", line 1, in <module>
import sddsdata, sys, time
ImportError: /usr/lib/python3/dist-packages/sddsdata.so: undefined symbol: rpn


I have checked the RPN environment and it seems correct (~/.defns.rpn). I have tried rebuilding all my SDDS related RPMs (SDDSToolKit-5.6.1-1.x86_64.rpm, SDDSEpicsToolKit-5.6-1.x86_64.rpm, SDDSToolKit-devel-5.6.1-1.x86_64.rpm, SDDSPython3-5.2.1-1.x86_64.rpm), I re-downloaded the defns.rpn file from the site. I am not sure what to try now. (I am using Ubuntu 24.04)
Thank you for any help.

soliday
Posts: 408
Joined: 28 May 2008, 09:15

Re: Undefined Symbol: rpn

Post by soliday » 24 Sep 2024, 14:00

I haven't tried building or running on Ubuntu 24.04 yet. I am in the process of downloading the installation file now. In the meantime I just tested this on ubuntu 22.04 and don't see this problem. I will try to get out a working release for Ubuntu 24.04 as soon as I am able.

--Bob

soliday
Posts: 408
Joined: 28 May 2008, 09:15

Re: Undefined Symbol: rpn

Post by soliday » 24 Sep 2024, 21:10

I have posted Ubuntu 24.04 RPMs
You can also build it yourself using the Build-AOP-RPMs.
I had to make a change to a file in SDDS.5.6.1.tar.gz to link the proper libraries for sddsdata.so

--Bob Soliday

randalc
Posts: 2
Joined: 17 Jun 2022, 14:42

Re: Undefined Symbol: rpn

Post by randalc » 25 Sep 2024, 13:04

Thank you. I tried the new build and it did not work.
I think the issue may have come from my computer updating from ubuntu 22.04 to 24.04.
I wiped the computer and rebuilt from scratch and that seemed to fix the issue.

dhidas
Posts: 5
Joined: 21 Nov 2024, 14:33

Re: Undefined Symbol: rpn

Post by dhidas » 03 Jan 2025, 08:36

I have perhaps a similar issue. I've been building elegant from source for years now and starting with version 2023.4.0 I notice that my build is fine, but when I "import sdds" in python3.x I'm getting undefined rpn symbols coming from sddsdata.so. This is the case for 2023.4.0 and 2024.1.0 and seems to be independent of gnu gcc version (tried 9-14) and python versions on redhat alma 9.2 (same on 8.x). I'm trying to find where this linking went awry, but so far have not been able to. Any help or pointers on this would be much appreciated. I'll paste the error here and attach the build script as it is currently.

[dhidas 08:25:13 ~ ] python -c "import sdds"
Traceback (most recent call last):
File "<string>", line 1, in <module>
import sdds
File "/nsls2/software/ap/rh92/apps/gcc-13_3/mpich-4_3/elegant/2023.4.0/epics/extensions/src/SDDS/python/sdds.py", line 1, in <module>
import sddsdata, sys, time
ImportError: /nsls2/software/ap/rh92/apps/gcc-13_3/mpich-4_3/elegant/2023.4.0/epics/extensions/lib/linux-x86_64/sddsdata.so: undefined symbol: rpn_clear
Attachments
build-elegant.txt
(3.86 KiB) Downloaded 982 times

soliday
Posts: 408
Joined: 28 May 2008, 09:15

Re: Undefined Symbol: rpn

Post by soliday » 06 Jan 2025, 11:40

There is a new release of the SDDS code and the SDDS Python module. If you rebuild from the updated code, it should fix the problem you are seeing with not linking in the rpn library.

--Bob

dhidas
Posts: 5
Joined: 21 Nov 2024, 14:33

Re: Undefined Symbol: rpn

Post by dhidas » 06 Jan 2025, 16:49

Thanks. This did the trick and it seems to work for me in 2023.4.0 and 2024.1.0. I appreciate the help.

Post Reply