Hello

I'm using a Chez scheme installed by guix package manager. The problem is *this* chez scheme can not load system shared library correctly:


#+begin_example

> (load-shared-object "libssl.so")

Exception: (while loading libssl.so) libssl.so: cannot open shared object file: No such file or directory
Type (debug) to enter the debugger.

#+end_example


The `libssl.so' is in the standard `/usr/lib/' directory, the expression above *should* load the library without problem. Now if I provide a full path,

there is another error:


#+begin_example

> (load-shared-object "/usr/lib/libssl.so")

Exception: (while loading /usr/lib/libssl.so) libcrypto.so.3: cannot open shared object file: No such file or directory
Type (debug) to enter the debugger.

#+end_example


This time, it complains `libcrypto.so.3' is missing, which essentially is the same problem as above, that is, the scheme system can't find system

shared library from standard paths (libssl.so depends on libcrypto.so).


A full session is provided below:


#+begin_example

$ type scheme
scheme is hashed (/home/pxie/.guix-profile/bin/scheme)

$ ldd $(type -p scheme)
    linux-vdso.so.1 (0x000071587e645000)
    libm.so.6 => /gnu/store/hw6g2kjayxnqi8rwpnmpraalxi0djkxc-glibc-2.39/lib/libm.so.6 (0x000071587e55f000)     libncursesw.so.6 => /gnu/store/q84lbjp7m6a6nsj98c8cpd2f57x0sn7n-ncurses-6.2.20210619/lib/libncursesw.so.6 (0x000071587e4ed000)     libz.so.1 => /gnu/store/0nszzzvmy0vnb8rhpknx7j3rhdlh5b37-zlib-1.3/lib/libz.so.1 (0x000071587e4cf000)     liblz4.so.1 => /gnu/store/f3pd9h4bv2ipx1qlzisl3ahx1fsi2wp3-lz4-1.9.3/lib/liblz4.so.1 (0x000071587e49c000)     libgcc_s.so.1 => /gnu/store/8j43fffgm8vgx4mnrbwgy0pr4rimm2k8-gcc-11.4.0-lib/lib/libgcc_s.so.1 (0x000071587e480000)     libc.so.6 => /gnu/store/hw6g2kjayxnqi8rwpnmpraalxi0djkxc-glibc-2.39/lib/libc.so.6 (0x000071587e2a2000) /gnu/store/hw6g2kjayxnqi8rwpnmpraalxi0djkxc-glibc-2.39/lib/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x000071587e647000)

$ scheme
Chez Scheme Version 10.1.0
Copyright 1984-2024 Cisco Systems, Inc.

> (load-shared-object "libssl.so")

Exception: (while loading libssl.so) libssl.so: cannot open shared object file: No such file or directory
Type (debug) to enter the debugger.

> (load-shared-object "/usr/lib/libssl.so")

Exception: (while loading /usr/lib/libssl.so) libcrypto.so.3: cannot open shared object file: No such file or directory
Type (debug) to enter the debugger.

> (putenv "LD_LIBRARY_PATH" "/usr/lib/")

> (getenv "LD_LIBRARY_PATH")
"/usr/lib/"

> (load-shared-object "/usr/lib/libssl.so")

Exception: (while loading /usr/lib/libssl.so) libcrypto.so.3: cannot open shared object file: No such file or directory
Type (debug) to enter the debugger.
#+end_example

It seems the Chez scheme, which installed by guix, does not not follow the searching mechanism described in "man 8 ld.so". On the

other hand, if I build a Chez scheme from source code, without any dependency of guix, then there is not any problem of loading system

libraries.

Since guix is essential to me, please give advice on how to resolve the problem.


Regards

Pan



Reply via email to