]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rbd: workaround for llvm linker proplem, avoid std:pair dtor
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 28 Nov 2018 12:27:13 +0000 (13:27 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Wed, 5 Dec 2018 14:35:37 +0000 (15:35 +0100)
commiteabeaf5fbc29cf5102ce4868787cbf6f9abbe371
tree2370db2ec6b1c29ae38394230b91dc08acb692f6
parent4db915d06ddbe6306151a22543ee40f4ada4c4d8
rbd: workaround for llvm linker proplem, avoid std:pair dtor

When linking with llvm linker on FreeBSD:
```
/usr/bin/ld.lld: error: undefined symbol: std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool>::~pair()
>>> referenced by Image.cc:349 (/home/jenkins/workspace/ceph-master/src/librbd/api/Image.cc:349)
>>>               Image.cc.o:(librbd::api::Image<librbd::ImageCtx>::list_children(librbd::ImageCtx*, cls::rbd::ParentImageSpec const&, std::__1::vector<librbd::linked_image_spec_t, std::__1::allocator<librbd::linked_image_spec_t> >*)) in archive ../../../lib/librbd_internal.a
```

Which is probably because the compiler calls a dtor on the just created pair.
But the FreeBSD linker does not find a dtor in the any of the libraries.
This rewrite build and links without the linker error.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/librbd/api/Image.cc