./ ./usr/ ./usr/lib64/ ./usr/lib64/libunwind.a ./usr/lib64/libunwind.so.1.0 ./usr/lib64/libunwind.so ./usr/lib64/libunwind.so.1 >>> Done. It is really wrong to install the library with no headers... @zzlei, could you figure out which headers should be installed, make a patch to add appropriate install() and upstream it?
(In reply to Michał Górny from comment #0) > ./ > ./usr/ > ./usr/lib64/ > ./usr/lib64/libunwind.a > ./usr/lib64/libunwind.so.1.0 > ./usr/lib64/libunwind.so > ./usr/lib64/libunwind.so.1 > >>> Done. > > > It is really wrong to install the library with no headers... > > @zzlei, could you figure out which headers should be installed, make a patch > to add appropriate install() and upstream it? Oh I see. It didn't bite me yet because libc++abi/libcxxrt managed to find the required headers from gcc. BTW, it turns libc++abi/libcxxrt don't install their headers either; it's manually handled with `instinto` in the ebuilds.
Actually libc++abi only uses one header from libunwind: unwind.h. And it turns out that gcc and clang both have their own version of unwind.h. So even if libunwind's headers aren't properly installed, libc++abi/libcxxrt manage to build anyway. And it's possible that clang/gcc's unwind.h is used prior to libunwind's, rendering the latter pointless.
If llvm-libunwind's going to be a replacement for GNU libunwind, it needs to install headers. clang is not the only package using it. Extra points for testing if other packages work with it. https://qa-reports.gentoo.org/output/genrdeps/rindex/sys-libs/libunwind
(In reply to Michał Górny from comment #3) > If llvm-libunwind's going to be a replacement for GNU libunwind, it needs to > install headers. clang is not the only package using it. Extra points for > testing if other packages work with it. > > https://qa-reports.gentoo.org/output/genrdeps/rindex/sys-libs/libunwind Correction: libunwind is not part of GNU. It's stated on the front page: https://savannah.nongnu.org/projects/libunwind/ I'm not sure if other packages also use unwind.h or they simply use the library, but it seems wrong to install unwind.h in /usr/include. It would simply be overridden by clang/gcc's counterpart because /usr/include is the lowest priority in the search order. The headers should be installed to /usr/include/libunwind and, when used, explicitly prepended to the search list.
(In reply to Lei Zhang from comment #4) > (In reply to Michał Górny from comment #3) > > If llvm-libunwind's going to be a replacement for GNU libunwind, it needs to > > install headers. clang is not the only package using it. Extra points for > > testing if other packages work with it. > > > > https://qa-reports.gentoo.org/output/genrdeps/rindex/sys-libs/libunwind > > Correction: libunwind is not part of GNU. It's stated on the front page: > https://savannah.nongnu.org/projects/libunwind/ > > I'm not sure if other packages also use unwind.h or they simply use the > library, but it seems wrong to install unwind.h in /usr/include. It would > simply be overridden by clang/gcc's counterpart because /usr/include is the > lowest priority in the search order. > > The headers should be installed to /usr/include/libunwind and, when used, > explicitly prepended to the search list. Don't go further than necessary. I've looked at the LLVM announcement for libunwind, and I know a little more now. So it seems that libunwind from Apple (LLVM) is backwards-compatible with the one from HP (non-GNU) but implemented an additional, new API. They are not binary-compatible. This means that: 1. The two packages should block each other (if they don't do that already). 2. The two packages should install headers alike (i.e. directly to /usr/include). The patch for this should go upstream. 3. The deps on the packages must not be in || () since they are not binary-compatible. Instead, you must use USE flags in packages to switch between the two, or a virtual preferring one of the implementations.
commit a499a225bb7e5ddd8c2478fbe804e6cbfac212c5 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: Thu Oct 6 14:40:11 2016 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: Thu Oct 6 15:28:53 2016 sys-libs/llvm-libunwind: Install headers, req for #596340