Bug 1087135 - GCC 8: rust build fails
GCC 8: rust build fails
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Luke Jones
E-mail List
Depends on:
Blocks: 1084649
  Show dependency treegraph
Reported: 2018-03-27 16:03 UTC by Martin Liška
Modified: 2018-06-01 07:18 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2018-03-27 16:03:09 UTC
Build the package with GCC 8, there's error:


Please build the project as follows to reproduce the issue:
osc build --alternative-project=openSUSE:Factory:Staging:Gcc7
Comment 1 Richard Biener 2018-05-04 10:40:51 UTC
Now openSUSE:Factory:Staging:C

Please make progress here!
Comment 2 Martin Liška 2018-05-14 06:39:56 UTC
Can you please make a progress. It's one of few packages that are blocking acceptation of GCC8 into Factory. Thanks.
Comment 3 Michal Srb 2018-05-18 14:40:25 UTC
The problem happens when building the bundled llvm:

/home/abuild/rpmbuild/BUILD/rustc-1.24.1-src/src/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h:696:26: error: could not convert '((llvm::orc::remote::OrcRemoteTargetClient<ChannelT>*)this)->callB<llvm::orc::remote::OrcRemoteTargetRPCAPI::ReadMem>(Src, Size)' from 'Expected<vector<unsigned char,allocator<unsigned char>>>' to 'Expected<vector<char,allocator<char>>>'
    return callB<ReadMem>(Src, Size);

I am not sure how come the mismatch between vector<char> and vector<unsigned char> does not cause trouble with gcc 7.

In llvm upstream they changed the char to uint8_t in return value of `OrcRemoteTargetClient::readMem` in commit 30e9aa60fea44210ac8d843d2f6a4b3bd2578bf4. However, this commit is quite a big refactoring, so it may not be good idea to take it whole. It may be worth trying to change just the `OrcRemoteTargetClient::readMem`.
Comment 4 Mateusz Mikuła 2018-05-18 20:55:58 UTC
Maybe it would be possible to update rust?
New versions (in the devel OBS repo) have replaced LLVM 4 with LLVM 6 which should compile just fine with new GCC.
Comment 5 Martin Liška 2018-06-01 07:18:20 UTC