oss-fuzz icon indicating copy to clipboard operation
oss-fuzz copied to clipboard

monero: Use latest builder

Open maflcko opened this issue 1 year ago • 13 comments

maflcko avatar May 28 '24 16:05 maflcko

maflcko has previously contributed to projects/monero. The previous PR was #11714

github-actions[bot] avatar May 28 '24 16:05 github-actions[bot]

cc @binaryFate Can you please take a look here? This requires bumping the boost version, I presume.

maflcko avatar May 28 '24 16:05 maflcko

cc @luigi1111 @moneromooo-monero or maybe one of you can take a look at the boost upgrade?

maflcko avatar Jun 17 '24 15:06 maflcko

@maflcko I'll look into it

selsta avatar Jun 18 '24 12:06 selsta

Just updating boost doesn't work unfortunately, I might have to try different versions or ask someone else who is more experienced.

selsta avatar Jun 25 '24 11:06 selsta

Yes, the fix would be to bump boost. Currently boost is downloaded from && curl -s -L -o boost_${BOOST_VERSION}.tar.bz2 https://downloads.getmonero.org/libs/boost_${BOOST_VERSION}.tar.bz2 \. So to fix it, one would have to upload a different boost version there, or change the download source. (Among possibly other changes)

maflcko avatar Jun 25 '24 12:06 maflcko

I did update it to 1.80 and it fails

#8 30.41 /usr/local/bin/../include/c++/v1/__config:13:10: fatal error: '__config_site' file not found
#8 30.41    13 | #include <__config_site>
#8 30.41       |          ^~~~~~~~~~~~~~~
#8 30.41 1 error generated.

https://github.com/selsta/testrepo/actions/runs/9566788394/job/26372907450#step:3:843

I can also try newer or older versions.

selsta avatar Jun 25 '24 12:06 selsta

Looks like boost 1.84 (or 1.81) is enough to avoid the deprecated c++11 code and the need to specify -DBOOST_NO_CXX98_FUNCTION_BASE.

To work around the missing __config_site. You can manually copy it for now as a temporary workaround. Just add this before downloading boost:

RUN cp /usr/local/include/x86_64-unknown-linux-gnu/c++/v1/__config_site /usr/local/include/c++/v1/

Also ./b2 ... stage would have to be replaced by ./b2 ... install.

If it works for you as well, and you agree with the changes, you can go ahead and create a new pull request against the master branch here.

maflcko avatar Jun 28 '24 11:06 maflcko

It did build the docker image correctly, it failed to run it but that appears to be unrelated. Will open a PR with the changes.

selsta avatar Jun 28 '24 13:06 selsta

https://github.com/google/oss-fuzz/pull/12138

selsta avatar Jun 28 '24 19:06 selsta

I don't have a Google account unfortunately to sign the CLA. Can you add the commit to this PR, or should I ask someone else from the monero project to open the PR?

selsta avatar Jun 28 '24 19:06 selsta

I'd say it is preferred if someone following the project is on the project's OSS-Fuzz auto_ccs and has signed the CLA. Otherwise it would be difficult to be notified of fuzz issues in the future, and also hard to submit patches to the project's config or build file.

maflcko avatar Jul 01 '24 06:07 maflcko

rebased and re-opened as https://www.github.com/google/oss-fuzz/pull/12176 as myself for now, to unblock the clang bump

maflcko avatar Jul 09 '24 10:07 maflcko