New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

erasure-code: optimize header file dependency #15172

Merged
merged 2 commits into from May 23, 2017

Conversation

Projects
None yet
6 participants
@badone
Contributor

badone commented May 19, 2017

Follows on from #9336

cxwshawn and others added some commits Jun 8, 2016

erasure-code: optimize header file dependency
Signed-off-by: Xiaowei Chen <chen.xiaowei@h3c.com>
erasure-code: optimize header file dependency
Tidy up for merging with current master.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
@liewegas

This comment has been minimized.

Member

liewegas commented May 19, 2017

I'm a bit worried the planned interface changes for #14300 will need a rebase after this, but I can't find the PR for just the interface piece...

@liewegas liewegas added needs-qa and removed needs-review labels May 19, 2017

@yuriw yuriw merged commit fea1f93 into ceph:master May 23, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
@wjwithagen

This comment has been minimized.

Contributor

wjwithagen commented May 26, 2017

@badone
@liewegas

FreeBSD/Clang is not really happy. And I'm sort of at a loss why the type is incomplete
And then later on it complains about forward definitions.

How to fix?

[ 19%] Building CXX object src/erasure-code/isa/CMakeFiles/ec_isa.dir/ErasureCodePluginIsa.cc.o
cd /home/wjw/Ceph/work/ceph/build/src/erasure-code/isa && /usr/bin/CC   -DCEPH_LIBDIR=\"/usr/local/lib\" -DCEPH_PKGLIBDIR=\"/usr/local/lib/ceph\" -D_FILE_OFFSET_BITS=64 -Dec_isa_EXPORTS -I/home/wjw/Ceph/work/ceph/build/src/include -I/home/wjw/Ceph/work/ceph/src -isystem /usr/local/include -isystem /home/wjw/Ceph/work/ceph/build/include -I/home/wjw/Ceph/work/ceph/src/xxHash -isystem /home/wjw/Ceph/work/ceph/src/rapidjson/include -I/home/wjw/Ceph/work/ceph/src/dmclock/src -I/home/wjw/Ceph/work/ceph/src/dmclock/support/src -I/home/wjw/Ceph/work/ceph/src/googletest/googletest/include -I/home/wjw/Ceph/work/ceph/src/erasure-code/jerasure/jerasure/include -I/home/wjw/Ceph/work/ceph/src/erasure-code/jerasure/gf-complete/include -I/home/wjw/Ceph/work/ceph/src/erasure-code/jerasure -I/home/wjw/Ceph/work/ceph/src/erasure-code/isa/isa-l/include  -Wall -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -Werror=format-security -fno-strict-aliasing -fsigned-char -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-local-typedef -Wno-varargs -Wno-gnu-designator -Wno-missing-braces -Wno-parentheses -Wno-deprecated-register  -ftemplate-depth-1024 -Wno-invalid-offsetof -Wnon-virtual-dtor -Wno-unknown-pragmas -Wno-inconsistent-missing-override -Wno-mismatched-tags -Wno-unused-private-field -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 -DCEPH_DEV -O0 -g -fPIC   -DHAVE_CONFIG_H -D__CEPH__ -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -std=c++11 -o CMakeFiles/ec_isa.dir/ErasureCodePluginIsa.cc.o -c /home/wjw/Ceph/work/ceph/src/erasure-code/isa/ErasureCodePluginIsa.cc
In file included from /home/wjw/Ceph/work/ceph/src/erasure-code/isa/ErasureCodePluginIsa.cc:28:
In file included from /home/wjw/Ceph/work/ceph/src/erasure-code/isa/ErasureCodePluginIsa.h:21:
In file included from /home/wjw/Ceph/work/ceph/src/erasure-code/ErasureCodePlugin.h:21:
In file included from /home/wjw/Ceph/work/ceph/src/common/Mutex.h:20:
In file included from /home/wjw/Ceph/work/ceph/src/common/ceph_context.h:20:
In file included from /usr/include/c++/v1/string:470:
In file included from /usr/include/c++/v1/string_view:171:
In file included from /usr/include/c++/v1/__string:56:
In file included from /usr/include/c++/v1/algorithm:639:
/usr/include/c++/v1/utility:318:9: error: field has incomplete type 'ceph::buffer::ptr'
    _T2 second;
        ^
