Project

General

Profile

Actions

Bug #17132

closed

Clang: Naming conflic between math log() and namespace log

Added by Willem Jan Withagen over 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
build
Target version:
-
% Done:

0%

Source:
other
Tags:
clang
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

[ 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 {

Actions #1

Updated by Sage Weil almost 7 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF