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

{gambit,gerbil}-scheme: switch to openssl@3 #133524

Merged
merged 6 commits into from
Jul 4, 2023

Conversation

carlocab
Copy link
Member

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

  • gambit-scheme: switch to openssl@3
  • gerbil-scheme: switch to openssl@3

@carlocab carlocab added openssl-3-migration Related to switching to an OpenSSL 3 dependency long build Set a long timeout for formula testing CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. labels Jun 13, 2023
@github-actions github-actions bot removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jun 13, 2023
@carlocab carlocab added the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jun 14, 2023
@github-actions github-actions bot removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jun 14, 2023
@carlocab carlocab added the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jun 14, 2023
@github-actions github-actions bot removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jun 14, 2023
@carlocab carlocab added ready to merge PR can be merged once CI is green CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. and removed ready to merge PR can be merged once CI is green labels Jun 14, 2023
@p-linnane
Copy link
Member

Ventura has been running for 2 days, which is way longer than the other jobs.

@carlocab carlocab removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jun 20, 2023
@github-actions github-actions bot added the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jun 20, 2023
@carlocab carlocab removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jun 20, 2023
@github-actions github-actions bot added CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. and removed CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. labels Jun 20, 2023
@cho-m cho-m added CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. and removed long build Set a long timeout for formula testing labels Jul 3, 2023
@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Jul 3, 2023
@cho-m cho-m marked this pull request as draft July 3, 2023 22:35
@cho-m
Copy link
Member

cho-m commented Jul 3, 2023

Made draft to test out GCC. NixOS comment referencing Gambit's last benchmarks in https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/gambit/build.nix#L5-L9

# Note that according to a benchmark run by Marc Feeley on May 2018,
# clang is 10x (with default settings) to 15% (with -O2) slower than GCC at compiling
# Gambit output, producing code that is 3x slower. IIRC the benchmarks from Gambit@30,
# the numbers were still heavily in favor of GCC in October 2019.
# Thus we use GCC over clang, even on macOS.

Either way, Ventura Clang (LLVM 15) seems to have some issue.

Copy link
Member Author

@carlocab carlocab left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me. We could probably make gcc :build-only though, and possible continue to build gerbil-scheme with Clang.

depends_on "openssl@3"

on_macos do
depends_on "gcc"
Copy link
Member Author

Choose a reason for hiding this comment

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

No linkage on macOS. Probably just pure C code. In which case this can probably just be :build-only.

Copy link
Member

@cho-m cho-m Jul 4, 2023

Choose a reason for hiding this comment

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

It saves the compiler as default in config file (i.e. gcc-13). The GCC optimizations also add some GCC-specific flags to config file.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, fair enough.

Copy link
Member

Choose a reason for hiding this comment

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

Specifically, file bin/gambcomp-C sets up default values:

# The following settings are determined by the configure script.

C_COMPILER="gcc-13"
C_PREPROC="gcc-13 -E"

FLAGS_OBJ=" -Wno-deprecated-declarations -I\"/usr/local/opt/openssl@3/include\"   -Wno-unused -Wno-write-strings -Wdisabled-optimization -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fmodulo-sched -freschedule-modulo-scheduled-loops -fomit-frame-pointer -fPIC -fno-common "
FLAGS_DYN="  -Wno-deprecated-declarations -I\"/usr/local/opt/openssl@3/include\"  -bundle  -Wno-unused -Wno-write-strings -Wdisabled-optimization -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fmodulo-sched -freschedule-modulo-scheduled-loops -fomit-frame-pointer -fPIC -fno-common   -flat_namespace -undefined suppress"
FLAGS_LIB="  -Wno-deprecated-declarations -I\"/usr/local/opt/openssl@3/include\"  -dynamiclib -install_name \$(libdir)/\$(LIBRARY)\$(LIB_VERSION_SUFFIX)   -flat_namespace -undefined suppress"
FLAGS_EXE="  -Wno-deprecated-declarations -I\"/usr/local/opt/openssl@3/include\"   -Wno-unused -Wno-write-strings -Wdisabled-optimization -fwrapv -fno-strict-aliasing -fno-trapping-math -fno-math-errno -fschedule-insns2 -fmodulo-sched -freschedule-modulo-scheduled-loops -fomit-frame-pointer -fPIC -fno-common  "

FLAGS_OPT=" -O1"
FLAGS_OPT_RTS=" -O3"

In separate PR, I may add a note and maybe fix up OpenSSL path as above shows /usr/local when I compiled on ARM. Only may cause an issue if someone also has Rosetta.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's see if we can fix that already now...

Comment on lines +38 to +40
fails_with :clang do
cause "gambit-scheme is built with GCC"
end
Copy link
Member Author

Choose a reason for hiding this comment

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

gambit-scheme appears to only use C, so continuing to compile this with clang will probably work (unless there are also performance problems here).

Copy link
Member

Choose a reason for hiding this comment

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

One thing was the previous hang was on gerbil-scheme. Also, GCC optimization flags makes Clang harder to use (but it seems recommended by upstream and used by other repositories).


uses_from_macos "libxml2"
uses_from_macos "sqlite"

on_macos do
depends_on "gcc"
Copy link
Member Author

Choose a reason for hiding this comment

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

No linkage, can also probably be :build.

@carlocab carlocab removed the autosquash Automatically squash pull request commits according to Homebrew style. label Jul 4, 2023
@carlocab carlocab marked this pull request as ready for review July 4, 2023 07:06
@carlocab carlocab added the ready to merge PR can be merged once CI is green label Jul 4, 2023
@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Jul 4, 2023
@carlocab carlocab removed the autosquash Automatically squash pull request commits according to Homebrew style. label Jul 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Jul 4, 2023
@BrewTestBot BrewTestBot added this pull request to the merge queue Jul 4, 2023
Merged via the queue into Homebrew:master with commit 00f1733 Jul 4, 2023
@carlocab carlocab deleted the g-scheme-openssl-3 branch July 4, 2023 14:45
@chenrui333 chenrui333 mentioned this pull request Jul 4, 2023
6 tasks
@github-actions github-actions bot added the outdated PR was locked due to age label Aug 4, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. openssl-3-migration Related to switching to an OpenSSL 3 dependency outdated PR was locked due to age ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants