Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: Cannot find libamdpython.so in rocm-terminal image #32

Open
Naraenda opened this issue Jan 13, 2025 · 4 comments
Open

[Issue]: Cannot find libamdpython.so in rocm-terminal image #32

Naraenda opened this issue Jan 13, 2025 · 4 comments

Comments

@Naraenda
Copy link
Member

Naraenda commented Jan 13, 2025

Problem Description

Either the packaged rocGDB in the ROCm stack isn't linked to the right library, i.e. libpython3.8.so. Or libamdpython.so isn't correctly bundled.

Operating System

Ubuntu 20.04.6

CPU

AMD EPYC 9474F

GPU

MI210

ROCm Version

ROCm 6.3.1

ROCm Component

ROCgdb

Steps to Reproduce

Running the following command

docker run --device=/dev/kfd --device=/dev/dri --security-opt seccomp=unconfined --cap-add=SYS_PTRACE -it rocm/rocm-terminal:6.3.1 rocgdb

Results in the following error:

rocgdb: error while loading shared libraries: libamdpython.so: cannot open shared object file: No such file or directory

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

@Naraenda
Copy link
Member Author

My current workaround on ubuntu is to create a link to libpython3.8.so.

# Find libpython3.8
dpkg -L libpython3.8 | grep .so

# Create link for missing dep. on shared lib
sudo ln -s /usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so /opt/rocm-6.3.1/lib/libamdpython.so

@rouseabout
Copy link

I experience this problem too (Ubuntu 24.04 container, ROCm 6.3.1 installed via apt).

$ rocgdb
rocgdb: error while loading shared libraries: libamdpython.so: cannot open shared object file: No such file or directory

Searching the filesystem I see a broken symlink in root (/libamdpython.so -> /opt/rocm-6.3.1/lib/libamdpython.so)

@lancesix
Copy link
Collaborator

Hi,

This is a packaging issue. The packaging team has been notified and should provide a fix.

In the meantime, @Naraenda's workaround is valid.

@rouseabout, you should be able to workaround the issue by doing:

$ sudo rm /libamdpython.so  /opt/rocm-6.3.1/lib/libamdpython.so
$ sudo ln -s /usr/lib/python*/config-*-x86_64-linux-gnu/libpython*.so /opt/rocm-6.3.1/lib/libamdpython.so

@rouseabout
Copy link

@lancesix the workaround works for me, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants