Skip to content
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

Miscellaneous fixes #734

Merged
merged 9 commits into from
Jul 22, 2023
Merged

Miscellaneous fixes #734

merged 9 commits into from
Jul 22, 2023

Conversation

vyzo
Copy link
Collaborator

@vyzo vyzo commented Jul 21, 2023

Cherry-picked from #728; see individual commits for details.

The most interesting fix is the make bug

Fixes #669

vyzo added 6 commits July 22, 2023 00:11
this is a much saner implementation; the old behaviour is available
in with-dynamic-lock.
- new is renamed to cast
- checked methods cast instead of barfing when the interface is not
  exact; this allows us to use sub interfaces with parent methods sanely.
This was getting on my nerves: i was rebuilding libcrypto and deps 100
times a day. Turns out the submodules were not built!
Also added an envvar to control build verbosity.
- IPPROTO_IP constants were not exported
- getsockopt/setsockpt needlessly accepted extra args, requiring apply.
@vyzo vyzo requested review from fare and ober July 21, 2023 21:15
vyzo added 2 commits July 22, 2023 08:41
the static include also needs to be copied to the target dir.
@vyzo vyzo added this to the Gerbil18 milestone Jul 22, 2023
@@ -592,6 +597,9 @@ TODO:
(match spec
((? string? modf)
(gxc-compile modf #f settings #t))
([gxc: modf [submodules: submodules . _] . opts]
(for-each (cut build <> settings) submodules)
Copy link
Collaborator

@fare fare Jul 22, 2023

Choose a reason for hiding this comment

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

The for-each sounds very wrong and contrary to the principles of make: make a queue of things to be scheduled according to dependency order, rather than execute immediately out of a plan (which can lead to out-of-dependency-order execution, lack of parallelism, and/or sometimes double execution).

If things are not currently done, they need to be queued as dependencies, not done immediately.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, but the code right now is completely broken; submodules never get built.
If you can suggest a better fix, fine, but iam inclined to keep it as is (and i dont fully understand the code the way it has morphed)

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, after conversation with vyzo, it looks like the ssi entry also uses for-each build, and that I had just forgotten the same thing for gxc: after patiently building it in normalize-buildspec, so it doesn't look that wrong after all.

This part of the code is very much out-of-cache for me right now, and obviously under-documented. But the fix now looks right-ish. I will have to make another pass at documenting things whenever I put things back into cache.

@vyzo vyzo merged commit fb881dd into master Jul 22, 2023
@vyzo vyzo deleted the misc-fixes branch July 22, 2023 10:33
This was referenced Jul 26, 2023
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.

Gerbil-git fails to build on OpenBSD
2 participants