From owner-freebsd-questions@freebsd.org Sat Apr 23 13:59:58 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 68603B12CF2 for ; Sat, 23 Apr 2016 13:59:58 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECF7F115D; Sat, 23 Apr 2016 13:59:57 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by mail-wm0-x233.google.com with SMTP id e201so43771417wme.0; Sat, 23 Apr 2016 06:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1zJf5cPAicpV1pSHlRoLzSM4D3DTiJZdJXcV3+ORXU8=; b=b4os0adW0Bh3zJg+OlKrcsTQkHwajel6BvyT98+aCwTJ3JhQgZGcSzEDaIXLUj3rs6 5kz6DZQXxUSPOq4vxWUhRkmrWyRQ9nxXkY8Fv87l84MzVj411bHUUr9ALJb1bc88k/7J EDV7JK8J7Xqd+kL8q9HYBuDRJBG5cOgPVSIf/sE06N5UhlAcK+uCxOlffLNQrveuH8ch PIEiCKtT8LsTnARQ4QllbDFe681uZAmQZLNLxIl0cMq/UEFfZbgY++LCe/yhLQH3vjDG 7zsoD3i9ClXDycGIynhbgQPyj1cXnG9IVufnUFuF30vANnMZFaIrUB210+80WxWdcwb9 xqkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1zJf5cPAicpV1pSHlRoLzSM4D3DTiJZdJXcV3+ORXU8=; b=AF3KQJ5PeKYYkhkgeZNXSrNwlUs2IMiMludGFMxcFlHx4o3ElluE3/CFvm+Hk9wuzG hXASkCx2CW/nBF1rPrs7oQkUHTjisT10smLM26dXEX+p+Dn6SGEqGxre+eaD8v7r8bnK HYi7Kg64pDza5XNG9wMQS0cc3hnSjpzGkDAbZdQY47Zo75QfG0EkbigJonSVDa/omjZx TTVDMOCQwoMxryygeR5Ntel8NnBKRlJ7olv4kiORj68sp5g+ptbKvTuGDK9vlZ41N1PY 6XNfOaxg6b31b87fPtx/fgyvVIT2Jbil0BJdu2zQAZDNz/Cdl1gtagOBpuKJysoxUyU3 x5/Q== X-Gm-Message-State: AOPr4FVU0AvkUOZnw+ApeTK+cr8Kq8PgKQFsnhEaowzkGKHvi+REn6keUFjRRRVU8/eISHDZxnOoGzNttOy9mw== X-Received: by 10.28.73.66 with SMTP id w63mr2835372wma.53.1461419996555; Sat, 23 Apr 2016 06:59:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.103.233 with HTTP; Sat, 23 Apr 2016 06:59:16 -0700 (PDT) In-Reply-To: <571B7694.5050006@FreeBSD.org> References: <571B7694.5050006@FreeBSD.org> From: Odhiambo Washington Date: Sat, 23 Apr 2016 16:59:16 +0300 Message-ID: Subject: Re: About different ABI between gcc and clang To: Matthew Seaman Cc: User Questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:59:58 -0000 On 23 April 2016 at 16:20, Matthew Seaman wrote: > On 23/04/2016 13:04, Odhiambo Washington wrote: > > I am looking at this page: > > http://wiki.squid-cache.org/BuildFarm/FreeBsdInstall > > > > There is something that I don't quite understand and would appreciate the > > help of the experts, like Matthew:-) > > > > > > 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, configure > it > > as CC=clang35 CXX=clang++35 ./configure --prefix=/usr/local/clang-abi > > > > > > 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 > > Hello Matthew, Thank you for taking time off your weekend to answer this. I however need to 'do something' as suggested in the page, but which one is it? On my box, I have: root@gw:/usr/home/wash # `which clang` --version FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: i386-unknown-freebsd9.3 Thread model: posix root@gw:/usr/home/wash # clang --version FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: i386-unknown-freebsd9.3 Thread model: posix root@gw:/usr/home/wash # gcc --version gcc (GCC) 4.2.1 20070831 patched [FreeBSD] Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. root@gw:/usr/home/wash # which gcc /usr/bin/gcc root@gw:/usr/home/wash # /usr/bin/gcc --version gcc (GCC) 4.2.1 20070831 patched [FreeBSD] Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Any suggestion on what I should do? I am trying to compile squid-4.0.9 which isn't in the ports. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft."