Description of problem: llvm5.0 package fails to build with gcc 8. Version-Release number of selected component (if applicable): gcc-8.0.1-0.6 How reproducible: Always Steps to Reproduce: 1. fedpkg clone llvm5.0 2. cd llvm5.0 && fedpkg scratch-build Actual results: Build fails with error: {standard input}: Assembler messages: {standard input}: Error: .size expression for lli.cpp does not evaluate to a constant Expected results: Package builds successfully.
This error doesn't seem to be the real culprit. Does the log file say something about error: cannot convert ... to ... in return maybe?
I don't see that error in the scratch build on koji, but when I do a local build, I get: In file included from ../tools/lli/lli.cpp:30: ../include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h: In member function 'llvm::Expected<std::vector<char> > llvm::orc::remote::OrcRemoteTargetClient<ChannelT>::readMem(char*, llvm::JITTargetAddress, uint64_t)': ../include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h:722:36: 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);
Ok, that's likely https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84012 which wouldn't be a GCC bug. Would be nice to have a preprocessed source file to verify.
Created attachment 1389687 [details] Patch which fixes the compilation error. This looks indeed quite similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84012. Does not reproduce with LLVM trunk (r323878) or with the LLVM 6.0 release candidate when compiling with GCC 8.0.1. Looks like this was fixed upstream as part of a refactoring in September 2017 (r312500). Attaching a trivial patch which fixes the type mismatch. Verified that it fixes the Mock build of the llvm5.0 package.
Fixed in llvm5.0-5.0.1-3.fc28.
Note, llvm 4.0 actually had the same issue. I'll try using the same patch.