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

preferred way to export libpython3.so to ldd? #168

Open
scarf005 opened this issue Aug 30, 2023 · 1 comment · May be fixed by #193
Open

preferred way to export libpython3.so to ldd? #168

scarf005 opened this issue Aug 30, 2023 · 1 comment · May be fixed by #193

Comments

@scarf005
Copy link

scarf005 commented Aug 30, 2023

Provide environment information

OS:
Linux TG02 6.5.0-stock #1 SMP PREEMPT_DYNAMIC Wed Aug 30 11:09:37 KST 2023 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
fish, version 3.6.1

ASDF VERSION:
v0.11.1-27c8a10

ASDF ENVIRONMENT VARIABLES:
ASDF_DIRENV_BIN=/home/scarf/.asdf/installs/direnv/2.32.3/bin/direnv

ASDF INSTALLED PLUGINS:
direnv                       https://github.com/asdf-community/asdf-direnv.git master 1a140d6
golang                       https://github.com/kennyp/asdf-golang.git master f006a12
gradle                       https://github.com/rfrancis/asdf-gradle.git master e47df00
java                         https://github.com/halcyon/asdf-java.git master 89f431e
kotlin                       https://github.com/asdf-community/asdf-kotlin.git master af9ab2c
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master c9e5df4
pnpm                         https://github.com/jonathanmorley/asdf-pnpm.git master ea033db
python                       https://github.com/danhper/asdf-python.git master 8505457

To Reproduce

 !~/l/t/perf  ldd (which perf)                  2023년 08월 30일 (수) 오전 11시 49분 21초        linux-vdso.so.1 (0x00007ffebadd4000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f82cb317000)
        libelf.so.1 => /lib/x86_64-linux-gnu/libelf.so.1 (0x00007f82cbe9f000)
        libdw.so.1 => /lib/x86_64-linux-gnu/libdw.so.1 (0x00007f82cbdf4000)
        libunwind-x86_64.so.8 => /lib/x86_64-linux-gnu/libunwind-x86_64.so.8 (0x00007f82cb2fb000)
        libunwind.so.8 => /lib/x86_64-linux-gnu/libunwind.so.8 (0x00007f82cb2df000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f82cb2ad000)
        libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f82cae00000)
        libslang.so.2 => /lib/x86_64-linux-gnu/libslang.so.2 (0x00007f82caa00000)
        libperl.so.5.36 => /lib/x86_64-linux-gnu/libperl.so.5.36 (0x00007f82ca600000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f82ca200000)
        libpython3.12.so.1.0 => not found
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f82c9e00000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f82cb28f000)
        libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f82ca54c000)
        libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007f82cbde4000)
        libnuma.so.1 => /lib/x86_64-linux-gnu/libnuma.so.1 (0x00007f82cb282000)
        libbabeltrace-ctf.so.1 => /lib/x86_64-linux-gnu/libbabeltrace-ctf.so.1 (0x00007f82cadb5000)
        libpfm.so.4 => /lib/x86_64-linux-gnu/libpfm.so.4 (0x00007f82c9a00000)
        libtraceevent.so.1 => /lib/x86_64-linux-gnu/libtraceevent.so.1 (0x00007f82cb259000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f82cbee6000)
        libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f82ca9ed000)
        libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f82ca9b3000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f82ca528000)
        libbabeltrace.so.1 => /lib/x86_64-linux-gnu/libbabeltrace.so.1 (0x00007f82ca9a4000)
        libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f82cadac000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f82ca0b9000)
        libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f82ca48e000)

Describe the Bug

perf tool could not find libpython3.12.so.1.0.

 ~/l/t/perf  perf                          118ms  2023년 08월 30일 (수) 오전 11시 49분 11초perf: error while loading shared libraries: libpython3.12.so.1.0: cannot open shared object file: No such file or directory

Expected Behaviour

asdf installs has

 ~/l/t/perf  lsd -al ~/.asdf/installs/python/3.12.0b3/lib/
drwxr-xr-x scarf scarf 4.0 KB 2023-06-23 금 16:26:22  .
drwxr-xr-x scarf scarf 4.0 KB 2023-07-20 목 20:22:20  ..
lrwxrwxrwx scarf scarf  20 B  2023-06-23 금 16:26:17  libpython3.12.so ⇒ libpython3.12.so.1.0
.rwxr-xr-x scarf scarf  29 MB 2023-06-23 금 16:26:17  libpython3.12.so.1.0
.rwxr-xr-x scarf scarf  15 KB 2023-06-23 금 16:26:17  libpython3.so
drwxr-xr-x scarf scarf 4.0 KB 2023-06-23 금 16:26:22  pkgconfig
drwxr-xr-x scarf scarf 4.0 KB 2023-06-23 금 16:26:22  python3.12

however asdf reshim python will not add shared objects to ~/.asdf/shims/python. i could just add ~/.asdf/installs/python/3.12.0b3/lib/ to LD_LIBRARY_PATH, but this would be fragile when version changes.

would there be a better way to manage this problem?

@scarf005 scarf005 changed the title preferred way to share libpython3.so? preferred way to export libpython3.so to ldd? Aug 30, 2023
@DerekTBrown
Copy link

It seems like this could be added to the exec-env of the plugin:

https://asdf-vm.com/plugins/create.html#:~:text=Prepare%20the%20environment%20for%20running%20the%20binaries

DerekTBrown added a commit to DerekTBrown/asdf-python that referenced this issue Oct 18, 2024
@DerekTBrown DerekTBrown linked a pull request Oct 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants