From owner-freebsd-toolchain@freebsd.org Thu Aug 25 07:07:03 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 5C9B9BB7CA8 for ; Thu, 25 Aug 2016 07:07:03 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0408819EC for ; Thu, 25 Aug 2016 07:07:02 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from [IPv6:2001:7b8:3a7::e1f3:a144:11be:3140] (unknown [IPv6:2001:7b8:3a7:0:e1f3:a144:11be:3140]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A4BCD39D57; Thu, 25 Aug 2016 09:06:53 +0200 (CEST) Subject: Re: name conflict after upgrade to HEAD. Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_64E84B92-AD2D-460A-8ED2-6EEDF70170AB"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.6.1 From: Dimitry Andric In-Reply-To: <8892da81-7aa6-20cf-3edd-106d85cd5aef@digiware.nl> Date: Thu, 25 Aug 2016 09:06:42 +0200 Cc: FreeBSD Toolchain Message-Id: <098B0C71-3287-49B6-A80F-25A63087134F@andric.com> References: <0777433b-66fd-7a16-c8b5-25f6fee7ad31@digiware.nl> <2783A1E7-853F-4361-88BF-362B6C5F4764@andric.com> <8892da81-7aa6-20cf-3edd-106d85cd5aef@digiware.nl> To: Willem Jan Withagen X-Mailer: Apple Mail (2.3124) 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: Thu, 25 Aug 2016 07:07:03 -0000 --Apple-Mail=_64E84B92-AD2D-460A-8ED2-6EEDF70170AB Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=windows-1252 On 24 Aug 2016, at 16:30, Willem Jan Withagen wrote: > > On 24-8-2016 15:23, Dimitry Andric wrote: ... >> Can you show the full command line used to build the offending source >> file? Usually this is caused by an incorrect include directory search >> order. And most often, that is caused by build systems inserting >> -isystem into compile command lines. > > This is the full output of the failing compile > > --WjW > > [ 3%] Building CXX object > src/CMakeFiles/common.dir/common/perf_counters.cc.o > cd /home/wjw/ceph/build/src && /usr/bin/CC > -DCEPH_LIBDIR=\"/usr/local/lib\" > -DCEPH_PKGLIBDIR=\"/usr/local/lib/ceph\" > -I/home/wjw/ceph/build/src/include -I/home/wjw/ceph/src > -I/usr/local/include -I/home/wjw/ceph/build/include > -I/home/wjw/ceph/src/xxHash -Wall -Wtype-limits -Wignored-qualifiers > -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing > -fsigned-char -Wno-inconsistent-missing-override -Wno-mismatched-tags > -Wno-unused-function -Wno-unused-local-typedef > -Wno-inconsistent-missing-override -Wno-unused-private-field > -Wno-varargs -Wno-gnu-designator -Wno-mismatched-tags > -Wno-missing-braces -Wno-parentheses -Wno-deprecated-register > -ftemplate-depth-1024 -Wno-invalid-offsetof -Wnon-virtual-dtor > -Wno-overloaded-virtual -fdiagnostics-color=auto > -I/usr/local/include/nss/nss -I/usr/local/include/nspr > -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc > -fno-builtin-free -O0 -g -fPIC -DHAVE_CONFIG_H -D__CEPH__ -D_REENTRANT > -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -std=c++11 -o > CMakeFiles/common.dir/common/perf_counters.cc.o -c > /home/wjw/ceph/src/common/perf_counters.cc > In file included from /home/wjw/ceph/src/common/perf_counters.cc:17: > In file included from /home/wjw/ceph/src/common/perf_counters.h:21: > In file included from /home/wjw/ceph/src/include/utime.h:18: > /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 { > ^ Okay, no -isystem options there. So that's not it. Now I'm assuming this is because the original .cc file includes , which imports a global "log" symbol. Can you try changing that include to ? However, this could require prefixing some math function calls with std::. -Dimitry --Apple-Mail=_64E84B92-AD2D-460A-8ED2-6EEDF70170AB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAle+mQ0ACgkQsF6jCi4glqNnEwCdH4HZVZAI+s8EscuqGIO9M8g5 ga8AoPZ+Zfk0s/cag3hwCkhz+89a8CKS =NavC -----END PGP SIGNATURE----- --Apple-Mail=_64E84B92-AD2D-460A-8ED2-6EEDF70170AB--