[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 06:29:40 PST 2021
Hi.
I'm trying to build and install libcxx and libcxxabi using the Bootstrapping
<https://libcxx.llvm.org/BuildingLibcxx.html> method on Amazon Linux 2.
Both ibcxx and libcxxabi libraries are prerequisites to build and install a
plv8 <https://plv8.github.io/> extension which is my ultimate objective.
While doing the build of plv8 I'm getting below error:
----
/bin/ld: cannot find -lc++
collect2: error: ld returned 1 exit status
make: *** [plv8-3.0.0.so] Error 1
----
Below are the three observations I noted from the logs of installing and
running tests as mentioned in Bootstrapping method
1) Install logs for libcxx and libcxxabi:
-- Set runtime path of "/usr/local/lib/x86_64-unknown-linux/libc++.so.1.0"
to ""
-----
[root at ip-1-1-1-1 ~]# readelf -d
/usr/local/lib/x86_64-unknown-linux/libc++.so.1.0 | grep -E
'NEEDED|RUNPATH|RPATH'
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libatomic.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc++abi.so.1]
[root at ip-1-1-1-1 ~]# ldd /usr/local/lib/x86_64-unknown-linux/libc++.so.1.0
linux-vdso.so.1 (0x00007ffc0e5a8000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa8a5901000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa8a5556000)
libm.so.6 => /lib64/libm.so.6 (0x00007fa8a5216000)
librt.so.1 => /lib64/librt.so.1 (0x00007fa8a500e000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa8a4df8000)
libatomic.so.1 => /lib64/libatomic.so.1 (0x00007fa8a4bf0000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa8a5df0000)
libc++abi.so.1 => not found
-----
2) Some tests are failing:
----
Testing Time: 3051.59s
Unsupported : 498
Passed : 7026
Expectedly Failed: 53
Failed : 45
----
3) Build log is showing:
"Could not find ParallelSTL, libc++abi will not attempt to use it but the
build may fail if the libc++ in use needs it to be available."
Below are the details and logs while building libcxx and libcxxabi using
Bootstrapping method:
Configure:
cmake -G Ninja -S llvm -B build -DLLVM_ENABLE_PROJECTS="clang"
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi"
-DLLVM_RUNTIME_TARGETS="x86_64-unknown-linux" -DLLVM_PARALLEL_LINK_JOBS=1
-DCMAKE_BUILD_TYPE=Release
Logs available here
<https://drive.google.com/file/d/1TzGVx29yvGrQe054_P6eERrrGyDnlpM3/view?usp=sharing>
:
Build:
ninja-build -C build runtimes
Logs available here
<https://drive.google.com/file/d/1H5r2-wgY5vzcnRI8Pm_THxJGwB0xhGQY/view?usp=sharing>
:
Test:
ninja -C build check-runtimes
Logs available here
<https://drive.google.com/file/d/1amXKqczAqVivloSH2HLiKsD3JPRg_Sy-/view?usp=sharing>
:
Install:
ninja-build -C build install-runtimes
Logs available here
<https://drive.google.com/file/d/1mWr236g_3vgypWpBAGZkXFjXhcaRECbl/view?usp=sharing>
:
Machine info:
cat /proc/version
Linux version 4.14.252-195.483.amzn2.x86_64 (mockbuild at ip-10-0-32-100) (gcc
version 7.3.1 20180712 (Red Hat 7.3.1-13) (GCC))
I've been struggling with this for the last few days but kind of stuck at
this stage. Therefore, any help is highly appreciated!
Thanks
Naqvi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20211213/423d473a/attachment.html>
More information about the libcxx-dev
mailing list