From owner-freebsd-toolchain@freebsd.org Wed Aug 24 14:31:07 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 E2B32BC2948 for ; Wed, 24 Aug 2016 14:31:07 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [176.74.240.9]) (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 818041A8E for ; Wed, 24 Aug 2016 14:31:06 +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 6C92026AC3; Wed, 24 Aug 2016 16:30:58 +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 pdXqRZ0RUj4d; Wed, 24 Aug 2016 16:30:56 +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 893DA26AC2; Wed, 24 Aug 2016 16:30:56 +0200 (CEST) Subject: Re: name conflict after upgrade to HEAD. To: Dimitry Andric References: <0777433b-66fd-7a16-c8b5-25f6fee7ad31@digiware.nl> <2783A1E7-853F-4361-88BF-362B6C5F4764@andric.com> Cc: FreeBSD Toolchain From: Willem Jan Withagen Message-ID: <8892da81-7aa6-20cf-3edd-106d85cd5aef@digiware.nl> Date: Wed, 24 Aug 2016 16:30:52 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <2783A1E7-853F-4361-88BF-362B6C5F4764@andric.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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 14:31:08 -0000 On 24-8-2016 15:23, Dimitry Andric wrote: > On 24 Aug 2016, at 12:14, Willem Jan Withagen wrote: >> >> 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. > ... >> >> 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);} > > 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. Hi Dimitry, 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 { ^ 1 error generated. gmake[2]: *** [src/CMakeFiles/common.dir/build.make:208: src/CMakeFiles/common.dir/common/perf_counters.cc.o] Error 1 gmake[2]: Leaving directory '/usr/srcs/Ceph/work/ceph/build' gmake[1]: *** [CMakeFiles/Makefile2:380: src/CMakeFiles/common.dir/all] Error 2 gmake[1]: Leaving directory '/usr/srcs/Ceph/work/ceph/build' gmake: *** [Makefile:139: all] Error 2 235.883u 5.236s 4:01.13 99.9% 129523+964k 642+267342io 8646pf+0w Exit 2