Hi,
As of commit 9b7ccbf (the introduction of class InsetCaptionable)
building LyX2.2 fails on OS X (with XCode and with autotools).
This is the error message:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2075:40:
Constructor for
'std::__1::__libcpp_compressed_pair_imp<std::__1::allocator<const
lyx::Toc>, const lyx::Toc, 1>' must explicitly initialize the const
member '__second_'
.../lyx-22-qt5/src/frontends/qt4/TocModel.cpp:14:10: In file included
from .../lyx-22-qt5/src/frontends/qt4/TocModel.cpp:14:
.../lyx-22-qt5/src/frontends/qt4/TocModel.h:15:10: In file included from
.../lyx-22-qt5-cmake-xcode/src/frontends/qt4/../../../../lyx-22-qt5/src/frontends/qt4/TocModel.h:15:
.../lyx-22-qt5/src/support/shared_ptr.h:17:10: In file included from
.../lyx-22-qt5/src/support/shared_ptr.h:17:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2345:11:
In instantiation of member function
'std::__1::__libcpp_compressed_pair_imp<std::__1::allocator<const
lyx::Toc>, const lyx::Toc, 1>::__libcpp_compressed_pair_imp' requested
here
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:3727:12:
In instantiation of member function
'std::__1::__compressed_pair<std::__1::allocator<const lyx::Toc>, const
lyx::Toc>::__compressed_pair' requested here
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4308:26:
In instantiation of member function
'std::__1::__shared_ptr_emplace<const lyx::Toc,
std::__1::allocator<const lyx::Toc> >::__shared_ptr_emplace' requested
here
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4672:29:
In instantiation of function template specialization
'std::__1::shared_ptr<const lyx::Toc>::make_shared<>' requested here
.../lyx-22-qt5/src/frontends/qt4/TocModel.cpp:84:28: In instantiation of
function template specialization 'std::__1::make_shared<const lyx::Toc>'
requested here
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2063:9:
'__second_' declared here
------------
Apparently there is a bug in c++/v1/memory as reported here
(http://lists.llvm.org/pipermail/llvm-bugs/2015-July/040892.html)
After patching c++/v1/memory the compile error goes away but the link
fails with undefined symbols.
Undefined symbols for architecture x86_64:
"lyx::InsetCaptionable::updateBuffer(lyx::ParIterator const&,
lyx::UpdateType)", referenced from:
vtable for lyx::InsetFloat in libinsets.a(InsetFloat.o)
vtable for lyx::InsetListings in libinsets.a(InsetListings.o)
lyx::InsetWrap::updateBuffer(lyx::ParIterator const&,
lyx::UpdateType) in libinsets.a(InsetWrap.o)
"lyx::InsetCaptionable::setCaptionType(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&)",
referenced from:
lyx::InsetFloat::setCaptionType(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&) in
libinsets.a(InsetFloat.o)
vtable for lyx::InsetListings in libinsets.a(InsetListings.o)
lyx::InsetWrap::setCaptionType(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&) in
libinsets.a(InsetWrap.o)
"lyx::InsetCaptionable::insetAllowed(lyx::InsetCode) const",
referenced from:
lyx::InsetFloat::insetAllowed(lyx::InsetCode) const in
libinsets.a(InsetFloat.o)
lyx::InsetWrap::insetAllowed(lyx::InsetCode) const in
libinsets.a(InsetWrap.o)
"lyx::InsetCaptionable::addToToc(lyx::DocIterator const&, bool)
const", referenced from:
vtable for lyx::InsetFloat in libinsets.a(InsetFloat.o)
vtable for lyx::InsetListings in libinsets.a(InsetListings.o)
vtable for lyx::InsetWrap in libinsets.a(InsetWrap.o)
"lyx::InsetCaptionable::floatName(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&) const",
referenced from:
lyx::InsetFloat::setCaptionType(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&) in
libinsets.a(InsetFloat.o)
lyx::InsetFloat::setNewLabel() in libinsets.a(InsetFloat.o)
lyx::InsetFloat::plaintext(std::__1::basic_ostringstream<wchar_t,
std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >&,
lyx::OutputParams const&, unsigned long) const in
libinsets.a(InsetFloat.o)
lyx::InsetWrap::setCaptionType(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&) in
libinsets.a(InsetWrap.o)
lyx::InsetWrap::plaintext(std::__1::basic_ostringstream<wchar_t,
std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >&,
lyx::OutputParams const&, unsigned long) const in
libinsets.a(InsetWrap.o)
"typeinfo for lyx::InsetCaptionable", referenced from:
typeinfo for lyx::InsetFloat in libinsets.a(InsetFloat.o)
typeinfo for lyx::InsetListings in libinsets.a(InsetListings.o)
typeinfo for lyx::InsetWrap in libinsets.a(InsetWrap.o)
"vtable for lyx::InsetCaptionable", referenced from:
lyx::InsetCaptionable::InsetCaptionable(lyx::Buffer*) in
libinsets.a(InsetFloat.o)
lyx::InsetCaptionable::~InsetCaptionable() in
libinsets.a(InsetFloat.o)
lyx::InsetCaptionable::InsetCaptionable(lyx::InsetCaptionable
const&) in libinsets.a(InsetFloat.o)
lyx::InsetCaptionable::InsetCaptionable(lyx::Buffer*,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&) in libinsets.a(InsetListings.o)
lyx::InsetCaptionable::~InsetCaptionable() in
libinsets.a(InsetListings.o)
lyx::InsetCaptionable::InsetCaptionable(lyx::InsetCaptionable
const&) in libinsets.a(InsetListings.o)
lyx::InsetCaptionable::InsetCaptionable(lyx::Buffer*) in
libinsets.a(InsetWrap.o)
...
NOTE: a missing vtable usually means the first non-inline virtual
member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
---------------
Regards,
Patrick De Visschere