Skip to content

fix FreeBSD build#12926

Merged
Alizter merged 1 commit intoocaml:mainfrom
Alizter:push-vpmxyzvyrsuw
Dec 14, 2025
Merged

fix FreeBSD build#12926
Alizter merged 1 commit intoocaml:mainfrom
Alizter:push-vpmxyzvyrsuw

Conversation

@Alizter
Copy link
Copy Markdown
Collaborator

@Alizter Alizter commented Dec 11, 2025

The lmdb stubs needed some tweaking. This should allow the builds on FreeBSD in the opam ci to progress.

@shonfeder this shouldn't block the release but probably nice to have in a patch release for 3.21.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
/* Clearing readers is done in this function because
* me_txkey with its destructor must be disabled first.
*
* We skip the reader mutex, so we touch only
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was removed by @ElectreAAS at some point, but since it is vendored code it has come back FYI.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did such a change go through code review?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my mistake, I missed it. My solution for #12457 should prevent this from happening in the future.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR in question was #12805 and the change was at the very bottom of the changes list and I missed it. It's the only file I didn't mark as viewed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these files are meant to always and only be generated by the scripts like https://github.com/ocaml/dune/pull/12926/changes#diff-25acefe0cd708e88cfffb9dcdec1c96e363ad79ed70545c93892746f53684267 (or ocaml alternates) we could add a CI check that runs the scripts and fails if the files change.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my solution for #12457 will add a way of verifying this in CI, when I get round to it.

@shonfeder
Copy link
Copy Markdown
Member

shonfeder commented Dec 12, 2025

Is this another attempt at #12896, and a followup to #12901 or unrelated?

If unrelated, what is the impact of not having this fix in the release?

@Alizter
Copy link
Copy Markdown
Collaborator Author

Alizter commented Dec 12, 2025

Is this another attempt at #12896, and a followup to #12901 or unrelated?

If unrelated, what is the impact of not having this fix in the release?

This prevents the build of Dune on FreeBSD which is something that was possible before. This is completely unrelated to #12896.

It is not critical that we block the release on this, what I am suggesting above is that if we do a patch release, i.e. 3.21.1 then it might be worth including otherwise waiting for 3.22 is also fine.

This was referenced Dec 12, 2025
@Alizter
Copy link
Copy Markdown
Collaborator Author

Alizter commented Dec 12, 2025

I've created an issue for it in #12927. It is technically a regression introduced in this release.

@shonfeder
Copy link
Copy Markdown
Member

shonfeder commented Dec 12, 2025

Got it. Sorry for the confusion, thank you for giving enough context so that the developments here are a bit more understandable :)

Comment on lines +20 to +21
#elif defined(__FreeBSD__)
#include <stdlib.h>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be a new addition, and not just reverting the error from. https://github.com/ocaml/dune/pull/12805/changes#diff-54c0e4bcfcbcab9d492b3d752917da5bdd85283dc62b431124dfaaafa8b789b2 ? Is that correct? What motivates its addition here in the regression fix ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I think i figured out, it must be additions from rerunning the vendor script?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. The vendor script is the only thing that should be changed.

/* Clearing readers is done in this function because
* me_txkey with its destructor must be disabled first.
*
* We skip the reader mutex, so we touch only
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these files are meant to always and only be generated by the scripts like https://github.com/ocaml/dune/pull/12926/changes#diff-25acefe0cd708e88cfffb9dcdec1c96e363ad79ed70545c93892746f53684267 (or ocaml alternates) we could add a CI check that runs the scripts and fails if the files change.

@Alizter Alizter merged commit 018934a into ocaml:main Dec 14, 2025
46 of 49 checks passed
@Alizter Alizter deleted the push-vpmxyzvyrsuw branch December 14, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants