lldb-eval icon indicating copy to clipboard operation
lldb-eval copied to clipboard

updating OSS-Fuzz releases

Open DavidKorczynski opened this issue 3 years ago • 1 comments

I was trying to fix the OSS-Fuzz build of lldb-eval recently (https://github.com/google/oss-fuzz/pull/9305) and ran into some failing issues for UBSAN and coverage builds, e.g.:

In file included from external/llvm_project/include/clang/Basic/DiagnosticIDs.h:71:
/usr/local/include/clang/Basic/DiagnosticCommonKinds.inc:11:1: error: redefinition of enumerator 'DIAG'
DIAG(err_cannot_open_file, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "cannot open file '%0': %1", 0, SFINAE_SubstitutionFailure, false, true, true, false, 0)                                                 
^                                                                                                                                           
/usr/local/include/clang/Basic/DiagnosticCommonKinds.inc:6:1: note: previous definition is here                                             
DIAG(err_arcmt_nsinvocation_ownership, CLASS_ERROR, (unsigned)diag::Severity::Error, "NSInvocation's %0 is not safe to be used with an object with ownership other than __unsafe_unretained", 0, SFINAE_SubstitutionFailure, false, true, true, false, 0)                               
^                                                                     
/usr/local/include/clang/Basic/DiagnosticCommonKinds.inc:11:5: error: missing ',' between enumerators                                       
DIAG(err_cannot_open_file, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "cannot open file '%0': %1", 0, SFINAE_SubstitutionFailure, false, true, true, false, 0)                                                                                                                       
    ^
/usr/local/include/clang/Basic/DiagnosticCommonKinds.inc:13:185: error: too many arguments provided to function-like macro invocation
DIAG(err_cxx2b_size_t_suffix, CLASS_ERROR, (unsigned)diag::Severity::Error, "'size_t' suffix for literals is a C++2b feature", 0, SFINAE_SubstitutionFailure, false, true, true, false, 0)

I assume it was because of these lines need updating: https://github.com/google/oss-fuzz/blob/0ac9b0f8ed9e28ba84bf4f3a332c783ed093d154/projects/lldb-eval/build.sh#L24-L43

Do you know if this is because the archives needs updating? The current clang in OSS-Fuzz infrastructure is 15.0.0

DavidKorczynski avatar Dec 28 '22 20:12 DavidKorczynski

Can you show the full build log? If everything is set up correctly,lldb-eval shouldn't use llvm headers from the host system, that's what the llvm-12.0.1-x86_64-linux-release.tar.gz is for. I can try building new versions this week, but it should work with current pre-built archives as well.

werat avatar Jan 02 '23 19:01 werat