[libcxx-dev] Problem installing libcxx and libcxxabi using Bootstrapping on Amazon Linux 2

Hasan Marzooq via libcxx-dev libcxx-dev at lists.llvm.org
Thu Dec 16 01:29:07 PST 2021


Thank you so much for your help!

>Install it somewhere that's on ld's default search path (see ld --verbose).
>/usr/local/lib is likely on it and an arch variant too, but I'm not
familiar
>with RHEL.
>This would be the third fix you noted. You shouldn't need to manually
specify
>the search path afterwards.

Agreed! I'll try that.

Meanwhile, I've installed "opt" with "yum install llvm.x86_64" and make of
plv8 is successful. I then proceeded with "make install" for plv8. But when
creating plv8 extension into Postgres, I'm again getting library search
issue. I'm posting here, as the error I'm getting is related to ld's search
path (which we were already resolving in this thread)

------
sudo -u postgres psql
could not change directory to "/root/plv8-3.0.0": Permission denied
psql (13.3)
Type "help" for help.

postgres=# CREATE EXTENSION plv8;
ERROR:  **could not load library "/usr/lib64/pgsql/plv8-3.0.0.so":
libc++.so.1: cannot open shared object file: No such file or directory**
postgres=# exit
----------

---
s -ltrh /usr/lib64/pgsql/plv8-3.0.0.so
-rwxr-xr-x 1 root root 153M Dec 16 07:54 /usr/lib64/pgsql/plv8-3.0.0.so

ls -ltrh /usr/local/lib/libc++.so.1
-rwxr-xr-x 1 root root 1.1M Dec 15 12:16 /usr/local/lib/libc++.so.1
----


---
 ldd /usr/lib64/pgsql/plv8-3.0.0.so
        linux-vdso.so.1 (0x00007ffd03f21000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f708ec34000)
        libc++.so.1 => not found
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f708e8b2000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f708e572000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f708e35c000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f708dfb1000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7091178000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f708dd93000)
----

--
ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
SEARCH_DIR("=/usr/x86_64-redhat-linux/lib64")
SEARCH_DIR("=/usr/lib64")
SEARCH_DIR("=/usr/local/lib64")
SEARCH_DIR("=/lib64")
SEARCH_DIR("=/usr/x86_64-redhat-linux/lib")
SEARCH_DIR("=/usr/local/lib")
SEARCH_DIR("=/lib")
SEARCH_DIR("=/usr/lib")
----


I've tried copying plv8-3.0.0.so into /usr/local/lib as this dir is in ld's
search path. But still getting same error ould not load library
"/usr/lib64/pgsql/plv8-3.0.0.so": libc++.so.1: cannot open shared object
file: No such file or directory

Any idea/guidance ? Please.

Thanks!

On Thu, 16 Dec 2021 at 02:15, Raul Tambre <raul at tambre.ee> wrote:

>  > Is there a better way than above 3 (manual fixes) to add
> "/usr/local/lib/x86_64-unknown-linux-gnu" in id's search path?
>
> Install it somewhere that's on ld's default search path (see ld --verbose).
> /usr/local/lib is likely on it and an arch variant too, but I'm not
> familiar
> with RHEL.
> This would be the third fix you noted. You shouldn't need to manually
> specify
> the search path afterwards.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20211216/1f6cf565/attachment.html>


More information about the libcxx-dev mailing list