Summary: | app-misc/sphinx-2.2.11-r5 fails to compile: sphinx.cpp:27820:15: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Hans de Graaff <graaff> |
Status: | CONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 408963 | ||
Attachments: |
build.log
other.tar.bz2 |
Description
Agostino Sarubbo
2020-06-25 07:56:04 UTC
Created attachment 646220 [details]
build.log
build log and emerge --info
Created attachment 646222 [details]
other.tar.bz2
other logs
Probably relevant error message: """ sphinx.cpp:27820:15: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] "docid="DOCID_FMT, SqlFi... ^ sphinx.cpp:27836:16: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] " docid="DOCID_FMT, SqlF... ^ """ app-misc/sphinx compiles fine with gcc-10, but the build log shows that clang was used. I can reproduce the issue with clang, but fixing "invalid suffix on literal; C++11 requires a space between literal and identifier" leads to further errors that I don't know how to fix: sphinxplugin.cpp:262:4: error: non-constant-expression cannot be narrowed from type 'long' to 'int' in initializer list [-Wc++11-narrowing] { offsetof(PluginQueryTokenFilter_c, m_fnDeinit), "deinit", false }, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It complains about 'offsetof(PluginQueryTokenFilter_c, m_fnDeinit)' being long type while { ... } initializer expects 'int'. One options would be to use explicit type cast. Something like 'static_cast<int>(offsetof(PluginQueryTokenFilter_c, m_fnDeinit))' (member offset should fit in int's 32-bit just fine). Another is to declare offset type to match pointer size type. For example change 'int m_iOffsetOf;' to 'size_t m_iOffsetOf;'. But that could require more changes to stay correct. Type cast should be least invasive. tinderbox_musl has reproduced this issue with version 2.2.11-r5 - Updating summary. |