[cfe-dev] Feedback about libc++ packaging / co installable or not in distros?
Dimitry Andric via cfe-dev
cfe-dev at lists.llvm.org
Sun Sep 16 03:39:35 PDT 2018
There's a similar issue in FreeBSD ports, but with the different versions of libstdc++ shipped with different versions of gcc. E.g. gcc 7's headers and libraries are installed into /usr/local/lib/gcc7, gcc 8's into /usr/local/lib/gcc8, and so on.
As far as I know, the only good way to make this work is by adding -rpath options to all link command lines, so the produced binaries use the correct library path. But this still won't allow mixing and matching different libstdc++.so versions.
Theoretically, the latest .so should be backwards compatible with all the previous ones, so you could make libc++8 (at least the runtime) the preferred one, and have it conflict with all the previous ones. People could still install the -dev version of libc++6, libc++7, and so on, to explicitly link against those versions.
-Dimitry
> On 16 Sep 2018, at 12:08, Sylvestre Ledru via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>
> Hello,
>
> Lately, Reshabh and myself have been working to integrate libc++ into the Debian & Ubuntu llvm-toolchains packages. A blog post is coming to explain in detail what it means.
>
> First, we focussed on bringing libc++ into the packages. Now that we have, we are working to trying to make libc++ & libc++abi coinstalable.
>
> However, starting the work, we are not sure it really makes sense.
>
> Let’s take an example. For example, if I compile with the following command line:
> clang++-8 -stdlib=libc++ -lc++abi foo.cpp -o o
> it will use the headers in /usr/lib/llvm-8/include/ & the lib in /usr/lib/llvm-8/lib/
>
> However, at run time, it will use the libc++.so.1 in the ld library path (probably in /lib/x86_64-linux-gnu/).
>
> This also means that we can have a program built using libc++-7 but at runtime, it will use the libc++-8 as library. We are not sure it is such a great idea!
>
> Otherwise, the other options is to be back marking the packages as conflicting with each others. This means that it won’t be possible on the same Debian & Ubuntu system to have libc++-7 and libc++abi-7 installed with libc++-8 and libc++abi-8.
>
> Thanks
> Sylvestre & Reshabh
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 223 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180916/130c8013/attachment.sig>
More information about the cfe-dev
mailing list