Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 729512 - app-misc/sphinx 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]
Summary: app-misc/sphinx fails to compile: sphinx.cpp:27820:15: error: invalid suffix ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Hans de Graaff
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2020-06-25 07:56 UTC by Agostino Sarubbo
Modified: 2020-07-21 07:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,30.55 KB, text/plain)
2020-06-25 07:56 UTC, Agostino Sarubbo
Details
other.tar.bz2 (other.tar.bz2,263 bytes, application/x-bzip-compressed-tar)
2020-06-25 07:56 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
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 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 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 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 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.