Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Apr 2016 14:20:20 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        Odhiambo Washington <odhiambo@gmail.com>, User Questions <freebsd-questions@freebsd.org>
Subject:   Re: About different ABI between gcc and clang
Message-ID:  <571B7694.5050006@FreeBSD.org>
In-Reply-To: <CAAdA2WMtH0JOL9Pq7oQcN_OiVZi3O=k1QZB0JBzegD_-8jGQhQ@mail.gmail.com>
References:  <CAAdA2WMtH0JOL9Pq7oQcN_OiVZi3O=k1QZB0JBzegD_-8jGQhQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--X8vnPAcJvxC50dguboAwuUDDfiFojx0Jg
Content-Type: multipart/mixed; boundary="kgERqdphWMD7j0uiiKC147L1OX0dU9Qkf"
From: Matthew Seaman <matthew@FreeBSD.org>
To: Odhiambo Washington <odhiambo@gmail.com>,
 User Questions <freebsd-questions@freebsd.org>
Message-ID: <571B7694.5050006@FreeBSD.org>
Subject: Re: About different ABI between gcc and clang
References: <CAAdA2WMtH0JOL9Pq7oQcN_OiVZi3O=k1QZB0JBzegD_-8jGQhQ@mail.gmail.com>
In-Reply-To: <CAAdA2WMtH0JOL9Pq7oQcN_OiVZi3O=k1QZB0JBzegD_-8jGQhQ@mail.gmail.com>

--kgERqdphWMD7j0uiiKC147L1OX0dU9Qkf
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 23/04/2016 13:04, Odhiambo Washington wrote:
> I am looking at this page:
> http://wiki.squid-cache.org/BuildFarm/FreeBsdInstall
>=20
> There is something that I don't quite understand and would appreciate t=
he
> help of the experts, like Matthew:-)
>=20
> <quote>
> due to different ABI between gcc and clang, libcppunit needs to be
> installed twice, one with the g++ ABI and one with clang's. The default=

> compiler for freebsd-9 is gcc; to setup the version for clang, configur=
e it
> as  CC=3Dclang35 CXX=3Dclang++35 ./configure --prefix=3D/usr/local/clan=
g-abi
> </quote>
>=20
> Can someone explain that portion to me? What is the writer suggesting I=
 do?

Well, I claim no particular expertise with compiler toolchains.

However, yes, the page is right to state that the base system compiler
on 9.x cannot deal with the C++11 standard for C++ code.  You need to
use an external toolchain for that.  There are a number of C compilers
available from ports which would do the job but primarily the choice is
between one of the gcc versions or one of the llvm (ie. clang) versions.

You don't need to install both.  In fact, you're better off picking one
and sticking with it, because if you compile some of libraries squid
depends on with one, and some with the other, you can run into problems.
(Note: this only applies to C++ code: plain C code can mix use of either
compiler quite happily.)

The problem is that the runtime support for C++ programs is supplied as
a shared library, and the versions of that library that come with gcc
are incompatible with the ones that come with the llvm suite.  Plain C
uses a staticly linked library, so the whole question doesn't arise.

If this seems like a lot of faff to you, then just build squid from
ports, where people have made available to you the fruit of their
efforts in sorting out just these sort of questions.

	Cheers,

	Matthew




--kgERqdphWMD7j0uiiKC147L1OX0dU9Qkf--

--X8vnPAcJvxC50dguboAwuUDDfiFojx0Jg
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJXG3aaXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATXcIP/1kDkPolJOsUkuhlwCTvts3m
BlxJTHpUDU9naWn7GddSN2w5q5psRj1ST84H3mz8kFbmHcsyZXSmv7gsTy14QJFU
2ZcAbEBLr+RVIcLUbM/xjhNJ4CVxvikaaAOnQiYmzDERv5LpdWlGnS8tXHzKMn50
jVp/SzU+/kuO1/ZGTDdjloH8xeVhuSjbLdhisd77IaaYfAHOUVhKMBzr3b1o5SBh
f0RoZovWUM9l8VSY1FC8NZ/LiX0UaExLnaXkle0CljauAeerMzAdvdEexV+GjdJb
8YI1A6iVcIWxOZcAMTZUXVrCsJqqH7r4tMTJbuJR7g4Buom5EwVq3u468QE2vN0e
UBWjZqYzkWeygKspTdWQV3Is7+Hqv29C41fk0qqZX3yhWEeRQkipefymPe4DOqyc
abOHjHN2nU+rbfjDxvcX8dC0dWvykUHm7uVKvje4h9TC6e/hbG1hnb3K9i1j8cKN
NEEYVyX30i489t4aiMBvaz71r6P60e+SbRplDHPeNKKIxu+N6yoqGOnSv5AT1kfp
A4FB1KdMM+z08trKYRdInmnpmfcAiotJdzyrI4cAxVNv+daIW+IUsnyr5Ucfo4Wb
gthRaHve8/cmL+TS9Rk5RnEuCeZcq/nscwBZOaTWWMdD5iazvXwyrd0v8MBPcLO5
z9aq7zcso3P8NX+hoFPW
=2chX
-----END PGP SIGNATURE-----

--X8vnPAcJvxC50dguboAwuUDDfiFojx0Jg--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?571B7694.5050006>