-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround for OSS-Fuzz std::format detection #3120
Conversation
Why not test for std::format directly? |
From the
It looks like it might not always work w/ non-templated
Switching to This way the check/workaround is the same in CMake and source, and IMHO easily identifiable and removable in the future when OSS-Fuzz image is updated. In any case, let's first confirm this approach works w/ |
on meson works. It's actually shorter... |
Wow! Is this the answer to the OSS-Fuzz build failure? |
Yeah even
succeeds. edit: oh but it fails to compile as the code ends up using fmt. |
I'm testing it now. |
@kmilos what do you think of this alternate solution? |
It works! Awesome work @kmilos! |
Sure, the other proposal looks good. Just wasn't sure it'd work going by CMake docs... |
@neheb's: is your solution a permanent fix? I.e. we won't need to remember to revert it at some stage in the future when OSS-Fuzz gets fixed? If so, that sounds even better. |
oh this is hilarious. So it works under meson but not cmake:
That has to be a joke. |
I've squashed the commits on my testing branch so that it's almost ready to submit: kevinbackhouse/oss-fuzz#12 |
OK. Finally fixed CMake: https://github.com/neheb/exiv2/commit/d8867845918cc2e7e75e9ee9bbfd57994db73c00.patch My solution is more generic. I can't say I like matching against compilers. |
For future reference this is the link to the discussions that we had about the OSS-Fuzz build failure (which started after #2769 was merged): #3108 I also asked for help on the OSS-Fuzz repo but nobody has replied so far. |
I'll close this PR then in favour of the other, more generic solution. |
I'm testing @neheb's version now |
Looks like my version was missing
Added and force pushed. |
For reference, I'll note that you cannot mix and match libc or libc++. OSS-Fuzz builds with -stdlib=libc++ (LLVM) when the OS uses libstdc++ (GNU). That's the whole reason for the errors with fmt. This also happens with system INIReader, which doesn't seem to be used. |
... when trying to link static libs. |
No description provided.