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

llvm lld flang wasi-runtimes 19.1.5 #199909

Merged
merged 8 commits into from
Dec 7, 2024
Merged

llvm lld flang wasi-runtimes 19.1.5 #199909

merged 8 commits into from
Dec 7, 2024

Conversation

ZhongRuoyu
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 HOMEBREW_NO_INSTALL_FROM_API=1 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 HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@ZhongRuoyu ZhongRuoyu added long build Set a long timeout for formula testing CI-no-fail-fast-deps Continue dependent tests despite failing GitHub Actions matrix tests. labels Dec 3, 2024
@carlocab
Copy link
Member

carlocab commented Dec 4, 2024

In 19.1.4, flang invoked the linker as:

"/usr/bin/ld" -demangle \
  -lto_library /opt/homebrew/Cellar/flang/19.1.4/lib/libLTO.dylib \
  -no_deduplicate \
  -dynamic \
  -arch arm64 \
  -platform_version macos 15.0.0 15.1 \
  -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk \
  -mllvm \
  -enable-linkonceodr-outlining \
  -o hello \
  -lc   \
  -lto_library /opt/homebrew/opt/llvm/lib/libLTO.dylib \
  /private/var/folders/by/r3kqb74j2zn0010s9mcbsvv00000gp/T/hello-6bdad7.o \
  -L/opt/homebrew/Cellar/flang/19.1.4/lib \
  -lFortranRuntime \
  -lFortranDecimal \
  -lSystem

In 19.1.5, it is invoking ld as:

"/usr/bin/ld" \
  -demangle \
  -lto_library /opt/homebrew/Cellar/flang/19.1.5/lib/libLTO.dylib \
  -no_deduplicate \
  -dynamic \
  -arch arm64 \
  -platform_version macos 14.0.0 14.0.0 \
  -mllvm \
  -enable-linkonceodr-outlining \
  -o hello \
  -lc   \
  -lto_library /opt/homebrew/opt/llvm/lib/libLTO.dylib \
  /private/tmp/hello-4983f0.o -L/opt/homebrew/Cellar/flang/19.1.5/lib \
  -lFortranRuntime \
  -lFortranDecimal \
  -lSystem

In particular, the -syslibroot flag seems to have been dropped, which explains why it can't find -lc .

ZhongRuoyu and others added 2 commits December 4, 2024 19:33
Also:

Let's create config files that target `aarch64` too. This is used as the
target by Python. See Homebrew/discussions#5778.

Also, use `-isysroot` instead of `--sysroot` so that our choice can be
overridden by setting `SDKROOT`. Fixes #197277.

Co-authored-by: Carlo Cabrera <[email protected]>
@carlocab carlocab added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Dec 4, 2024
@carlocab
Copy link
Member

carlocab commented Dec 4, 2024

Can't really see any relevant upstream changes, so maybe the config file didn't get written properly or something. Let's see if it works fine on a re-run.

@carlocab carlocab mentioned this pull request Dec 4, 2024
6 tasks
@carlocab carlocab changed the title llvm lld flang 19.1.5 llvm lld flang wasi-runtimes 19.1.5 Dec 4, 2024
@ZhongRuoyu
Copy link
Member Author

Strange enough, I couldn't reproduce the CI error locally with the bottles built in the latest CI run. The -syslibroot flag was correctly set.

$ brew test -v flang
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/bin/bundle clean
==> Testing flang
==> /opt/homebrew/Cellar/flang/19.1.5/bin/flang-new -v hello.f90 -o hello
Homebrew flang-new version 19.1.5
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/flang/19.1.5/libexec
Configuration file: /opt/homebrew/Cellar/flang/19.1.5/libexec/flang.cfg
Configuration file: /opt/homebrew/etc/clang/arm64-apple-darwin24.cfg
System configuration file directory: /opt/homebrew/etc/clang
User configuration file directory: /private/tmp/flang-test-20241206-8269-xhugyt/.config/clang
 "/opt/homebrew/Cellar/flang/19.1.5/libexec/flang-new" -fc1 -triple arm64-apple-macosx15.0.0 -emit-obj -mrelocation-model pic -pic-level 2 -target-cpu apple-m1 -target-feature  zcm -target-feature  zcz -target-feature  v8.4a -target-feature  aes -target-feature  altnzcv -target-feature  ccdp -target-feature  complxnum -target-feature  crc -target-feature  dotprod -target-feature  fp-armv8 -target-feature  fp16fml -target-feature  fptoint -target-feature  fullfp16 -target-feature  jsconv -target-feature  lse -target-feature  neon -target-feature  pauth -target-feature  perfmon -target-feature  predres -target-feature  ras -target-feature  rcpc -target-feature  rdm -target-feature  sb -target-feature  sha2 -target-feature  sha3 -target-feature  specrestrict -target-feature  ssbs -resource-dir /opt/homebrew/Cellar/flang/19.1.5/lib/clang/19 -mframe-pointer=non-leaf -o /private/tmp/hello-d7fbc2.o -x f95-cpp-input hello.f90
 "/usr/bin/ld" -demangle -lto_library /opt/homebrew/Cellar/flang/19.1.5/lib/libLTO.dylib -no_deduplicate -dynamic -arch arm64 -platform_version macos 15.0.0 15.1 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -mllvm -enable-linkonceodr-outlining -o hello -lc   -lto_library /opt/homebrew/opt/llvm/lib/libLTO.dylib /private/tmp/hello-d7fbc2.o -L/opt/homebrew/Cellar/flang/19.1.5/lib -lFortranRuntime -lFortranDecimal -lSystem