/usr/include/c++/v1/memory:1394:22: note: in instantiation of template class 'std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>,
      ceph::buffer::ptr>' requested here
            decltype(__has_destroy_test(declval<_Alloc>(),
                     ^
/usr/include/c++/v1/memory:1574:24: note: in instantiation of template class 'std::__1::__has_destroy<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<int,
      std::__1::map<std::__1::basic_string<char>, std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr>,
      std::__1::less<std::__1::basic_string<char> >, std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>,
      std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr> > > > *>, void *> >, std::__1::pair<const int,
      std::__1::map<std::__1::basic_string<char>, std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr>,
      std::__1::less<std::__1::basic_string<char> >, std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>,
      std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr> > > > *> *>' requested here
            {__destroy(__has_destroy<allocator_type, _Tp*>(), __a, __p);}
                       ^
/usr/include/c++/v1/__tree:1804:24: note: in instantiation of function template specialization
      'std::__1::allocator_traits<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<int, std::__1::map<std::__1::basic_string<char>,
      std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr>, std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>,
      ceph::buffer::ptr> > > > *>, void *> > >::destroy<std::__1::pair<const int, std::__1::map<std::__1::basic_string<char>,
      std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr>, std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>,
      ceph::buffer::ptr> > > > *> >' requested here
        __node_traits::destroy(__na, _NodeTypes::__get_ptr(__nd->__value_));
                       ^
/usr/include/c++/v1/__tree:1792:5: note: in instantiation of member function 'std::__1::__tree<std::__1::__value_type<int, std::__1::map<std::__1::basic_string<char>,
      std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr>, std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>,
      ceph::buffer::ptr> > > > *>, std::__1::__map_value_compare<int, std::__1::__value_type<int, std::__1::map<std::__1::basic_string<char>,
      std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr>, std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>,
      ceph::buffer::ptr> > > > *>, std::__1::less<int>, true>, std::__1::allocator<std::__1::__value_type<int, std::__1::map<std::__1::basic_string<char>,
      std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr>, std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>,
      ceph::buffer::ptr> > > > *> > >::destroy' requested here
    destroy(__root());
    ^
/usr/include/c++/v1/__tree:1465:77: note: in instantiation of member function 'std::__1::__tree<std::__1::__value_type<int, std::__1::map<std::__1::basic_string<char>,
      std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr>, std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>,
      ceph::buffer::ptr> > > > *>, std::__1::__map_value_compare<int, std::__1::__value_type<int, std::__1::map<std::__1::basic_string<char>,
      std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr>, std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>,
      ceph::buffer::ptr> > > > *>, std::__1::less<int>, true>, std::__1::allocator<std::__1::__value_type<int, std::__1::map<std::__1::basic_string<char>,
      std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>, ceph::buffer::ptr>, std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, std::__1::pair<std::__1::__list_iterator<std::__1::basic_string<char>, void *>,
      ceph::buffer::ptr> > > > *> > >::~__tree' requested here
    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
                                                                            ^
/home/wjw/Ceph/work/ceph/src/include/buffer_fwd.h:6:11: note: forward declaration of 'ceph::buffer::ptr'
    class ptr;
          ^
@tchaikov

This comment has been minimized.

Contributor

tchaikov commented May 26, 2017

#include "include/buffer.h" in ErasureCodePluginIsa.cc

@wjwithagen

This comment has been minimized.

Contributor

wjwithagen commented May 28, 2017

@tchaikov
Yup, that is what I included in PR #15337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment