<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>While it may be possible to jump through some RPATH tricks to use
a libstdc++ that is local to clang, you would still run into lots
of problems with libclang and friends.</p>
<p>C and C++ library packaging is definitely in the top 10 things I
dislike about Linux.</p>
<p>Historically, on Windows, the C and C++ libraries are just
regular libraries that aren't packaged with the OS. They aren't
considered OS components. It's easy to have multiple
installations of the C and C++ library (I think this is / has
changed recently?). <br>
</p>
<p>On Linux libstdc++ is usually packaged with the OS. System
administrators would not like it if a random package upgraded
libstdc++ for the entire system. The flat symbol namespace on
Linux makes it difficult to provide multiple versions without
breaking significant use cases.<br>
</p>
<div class="moz-cite-prefix">On 6/29/2016 8:28 AM, Brian Cain via
llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:CAEWpfG-1A2oJKQF6f9wJ9fqW4j8U=5MvJD0jA=jWcn0RFjXrYA@mail.gmail.com"
type="cite">
<div dir="ltr">It is possible to statically link against
libstdc++, yes. I don't quite know all the pieces to the recipe
in order to get that to work. It would require changes to the
release script in order to get those configuration changes all
the way through the third phase build.
<div><br>
</div>
<div>I don't believe any other tarball release does this, so it
would at least be an unconventional release.</div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jun 29, 2016 at 3:47 AM,
罗勇刚(Yonggang Luo) <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:luoyonggang@gmail.com" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:luoyonggang@gmail.com">luoyonggang@gmail.com</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Well, is that possible to include <span
style="font-size:12.8px"> libstdc++4.7 into llvm?</span></div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jun 29, 2016 at
2:26 AM, Brian Cain <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:brian.cain@gmail.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:brian.cain@gmail.com">brian.cain@gmail.com</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0
0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div dir="ltr">Sorry if I was unclear, I have
no problems building clang against a newer
gcc for my own purpose. But it doesn't make
sense to provide a release binary for clang
that's hosted on <a moz-do-not-send="true"
href="http://llvm.org" target="_blank">llvm.org</a>
that's ostensibly for "centos6" when it
would really be bound to "centos6 plus the
SCLO mirror which has the dependency for a
newer libstdc++".
<div><br>
</div>
<div>The glibc 2.14 dependency is a result
of the binary being built on a platform
new enough to have libstdc++4.7 or newer.
You could eliminate it if you could find a
CentOS release that has libstdc++4.7 and
glibc2.12. But ultimately you're still
stuck with a runtime dependency on
libstdc++ shared objects that expect
newer <span style="font-size:12.8px">GLIBCXX_*
symbols.</span></div>
<div><br>
</div>
<div>The newer gcc release is only needed at
build-time. Its byproduct/side effect of
bringing with it a newer libstdc++ is what
creates a runtime dependency.<br>
</div>
<div><br>
</div>
<div>It's my position that a CentOS 6.0-6.x
release binary for clang newer than 3.4.2
is not possible unless CentOS team
backports libstdc++4.7 release to that
CentOS release. I'd be happy to learn I'm
wrong about that claim BTW.</div>
</div>
<div class="gmail_extra">
<div>
<div><br>
<div class="gmail_quote">On Tue, Jun 28,
2016 at 1:13 PM, 罗勇刚(Yonggang Luo) <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:luoyonggang@gmail.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:luoyonggang@gmail.com">luoyonggang@gmail.com</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div dir="ltr">Hell, Brian, I found
a way to install Gcc 5.3 on CentOS
6 without the need to building it
from source. You may try it on
CentOS 6.0
<div>That's makes clang/llvm won't
depends on the newer version of
glibc 2.14</div>
<div>The instruction:</div>
<div><br>
</div>
<div>
<div>vim
/etc/yum.repos.d/llvm.repo</div>
</div>
<div><br>
</div>
<div>The content:</div>
<div>```</div>
<div>
<div>[sclo]</div>
<div>name=SCLO</div>
<div>baseurl=<a
moz-do-not-send="true"
href="http://mirror.centos.org/centos/6/sclo/x86_64/rh/"
target="_blank"><a class="moz-txt-link-freetext" href="http://mirror.centos.org/centos/6/sclo/x86_64/rh/">http://mirror.centos.org/centos/6/sclo/x86_64/rh/</a></a></div>
<div>gpgcheck=0</div>
<div>enabled=1<br>
</div>
</div>
<div>```</div>
<div>Installation step:</div>
<div>```</div>
<span>
<div>
<div>yum clean all</div>
</div>
<div>
<div>yum list</div>
</div>
</span>
<div>echo y | yum install
devtoolset-4<br>
</div>
<div>```</div>
<div><br>
</div>
</div>
<div class="gmail_extra">
<div>
<div><br>
<div class="gmail_quote">On
Wed, Jun 29, 2016 at 1:15
AM, Brian Cain <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:brian.cain@gmail.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:brian.cain@gmail.com">brian.cain@gmail.com</a></a>></span>
wrote:<br>
<blockquote
class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_extra">
<div
class="gmail_quote"><span>On
Tue, Jun 28, 2016
at 11:50 AM,
罗勇刚(Yonggang Luo)
<span dir="ltr"><<a
moz-do-not-send="true" href="mailto:luoyonggang@gmail.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:luoyonggang@gmail.com">luoyonggang@gmail.com</a></a>></span>
wrote:<br>
<blockquote
class="gmail_quote"
style="margin:0
0 0
.8ex;border-left:1px
#ccc
solid;padding-left:1ex">
<div dir="ltr">So
CentOS before
6.7 is not an
option after
all?
<div>Is that
possible to
use clang on
CentOS 6.6 and
before?</div>
<div><br>
</div>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>Not with these
binaries, unless
you can update
your
libc/libstdc++.
In the general
sense -- yes, it's
possible if you
build from
source. There's a
couple of
potential
approaches: build
against libc++,
build against
newer libstdc++.
If you're more
adventurous you
could also try
building with
ellcc. That one
requires patches
but will yield a
statically linked
binary.</div>
<div><br>
</div>
<div>I built clang
trunk/tip a few
weeks ago on
CentOS 6.0. But I
first built the
gcc6 suite, then
used it to build
clang. I believe
clang 3.4.2 is the
latest version
that supports the
older libstdc++.
I ran into
challenges with
using clang so I
stuck with gcc6.
The resulting
binaries depend on
the gcc6 libraries
so I can't really
use this procedure
to make a new
official release
for centos. If
it's helpful I can
publish the steps
I used, but really
just followed the
build
instructions.</div>
<span><font
color="#888888">
<div><br>
</div>
<div>-Brian</div>
</font></span></div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
</div>
</div>
<span>-- <br>
<div
data-smartmail="gmail_signature">
此致<br>
礼<br>
罗勇刚<br>
Yours<br>
sincerely,<br>
Yonggang Luo<br>
</div>
</span></div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
</div>
</div>
<span><font color="#888888">-- <br>
<div data-smartmail="gmail_signature">-Brian</div>
</font></span></div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div data-smartmail="gmail_signature"> 此致<br>
礼<br>
罗勇刚<br>
Yours<br>
sincerely,<br>
Yonggang Luo<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature"
data-smartmail="gmail_signature">-Brian</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
</pre>
</body>
</html>