==> ./hello
==> /opt/homebrew/Cellar/flang/19.1.5/bin/flang-new -v test.f90 -o test
Homebrew flang-new version 19.1.5
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/flang/19.1.5/libexec
Configuration file: /opt/homebrew/Cellar/flang/19.1.5/libexec/flang.cfg
Configuration file: /opt/homebrew/etc/clang/arm64-apple-darwin24.cfg
System configuration file directory: /opt/homebrew/etc/clang
User configuration file directory: /private/tmp/flang-test-20241206-8269-xhugyt/.config/clang
 "/opt/homebrew/Cellar/flang/19.1.5/libexec/flang-new" -fc1 -triple arm64-apple-macosx15.0.0 -emit-obj -mrelocation-model pic -pic-level 2 -target-cpu apple-m1 -target-feature  zcm -target-feature  zcz -target-feature  v8.4a -target-feature  aes -target-feature  altnzcv -target-feature  ccdp -target-feature  complxnum -target-feature  crc -target-feature  dotprod -target-feature  fp-armv8 -target-feature  fp16fml -target-feature  fptoint -target-feature  fullfp16 -target-feature  jsconv -target-feature  lse -target-feature  neon -target-feature  pauth -target-feature  perfmon -target-feature  predres -target-feature  ras -target-feature  rcpc -target-feature  rdm -target-feature  sb -target-feature  sha2 -target-feature  sha3 -target-feature  specrestrict -target-feature  ssbs -resource-dir /opt/homebrew/Cellar/flang/19.1.5/lib/clang/19 -mframe-pointer=non-leaf -o /private/tmp/test-06e3e6.o -x f95-cpp-input test.f90
 "/usr/bin/ld" -demangle -lto_library /opt/homebrew/Cellar/flang/19.1.5/lib/libLTO.dylib -no_deduplicate -dynamic -arch arm64 -platform_version macos 15.0.0 15.1 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -mllvm -enable-linkonceodr-outlining -o test -lc   -lto_library /opt/homebrew/opt/llvm/lib/libLTO.dylib /private/tmp/test-06e3e6.o -L/opt/homebrew/Cellar/flang/19.1.5/lib -lFortranRuntime -lFortranDecimal -lSystem
==> ./test
==> ar x /opt/homebrew/Cellar/flang/19.1.5/lib/libFortranCommon.a
==> file --brief /private/tmp/flang-test-20241206-8269-xhugyt/Fortran-features.cpp.o
==> file --brief /private/tmp/flang-test-20241206-8269-xhugyt/Fortran.cpp.o
==> file --brief /private/tmp/flang-test-20241206-8269-xhugyt/Version.cpp.o
==> file --brief /private/tmp/flang-test-20241206-8269-xhugyt/default-kinds.cpp.o
==> file --brief /private/tmp/flang-test-20241206-8269-xhugyt/idioms.cpp.o

@carlocab
Copy link
Member

carlocab commented Dec 6, 2024

Strange enough, I couldn't reproduce the CI error locally with the bottles built in the latest CI run. The -syslibroot flag was correctly set.

Weird. Seems like it should be a test-bot bug (etc getting blown away maybe?), but I also can't see any relevant changes in test-bot since flang was last built.

@carlocab
Copy link
Member

carlocab commented Dec 6, 2024

Pushed a change that will make the test succeed in CI. It's not really ideal because it could mask issues that users have (e.g. #198106), but not really sure what the problem is so I have no clue how to fix it.

Copy link
Contributor

github-actions bot commented Dec 7, 2024

@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 Dec 7, 2024
@BrewTestBot BrewTestBot enabled auto-merge December 7, 2024 03:52
@BrewTestBot BrewTestBot added this pull request to the merge queue Dec 7, 2024
Merged via the queue into master with commit 32b8314 Dec 7, 2024
15 checks passed
@BrewTestBot BrewTestBot deleted the llvm-19.1.5 branch December 7, 2024 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-no-fail-fast-deps Continue dependent tests despite failing GitHub Actions matrix tests. CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. long build Set a long timeout for formula testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants