Bugzilla – Bug 1087135
GCC 8: rust build fails
Last modified: 2018-06-01 07:18:20 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
Please make progress here!
Can you please make a progress. It's one of few packages that are blocking acceptation of GCC8 into Factory. Thanks.
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`.
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.