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 14.0.5 #97618

Closed
wants to merge 18 commits into from
Closed

llvm 14.0.5 #97618

wants to merge 18 commits into from

Conversation

carlocab
Copy link
Member

Created with brew bump-formula-pr.

@BrewTestBot BrewTestBot added automerge-skip `brew pr-automerge` will skip this pull request bump-formula-pr PR was created using `brew bump-formula-pr` labels Mar 23, 2022
@carlocab carlocab added long build Set a long timeout for formula testing CI-linux-self-hosted Build on Linux self-hosted runner labels Mar 23, 2022
@SMillerDev SMillerDev added the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Mar 23, 2022
@carlocab carlocab added the CI-issue Failure due to temporary CI issue label Mar 23, 2022
@cho-m
Copy link
Member

cho-m commented Mar 24, 2022

Might be able to rerun now, though Monterey CI are either slow or not running.

Will need an llvm@13 later on for #97679

@carlocab
Copy link
Member Author

We'll probably need an llvm@13 for some other formulae too.

@cho-m cho-m mentioned this pull request Mar 24, 2022
6 tasks
@Bo98 Bo98 removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Mar 24, 2022
@carlocab
Copy link
Member Author

  Could not find a relative path to sys.executable under sys.prefix
  tried: /home/linuxbrew/.linuxbrew/opt/python@3.10/bin/python3.10
  realpath(sys.prefix): /home/linuxbrew/.linuxbrew/Cellar/python@3.10/3.10.2
  sys.prefix: /home/linuxbrew/.linuxbrew/opt/python@3.10
  -- Skipping FreeBSDKernel plugin due to missing libfbsdvmcore
  CMake Error at /tmp/llvm-20220324-8473-shgjgq/llvm-project-14.0.0.src/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt:7 (message):
    LLDB_PYTHON_EXE_RELATIVE_PATH is not set.

LLDB is always such a pain on Linux. I'm traveling for work at the moment. Will have a look later today.

@carlocab
Copy link
Member Author

Funnily enough, the code change that I think is causing this error seems to have been motivated by a Homebrew-installed Python: llvm/llvm-project@f07ddbc

@Bo98
Copy link
Member

Bo98 commented Mar 24, 2022

Our Python 3.7 doesn't have the sys.prefix fixes backported so that's why there's a bit of a difference in behaviour - so we probably caused that inconsistency by not backporting (though compatibility reasons is also the exaxct reason I avoid backporting much for Python).

An upstream general fix would probably be something like this (albeit not one necessary to apply ourselves since the var option is easier):

diff --git a/lldb/bindings/python/get-python-config.py b/lldb/bindings/python/get-python-config.py
index 32d82a54c1..cc3d9aaceb 100755
--- a/lldb/bindings/python/get-python-config.py
+++ b/lldb/bindings/python/get-python-config.py
@@ -42,24 +42,29 @@ def main():
             else:
                 raise
     elif args.variable_name == "LLDB_PYTHON_EXE_RELATIVE_PATH":
-        tried = list()
+        tried_exe = set()
+        tried_prefix = set()
         exe = sys.executable
-        prefix = os.path.realpath(sys.prefix)
+        prefix = sys.prefix
         while True:
             try:
                 print(relpath_nodots(exe, prefix))
                 break
             except ValueError:
-                tried.append(exe)
+                tried_exe.add(exe)
+                tried_prefix.add(prefix)
                 if os.path.islink(exe):
                     exe = os.path.join(os.path.realpath(os.path.dirname(exe)), os.readlink(exe))
                     continue
+                elif os.path.islink(prefix):
+                    prefix = os.path.realpath(prefix)
+                    continue
                 else:
                     print("Could not find a relative path to sys.executable under sys.prefix", file=sys.stderr)
-                    for e in tried:
-                        print("tried:", e, file=sys.stderr)
-                    print("realpath(sys.prefix):", prefix, file=sys.stderr)
-                    print("sys.prefix:", sys.prefix, file=sys.stderr)
+                    for e in tried_exe:
+                        print("tried exe:", e, file=sys.stderr)
+                    for e in tried_prefix:
+                        print("tried prefix:", e, file=sys.stderr)
                     sys.exit(1)
     elif args.variable_name == "LLDB_PYTHON_EXT_SUFFIX":
         print(sysconfig.get_config_var('EXT_SUFFIX'))

@cho-m cho-m removed the CI-issue Failure due to temporary CI issue label Mar 24, 2022
@carlocab carlocab added CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. and removed CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. labels Mar 25, 2022
@carlocab carlocab added the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Mar 25, 2022
@carlocab
Copy link
Member Author

Linux build failed with

