Project

General

Profile

Cleanup #48146

fix compilation error: declaration conflicts with target of using declaration already in scope

Added by Mark Kogan 3 months ago. Updated 3 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

when compiling with clang the following error occurs:

[694/773] Building CXX object src/rgw/CMakeFiles/rgw_common.dir/rgw_lua_utils.cc.o             
FAILED: src/rgw/CMakeFiles/rgw_common.dir/rgw_lua_utils.cc.o 
/usr/bin/clang++  -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__ -Isrc/include -I../src -I../src/dmclock/suppo
rt/src -I../src/rgw -I../src/spawn/include -isystem boost/include -isystem include -isystem ../src/xxHash -isystem ../src/rapidjson/include -isystem ../src/fmt/include -isystem ../src/rgw/se
rvices -Wp,-D_GLIBCXX_ASSERTIONS -fuse-ld=gold -Wno-unused-command-line-argument -pipe -frecord-gcc-switches -grecord-gcc-switches -fno-omit-frame-pointer -fstack-protector-all --param=ssp-b
uffer-size=4 -fasynchronous-unwind-tables -fstack-check -ggdb3 -gdwarf-4 -march=native -O0 -finstrument-functions -fcf-protection -fexperimental-new-pass-manager -fcolor-diagnostics -fdiagno
stics-color=always -g -fPIC   -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wnon-virtu
al-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wpessimizing-move -Wredundant-move -Wno-inconsistent-missing-override -Wno-mismatched-tags -Wno-unused-private-field -Wno-address-of-pa
cked-member -Wno-unused-function -Wno-unused-local-typedef -Wno-varargs -Wno-gnu-designator -Wno-missing-braces -Wno-parentheses -Wno-deprecated-register -DCEPH_DEBUG_MUTEX -D_GLIBCXX_ASSERT
IONS -fdiagnostics-color=always -std=c++17 -MD -MT src/rgw/CMakeFiles/rgw_common.dir/rgw_lua_utils.cc.o -MF src/rgw/CMakeFiles/rgw_common.dir/rgw_lua_utils.cc.o.d -o src/rgw/CMakeFiles/rgw_c
ommon.dir/rgw_lua_utils.cc.o -c ../src/rgw/rgw_lua_utils.cc
In file included from ../src/rgw/rgw_lua_utils.cc:5:
../src/rgw/rgw_lua_utils.h:9:1: error: declaration conflicts with target of using declaration already in scope
class CephContext;
^
../src/include/common_fwd.h:10:9: note: target of using declaration
  class CephContext;
        ^
../src/include/common_fwd.h:22:24: note: using declaration
using TOPNSPC::common::CephContext;
                       ^
In file included from ../src/rgw/rgw_lua_utils.cc:5:
../src/rgw/rgw_lua_utils.h:176:40: error: reference to 'CephContext' is ambiguous
void create_debug_action(lua_State* L, CephContext* cct);
                                       ^
../src/rgw/rgw_lua_utils.h:9:7: note: candidate found by name lookup is 'CephContext'
class CephContext;
      ^
../src/include/common_fwd.h:22:24: note: candidate found by name lookup is 'CephContext'
using TOPNSPC::common::CephContext;
                       ^

History

#1 Updated by Mark Kogan 3 months ago

  • Pull request ID set to 37979

Also available in: Atom PDF