From 3714a735acba3a0b3c18259950fc80e9940a3e3d Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 11 Oct 2023 17:35:10 +0100 Subject: [PATCH] Update the fuzz README to provide info about the stdc++ requirements Reviewed-by: Tomas Mraz Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/22368) --- fuzz/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/fuzz/README.md b/fuzz/README.md index 6cc7811ad0..795606fec2 100644 --- a/fuzz/README.md +++ b/fuzz/README.md @@ -32,6 +32,34 @@ to the `libFuzzer` library file while configuring; this is represented as enable-ssl3 enable-ssl3-method enable-nextprotoneg \ --debug +Clang uses the gcc libstdc++ library so this must also be installed. You can +check which version of gcc clang is using like this: + + $ clang --verbose + Ubuntu clang version 14.0.0-1ubuntu1.1 + Target: x86_64-pc-linux-gnu + Thread model: posix + InstalledDir: /usr/bin + Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/12 + Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10 + Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11 + Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12 + Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12 + Candidate multilib: .;@m64 + Selected multilib: .;@m64 + +So, in the above example clang is using gcc version 12. Ensure that the selected +gcc version has the relevant libstdc++ files installed: + + $ ls /usr/lib/gcc/x86_64-linux-gnu/12 | grep stdc++ + libstdc++.a + libstdc++fs.a + libstdc++.so + +On Ubuntu for gcc-12 this requires the libstdc++-12-dev package installed. + + $ sudo apt-get install libstdc++-12-dev + Compile: sudo apt-get install make