Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 729512

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 packagesAssignee: 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 gentoo-dev 2020-06-25 07:56:04 UTC
@@This is an auto-filed bug@@
Feel free to change the summary at your convenience.

Issue: app-misc/sphinx fails to compile.
Discovered on: amd64

NOTE:
If yout think this issue is related to clang/llvm toolchain, please block bug 408963. If you need further logs, feel free to ask.
Comment 1 Agostino Sarubbo gentoo-dev 2020-06-25 07:56:10 UTC
Created attachment 646220 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2020-06-25 07:56:13 UTC
Created attachment 646222 [details]
other.tar.bz2

other logs
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-07-19 09:42:35 UTC
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...
                                                         ^
"""
Comment 4 Hans de Graaff gentoo-dev Security 2020-07-21 05:51:01 UTC
app-misc/sphinx compiles fine with gcc-10, but the build log shows that clang was used.
Comment 5 Hans de Graaff gentoo-dev Security 2020-07-21 06:07:14 UTC
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 },
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2020-07-21 07:25:17 UTC
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.
Comment 7 Agostino Sarubbo gentoo-dev 2023-03-09 08:21:22 UTC
tinderbox_musl has reproduced this issue with version 2.2.11-r5 - Updating summary.