From owner-freebsd-toolchain@freebsd.org Wed Aug 24 10:14:35 2016 Return-Path: Delivered-To: freebsd-toolchain@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 181F9BBEDEA for ; Wed, 24 Aug 2016 10:14:35 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (gtw.digiware.nl [IPv6:2001:4cb8:90:ffff::3]) (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 D94BB1CA0 for ; Wed, 24 Aug 2016 10:14:34 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from router.digiware.nl (localhost.digiware.nl [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id F2A7326313; Wed, 24 Aug 2016 12:14:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.com Received: from smtp.digiware.nl ([127.0.0.1]) by router.digiware.nl (router.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oKGfuHVHdmrs; Wed, 24 Aug 2016 12:14:30 +0200 (CEST) Received: from [192.168.10.67] (opteron [192.168.10.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 2778326312 for ; Wed, 24 Aug 2016 12:14:30 +0200 (CEST) To: FreeBSD Toolchain From: Willem Jan Withagen Subject: name conflict after upgrade to HEAD. Message-ID: <0777433b-66fd-7a16-c8b5-25f6fee7ad31@digiware.nl> Date: Wed, 24 Aug 2016 12:14:26 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2016 10:14:35 -0000 Hi, While compile Ceph source code I run into this conflict of the usuage of 'log' Now I've fixed it by prefixing the log with ::log on line 845. Which works for me, but I'm pretty sure that that is not the best solution. Why is this al of a sudden a problem? The log namespace has been in Ceph for a long time. The original namespace block looks like: namespace ceph { class PluginRegistry; class HeartbeatMap; namespace log { class Log; } } So where does this conflict come from? --WjW This is FreeBSD Revision: 304572 and clang: FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) Target: x86_64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin In file included from /usr/include/c++/v1/cmath:301: /usr/include/c++/v1/math.h:845:37: error: reference to 'log' is ambiguous log(_A1 __lcpp_x) _NOEXCEPT {return log((double)__lcpp_x);} ^ /usr/include/c++/v1/math.h:845:1: note: candidate found by name lookup is 'log' log(_A1 __lcpp_x) _NOEXCEPT {return log((double)__lcpp_x);} ^ /usr/include/c++/v1/math.h:839:46: note: candidate found by name lookup is 'log' inline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return logl(__lcpp_x);} ^ /usr/include/c++/v1/math.h:838:46: note: candidate found by name lookup is 'log' inline _LIBCPP_INLINE_VISIBILITY float log(float __lcpp_x) _NOEXCEPT {return logf(__lcpp_x);} ^ /usr/include/math.h:247:8: note: candidate found by name lookup is 'log' double log(double); ^ /home/wjw/ceph/src/common/ceph_context.h:44:13: note: candidate found by name lookup is 'ceph::log' namespace log { ^