[cfe-dev] Odd libc++ab dependency issue when installing libc++

Zack Perry zack.perry at sbcglobal.net
Mon Apr 8 16:20:36 PDT 2013


I followed the instructions given in http://libcxx.llvm.org/, section
"Build on Linux using CMake and libc++abi" to attempt to build libc++
with libc++abi, so that the lib is free from anything from libstdc++
(or libsupc++ for that matter).  The build host runs Scientific Linux 6.4 x86_64. The llvm/clang is 3.3 from SVN.

With Chip Davis's patch, I was able to generate a libc++abi.so.1.0 and install it as shown below on this build host:

zackp at sl1 cd /usr/lib
zackp at sl1 ls -l libc++abi*
lrwxrwxrwx 1 root root      14 Apr  8 09:31 libc++abi.so -> libc++abi.so.1
lrwxrwxrwx 1 root root      16 Apr  8 09:30 libc++abi.so.1 -> libc++abi.so.1.0
-rwxr-xr-x 1 root root 1056217 Apr  8 09:30 libc++abi.so.1.0

The two associated headers are installed here:

zackp at sl1 cd /usr/include/c++abi/3.3
zackp at sl1 ls -l
total 16
-rw-r--r-- 1 root root 6869 Apr  8 09:48 cxa_demangle.h
-rw-r--r-- 1 root root 6005 Apr  8 09:48 cxxabi.h

ldd shows that the compiled libc++.so.1.0 got all the dependencies it 
needs:

zackp at sl1 ldd libc++.so.1.0
	linux-vdso.so.1 =>  (0x00007fff261ff000)
	libc++abi.so.1 => /usr/lib/libc++abi.so.1 (0x00007f806f7af000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f806f592000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f806f1fe000)
	libm.so.6 => /lib64/libm.so.6 (0x00007f806ef7a000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f806ed72000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f806eb5b000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f806fcb8000)

But when I tried to install the generated RPM with a few hacks of the
bundled CMakeLists.txt, I got the following:

zackp at sl1 sudo rpm -Uvh libcxx-3-3svn-0.el6.x86_64.rpm 
[sudo] password for zackp: 
error: Failed dependencies:
	libc++abi.so.1()(64bit) is needed by libcxx-3.3svn.1-0.el6.x86_64

BTW 0: I didn't have any issue when building the libc++ with the libsupc++. The package installed just fine.

BTW 1: I double-checked _CPack_Packages/0.el6.x86_64/RPM/SPECS/libcxx.spec 
but couldn't figure out what I missed.

I would appreciate any hints.

Zack



More information about the cfe-dev mailing list