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