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

Hasan Marzooq via libcxx-dev libcxx-dev at lists.llvm.org
Mon Dec 13 23:03:17 PST 2021


Appending -L is giving same error:

SHLIB_LINK += -lrt -std=c++11 -lc++ -L/usr/local/lib/x86_64-unknown-linux
----
/bin/ld: cannot find -lc++
collect2: error: ld returned 1 exit status
make: *** [plv8-3.0.0.so] Error 1
----

Also tried removing lc++
SHLIB_LINK += -lrt -std=c++11

giving error:
--
/usr/bin/opt -module-summary -f plv8.bc -o plv8.bc
make: /usr/bin/opt: Command not found
make: *** [plv8.bc] Error 127
----

Below is also giving above error i.e. "make: /usr/bin/opt: Command not
found"
SHLIB_LINK += -lrt -std=c++11 libstdc++

As a separate test, I tried to fix the "not found" of "libc++abi.so.1" (as
indicated in my original post) with following:
export LD_LIBRARY_PATH=/usr/local/lib/x86_64-unknown-linux/
[root at ip-1-3-1-1 plv8-3.0.0]# ldd
/usr/local/lib/x86_64-unknown-linux/libc++.so.1.0
        linux-vdso.so.1 (0x00007ffce078e000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fefd6ae0000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fefd6735000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fefd63f5000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fefd61ed000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fefd5fd7000)
        libatomic.so.1 => /lib64/libatomic.so.1 (0x00007fefd5dcf000)
        libc++abi.so.1 =>
/usr/local/lib/x86_64-unknown-linux/libc++abi.so.1 (0x00007fefd5b8e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fefd6fcf000)
[root at ip-1-1-0-1 plv8-3.0.0]#

and trying with " SHLIB_LINK += -lrt -std=c++11 -lc++"

gives error:

----
/bin/ld: cannot find -lc++
collect2: error: ld returned 1 exit status
make: *** [plv8-3.0.0.so] Error 1
----

If I understand correctly, the "make" of plv8 is searching for -lc++ which
is provisioned as part of " libc++abi.so.1" or "libc++.so.1.0" and both of
these are present in my machine, but probably the linker (ld) is not able
to find either or both of them and as a result throwing error when it comes
to link lc++.

lc++ is the last thing which plv8 is looking for, and if this issue is
resolved then I guess I'm not too far off from finally installing plv8.

Therefore, I would appreciate it if anyone can throw some ideas/solutions
here!

Thank you!










On Tue, 14 Dec 2021 at 03:35, Raul Tambre <raul at tambre.ee> wrote:

> I rather meant appending. I'd imagine plv8 might require linking rt and
> the
> explicit standard flag.
>
>  > Also, could you please elaborate what is meant by "It might be easier
> to
> simply use libstdc++ though"
>
> Presumably Amazon Linux uses libstdc++. Instead of using libc++ for plv8
> and
> having to compile it, install it and make sure everything else is built
> with it
> too, you could simply use the system's (i.e. remove the -lc++).
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20211214/91c5295e/attachment.html>


More information about the libcxx-dev mailing list