From owner-freebsd-questions@freebsd.org Sat Apr 23 13:20:32 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 976FCB120D4 for ; Sat, 23 Apr 2016 13:20:32 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 266951A6E for ; Sat, 23 Apr 2016 13:20:32 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (liminal.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3636:3bff:fed4:b0d6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 556C9DF31; Sat, 23 Apr 2016 13:20:26 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/556C9DF31; dkim=none; dkim-atps=neutral Subject: Re: About different ABI between gcc and clang To: Odhiambo Washington , User Questions References: From: Matthew Seaman Message-ID: <571B7694.5050006@FreeBSD.org> Date: Sat, 23 Apr 2016 14:20:20 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X8vnPAcJvxC50dguboAwuUDDfiFojx0Jg" X-Virus-Scanned: clamav-milter 0.99.1 at smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Apr 2016 13:20:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --X8vnPAcJvxC50dguboAwuUDDfiFojx0Jg Content-Type: multipart/mixed; boundary="kgERqdphWMD7j0uiiKC147L1OX0dU9Qkf" From: Matthew Seaman To: Odhiambo Washington , User Questions Message-ID: <571B7694.5050006@FreeBSD.org> Subject: Re: About different ABI between gcc and clang References: In-Reply-To: --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 > > 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 > >=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--