/tmp/llvm-20220325-8485-yxpgd7/llvm-project-14.0.0.src/llvm/build/./bin/clang --target=x86_64-unknown-linux-gnu -DVISIBILITY_HIDDEN  -march=core2 -fpermissive -Wno-free-nonheap-object -O3 -DNDEBUG  -m32 -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -MD -MT CMakeFiles/clang_rt.builtins-i386.dir/absvdi2.c.o -MF CMakeFiles/clang_rt.builtins-i386.dir/absvdi2.c.o.d -o CMakeFiles/clang_rt.builtins-i386.dir/absvdi2.c.o -c /tmp/llvm-20220325-8485-yxpgd7/llvm-project-14.0.0.src/compiler-rt/lib/builtins/absvdi2.c
In file included from /tmp/llvm-20220325-8485-yxpgd7/llvm-project-14.0.0.src/compiler-rt/lib/builtins/absvdi2.c:13:
In file included from /tmp/llvm-20220325-8485-yxpgd7/llvm-project-14.0.0.src/compiler-rt/lib/builtins/int_lib.h:93:
In file included from /tmp/llvm-20220325-8485-yxpgd7/llvm-project-14.0.0.src/llvm/build/lib/clang/14.0.0/include/limits.h:21:
In file included from /usr/include/limits.h:25:
/usr/include/features.h:367:12: fatal error: 'sys/cdefs.h' file not found
#  include <sys/cdefs.h>
           ^~~~~~~~~~~~~
1 error generated.
CMakeFiles/clang_rt.builtins-i386.dir/build.make:75: recipe for target 'CMakeFiles/clang_rt.builtins-i386.dir/absvdi2.c.o' failed
make[5]: *** [CMakeFiles/clang_rt.builtins-i386.dir/absvdi2.c.o] Error 1
make[5]: Leaving directory '/tmp/llvm-20220325-8485-yxpgd7/llvm-project-14.0.0.src/llvm/build/runtimes/builtins-bins'
CMakeFiles/Makefile2:281: recipe for target 'CMakeFiles/clang_rt.builtins-i386.dir/all' failed
make[4]: *** [CMakeFiles/clang_rt.builtins-i386.dir/all] Error 2
make[4]: Leaving directory '/tmp/llvm-20220325-8485-yxpgd7/llvm-project-14.0.0.src/llvm/build/runtimes/builtins-bins'
Makefile:135: recipe for target 'all' failed
make[3]: *** [all] Error 2

Not sure why it can't find that header. Also, why is it trying to build i386 builtins again?

@carlocab
Copy link
Member Author

ARM failed with:

warning: /private/tmp/llvm-20220325-86283-dlr297/llvm-project-14.0.0.src/llvm/stage2/profiles/default_6869736556162500074_0.profraw: truncated profile data
error: no profile can be merged

Odd.

Formula/llvm.rb Outdated Show resolved Hide resolved
@cho-m cho-m removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Mar 26, 2022
@carlocab
Copy link
Member Author

Can't reproduce the ARM Monterey build failure locally, with macOS: 12.2.1-arm64 and CLT: 13.2.0.0.1.1638488800 (from brew config, no Xcode installed).

I'm going to guess that the failure is either transient or a regression in Xcode 13.3.

@carlocab
Copy link
Member Author

carlocab commented Mar 28, 2022

On all macOS except for 12-arm64:

brew test --retry --verbose castxml
brew test --retry --verbose ccls
brew test --retry --verbose clazy
brew test --retry --verbose crystal
brew test --retry --verbose enzyme
brew test --retry --verbose halide
brew test --retry --verbose include-what-you-use
brew test --retry --verbose oclgrind
brew test --retry --verbose spirv-llvm-translator

Only on Intel macOS:

brew test --retry --verbose julia

julia is very unlikely to build with LLVM 14. I will probably switch this back to LLVM 12. Allowing it to build its own LLVM is also an option (also what upstream prefers), but there seem to be some issues with that: #96194

I'll need to investigate the rest for LLVM 14 support.

@kmassada
Copy link

Can't reproduce the ARM Monterey build failure locally, with macOS: 12.2.1-arm64 and CLT: 13.2.0.0.1.1638488800 (from brew config, no Xcode installed).

I'm going to guess that the failure is either transient or a regression in Xcode 13.3.

macOS: 12.3-arm64
CLT: 13.3.0.0.1.1645755326
Xcode: N/A
HEAD: 5f5af43

➜  ~ brew versions llvm
Error: Unknown command: versions
➜  ~ brew install --HEAD llvm
llvm  is already installed but outdated (so it will be upgraded).
==> Cloning https://github.com/llvm/llvm-project.git
Updating /Users/makz/Library/Caches/Homebrew/llvm--git
From https://github.com/llvm/llvm-project
   e334f044cdb5..3bd15c03c6d8  main       -> origin/main
