Linking C++ fails with "inlining failed in call to always_inline 'vsnprintf'"
I am compiling a C shared library that uses std::to_string(…) with -std=c++11 and -flto.
During the linking step it fails with:
/usr/include/c/6.4.0/ext/string_conversions.h: In function
‘__to_xstring.constprop’:
/usr/include/fortify/stdio.h:68:28: error: inlining failed in call to
always_inline ‘vsnprintf’: function body not available
*FORTIFY_FN(vsnprintf) int vsnprintf(char *s, size_tn, const char
*_f,
^
/usr/include/c/6.4.0/ext/string_conversions.h:101:56: note:
called from here
const int _len =convf(s,n,fmt,*_args);
^
lto-wrapper: fatal error: g returned 1
exit status
Any ideas how I can work around this?
(from redmine: issue id 8626, created on 2018-03-08)