==> Checking out branch main
Already on 'main'
Your branch is behind 'origin/main' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
HEAD is now at 3bd15c03c6d8 [AMDGPU] Fix adding modifiers when creating v_cmpx instructions.
==> cmake -G Unix Makefiles .. -DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;lld;lldb;mlir;polly -DLLVM_ENABLE_RUNTIMES=compiler-rt;libcxx;libcxxabi;libunwind;openmp -DLLVM_POLLY_LINK_INTO_TOOLS=O
==> cmake --build .
Last 15 lines from /Users/makz/Library/Logs/Homebrew/llvm/02.cmake:
[100%] Linking CXX static library /tmp/llvm-20220328-7561-7mvjsk/llvm/build/lib/libc++experimental.a
cd /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes/runtimes-bins/libcxx/src && /opt/homebrew/Cellar/cmake/3.22.3/bin/cmake -P CMakeFiles/cxx_experimental.dir/cmake_clean_target.cmake
cd /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes/runtimes-bins/libcxx/src && /opt/homebrew/Cellar/cmake/3.22.3/bin/cmake -E cmake_link_script CMakeFiles/cxx_experimental.dir/link.txt --verbose=1
"/tmp/llvm-20220328-7561-7mvjsk/llvm/build/bin/llvm-libtool-darwin" -static  -o /tmp/llvm-20220328-7561-7mvjsk/llvm/build/lib/libc++experimental.a CMakeFiles/cxx_experimental.dir/experimental/memory_resource.cpp.o
[100%] Built target cxx_experimental
/opt/homebrew/Cellar/cmake/3.22.3/bin/cmake -E cmake_progress_start /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes/runtimes-bins/CMakeFiles 0
[ 94%] No install step for 'runtimes'
cd /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes/runtimes-bins && /opt/homebrew/Cellar/cmake/3.22.3/bin/cmake -E echo_append
cd /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes/runtimes-bins && /opt/homebrew/Cellar/cmake/3.22.3/bin/cmake -E touch /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes/runtimes-stamps//runtimes-install
[ 94%] Completed 'runtimes'
cd /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes && /opt/homebrew/Cellar/cmake/3.22.3/bin/cmake -E make_directory /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes/CMakeFiles
cd /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes && /opt/homebrew/Cellar/cmake/3.22.3/bin/cmake -E touch /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes/CMakeFiles/runtimes-complete
cd /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes && /opt/homebrew/Cellar/cmake/3.22.3/bin/cmake -E touch /tmp/llvm-20220328-7561-7mvjsk/llvm/build/runtimes/runtimes-stamps//runtimes-done
[ 94%] Built target runtimes
make: *** [all] Error 2

READ THIS: https://docs.brew.sh/Troubleshooting

These open issues may also help:
llvm 14.0.0 https://github.com/Homebrew/homebrew-core/pull/97618
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.

@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a help wanted or in progress label.

@github-actions github-actions bot added the stale No recent activity label Mar 31, 2022
@danielnachun
Copy link
Member

I rebased this now that Qt is updated to 6.3.1. I think we still need some way to make sure there is no garbage in /tmp that breaks the build on macOS, or this could fail again.

@cho-m cho-m added the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jun 23, 2022
@danielnachun danielnachun mentioned this pull request Jun 23, 2022
6 tasks
Copy link
Member

@cho-m cho-m left a comment

Choose a reason for hiding this comment

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

I think this will be ready to merge once CI finishes (maybe ~1 hour to go). I am guessing the CI audit failures are caused by long runtime leading to GitHub API auth issues, but I don't think this blocks us from merging.

Last chance for anyone to add any review comments before we trigger a merge. Unless critical, most requested changes may be better to carry over to follow up PR(s).

@danielnachun
Copy link
Member

@cho-m let's publish the bottles as soon as CI finishes. There has been ample opportunity for review feedback and all the bottles have built successfully. We have multiple things we should follow up on but they should all be handled in separate PRs. The main reason this is so slow is because of the qt revision bump, which doubles the run time, so any followups to this won't take nearly as long to run.

@BrewTestBot
Copy link
Member

:shipit: @danielnachun has triggered a merge.

@cho-m cho-m removed the CI-long-timeout [DEPRECATED] Use longer GitHub Actions CI timeout. label Jun 24, 2022
@nektro nektro mentioned this pull request Jun 26, 2022
6 tasks
@github-actions github-actions bot added the outdated PR was locked due to age label Jul 25, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2022
@carlocab carlocab deleted the bump-llvm-14.0.0 branch September 17, 2022 15:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge-skip `brew pr-automerge` will skip this pull request bump-formula-pr PR was created using `brew bump-formula-pr` CI-linux-self-hosted Build on Linux self-hosted runner CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. in progress Stale bot should stay away livecheck Issues or PRs related to livecheck long build Set a long timeout for formula testing outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.