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] update to v14.0.3 [halide] update to v14.0.0 [mesa] update to 22.0.2 #23734

Merged
merged 29 commits into from
May 16, 2022

Conversation

yurybura
Copy link
Contributor

@yurybura yurybura commented Mar 23, 2022

Updates LLVM to 14.0.3 release.

Fixes #23727

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 147027390bd5bb13ce14e0bfc153873e424b71b2 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index c85e433..0ed3215 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -4229,8 +4229,8 @@
       "port-version": 2
     },
     "llvm": {
-      "baseline": "13.0.0",
-      "port-version": 3
+      "baseline": "14.0.0",
+      "port-version": 0
     },
     "lmdb": {
       "baseline": "0.9.24",
diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json
index ee0a089..2133e7c 100644
--- a/versions/l-/llvm.json
+++ b/versions/l-/llvm.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "2360a8f97af4a8bc2faabc4397bb08f7c2095a76",
+      "version": "14.0.0",
+      "port-version": 0
+    },
     {
       "git-tree": "15418b7e938058677963d920b616403240eca37f",
       "version": "13.0.0",

@yurybura yurybura marked this pull request as draft March 23, 2022 19:27
@JonLiu1993 JonLiu1993 self-assigned this Mar 24, 2022
@JonLiu1993 JonLiu1993 added the category:port-update The issue is with a library, which is requesting update new revision label Mar 24, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 147027390bd5bb13ce14e0bfc153873e424b71b2 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 9b5c105..6ceebe1 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -4229,8 +4229,8 @@
       "port-version": 2
     },
     "llvm": {
-      "baseline": "13.0.0",
-      "port-version": 3
+      "baseline": "14.0.0",
+      "port-version": 0
     },
     "lmdb": {
       "baseline": "0.9.24",
diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json
index ee0a089..2787f6d 100644
--- a/versions/l-/llvm.json
+++ b/versions/l-/llvm.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "a3d1460116ed9c984661ccbfbafc6130c9a2df04",
+      "version": "14.0.0",
+      "port-version": 0
+    },
     {
       "git-tree": "15418b7e938058677963d920b616403240eca37f",
       "version": "13.0.0",

You have modified or added at least one vcpkg.json where a "license" field is missing.

If you feel able to do so, please consider adding a "license" field to the following files:

  • scripts/test_ports/vcpkg-ci-llvm/vcpkg.json

Valid values for the license field can be found in the documentation

@JonLiu1993
Copy link
Member

@yurybura ,This is error link:
https://dev.azure.com/vcpkg/public/_build/results?buildId=70032&view=artifacts&pathAsName=false&type=publishedArtifacts
You can get the entire error log as the picture indicates:
image

@yurybura
Copy link
Contributor Author

yurybura commented Apr 6, 2022

@JonLiu1993 Thank you! I will prepare fixes soon. Unfortunately Hilide hasn't released with LLVM 14.0.0 support yet. Seems I have to wait for a while.

@ekilmer
Copy link
Contributor

ekilmer commented Apr 9, 2022

I have a branch (https://github.com/ekilmer/vcpkg/tree/llvm-14-improvements) that is rebased onto a more recent commit from vcpkg master and refactors some of the patching to sort of follow (I think) what @Neumann-A suggested. It also makes source code patches for the other components (clang, lldb, mlir, etc.) to use LLVM_TOOLS_INSTALL_DIR more liberally to install their tools at tools/llvm/bin (this may or not be the best solution, but it seems to work). See this commit for all of my changes on top of @yurybura's commits ekilmer@9dd7f7f.

Feel free to cherry-pick the commit and/or whatever you need from it to include in this branch @yurybura.

I only tested with Release build type on Linux so far (in a custom triplet x64-linux-rel, but should also work with the community x64-linux-release). I'm building with x64-linux now but probably won't be able to test until tomorrow.

I tested the usage of a few projects that link to LLVM libraries and call the clang compiler using CMake, so the targets should work, but I haven't tested the other components like linking to Clang libraries or MLIR and others.

Output of llvm-config for a few options:

$ ./tools/llvm/bin/llvm-config --prefix
/tmp/vcpkg/installed/x64-linux-rel

$ ./tools/llvm/bin/llvm-config --bindir
/tmp/vcpkg/installed/x64-linux-rel/tools/llvm/bin

$ ./tools/llvm/bin/llvm-config --libdir
/tmp/vcpkg/installed/x64-linux-rel/lib

$ ./tools/llvm/bin/llvm-config --cxxflags
-I/tmp/vcpkg/installed/x64-linux-rel/include -std=c++17    -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS

$ ./tools/llvm/bin/llvm-config --libfiles
/tmp/vcpkg/installed/x64-linux-rel/lib/libLLVMWindowsManifest.a /tmp/vcpkg/installed/x64-linux-rel/lib/libLLVMXRay.a /tmp/vcpkg/installed/x64-linux-rel/lib/libLLVMLibDriver.a ...

... turns out I missed this one though. It should read [...]/share/llvm

$ ./tools/llvm/bin/llvm-config --cmakedir
/tmp/vcpkg/installed/x64-linux-rel/lib/cmake/llvm

I am also able to use the built sanitizers with the built clang compiler (located at /tmp/vcpkg/installed/x64-linux-rel/tools/llvm/lib/clang/14.0.0/lib/linux/libclang_rt.asan-x86_64.a):

/tmp $ cat leak.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, const char *argv[]) {
    char *s = malloc(100);
    strcpy(s, "Hello world!");
    printf("string is: %s\n", s);
    return 0;
}

/tmp $ ./vcpkg/installed/x64-linux-rel/tools/llvm/bin/clang -fsanitize=address -g -v leak.c
clang version 14.0.0 (git@github.com:ekilmer/vcpkg.git 6a2a0cbbd022226ca57b1ebd57cb6b2c03d773c0)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /tmp/./vcpkg/installed/x64-linux-rel/tools/llvm/bin
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/11
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/11
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/11
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
 "/tmp/vcpkg/installed/x64-linux-rel/tools/llvm/bin/clang-14" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name leak.c -mrelocation-model static -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -v -fcoverage-compilation-dir=/tmp -resource-dir /tmp/vcpkg/installed/x64-linux-rel/tools/llvm/lib/clang/14.0.0 -internal-isystem /tmp/vcpkg/installed/x64-linux-rel/tools/llvm/lib/clang/14.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/11/../../../../x86_64-redhat-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir=/tmp -ferror-limit 19 -fsanitize=address -fsanitize-system-ignorelist=/tmp/vcpkg/installed/x64-linux-rel/tools/llvm/lib/clang/14.0.0/share/asan_ignorelist.txt -fsanitize-address-use-after-scope -fno-assume-sane-operator-new -fgnuc-version=4.2.1 -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/leak-a3cf52.o -x c leak.c
clang -cc1 version 14.0.0 based upon LLVM 14.0.0 default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/11/../../../../x86_64-redhat-linux/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /tmp/vcpkg/installed/x64-linux-rel/tools/llvm/lib/clang/14.0.0/include
 /usr/local/include
 /usr/include
End of search list.
 "/usr/bin/ld" --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/11/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/11 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/tmp/vcpkg/installed/x64-linux-rel/tools/llvm/bin/../lib -L/lib -L/usr/lib --whole-archive /tmp/vcpkg/installed/x64-linux-rel/tools/llvm/lib/clang/14.0.0/lib/linux/libclang_rt.asan_static-x86_64.a --no-whole-archive --whole-archive /tmp/vcpkg/installed/x64-linux-rel/tools/llvm/lib/clang/14.0.0/lib/linux/libclang_rt.asan-x86_64.a --no-whole-archive --dynamic-list=/tmp/vcpkg/installed/x64-linux-rel/tools/llvm/lib/clang/14.0.0/lib/linux/libclang_rt.asan-x86_64.a.syms /tmp/leak-a3cf52.o --no-as-needed -lpthread -lrt -lm -ldl -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/11/crtend.o /usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/crtn.o

/tmp $ ./a.out
string is: Hello world!

=================================================================
==3455735==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 100 byte(s) in 1 object(s) allocated from:
    #0 0x49f2fe in __interceptor_malloc /tmp/vcpkg/buildtrees/llvm/src/org-14.0.0-8914b0de2d.clean/compiler-rt/lib/asan/asan_malloc_linux.cpp:69:3
    #1 0x4da9df in main /tmp/leak.c:6:15
    #2 0x7fc76639955f in __libc_start_call_main (/lib64/libc.so.6+0x2d55f) (BuildId: 5d63c4327ba6cdd1e8b99eb1c0a9f056a98c67e1)

SUMMARY: AddressSanitizer: 100 byte(s) leaked in 1 allocation(s).

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where a "license" field is missing.

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/halide/vcpkg.json

Valid values for the license field can be found in the documentation

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where a "license" field is missing.

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/halide/vcpkg.json

Valid values for the license field can be found in the documentation

@yurybura yurybura marked this pull request as ready for review April 14, 2022 05:01
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where a "license" field is missing.

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/halide/vcpkg.json

Valid values for the license field can be found in the documentation

@JonLiu1993 JonLiu1993 added the requires:all-feature-testing vcpkg install port[all features supported by that port] needs to be demonstrated to function label Apr 20, 2022
@JonLiu1993
Copy link
Member

@yurybura ,Thanks for your contribution, I tested the features with x64-windows triplet on my local machine but failed:

CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:128 (message):
    Command failed: ninja -v
    Working Directory: F:/Feature-test/llvm/vcpkg/buildtrees/llvm/x64-windows-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      F:\Feature-test\llvm\vcpkg\buildtrees\llvm\config-x64-windows-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:346 (vcpkg_execute_required_process)
  ports/llvm/portfile.cmake:242 (vcpkg_cmake_configure)
  scripts/ports.cmake:145 (include)


error: building llvm:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `git pull` and `.\vcpkg update`.

This is error log:
config-x64-windows-out.log

@yurybura
Copy link
Contributor Author

@JonLiu1993 Please add your install command: vcpkg install llvm[???]:x64-windows

@JonLiu1993
Copy link
Member

@BillyONeal, Could you please help take a review?

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/halide/vcpkg.json

Valid values for the license field can be found in the documentation

@yurybura yurybura changed the title [llvm] update to v14.0.0 [halide] update to v14.0.0 [mesa] update to 22.0.2 [llvm] update to v14.0.3 [halide] update to v14.0.0 [mesa] update to 22.0.2 Apr 30, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/halide/vcpkg.json

Valid values for the license field can be found in the documentation

@BillyONeal
Copy link
Member

@BillyONeal I copied the mesa related patches from https://github.com/pal1000/mesa-dist-win/tree/master/patches and then tested the build. I don't know much about the Mesa project, but without fixing this port, I can't update LLVM... I have to make CI happy)

Then I think we need to confirm that upstream of Mesa has had an opportunity to look at those patches before updating LLVM. (We can't ignore our policy of respecting the actual owners of the things we purport to ship just because there's a shared dependency we want to update)

ports/llvm/portfile.cmake Outdated Show resolved Hide resolved
ports/llvm/portfile.cmake Outdated Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

PRs must add only one version and must not modify any published versions

When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.

Error: Local changes detected for llvm but no changes to version or port version.
-- Version: 14.0.3
-- Old SHA: 8e2d3b85335f90ac289554e727c75f73767ecc3e
-- New SHA: f6842918afcfba2ab899ed28b5a09042e766d3c0
-- Did you remember to update the version or port version?
-- Pass `--overwrite-version` to bypass this check.
***No files were updated.***

You have modified or added at least one vcpkg.json where you should check the license field.

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/halide/vcpkg.json

Valid values for the license field can be found in the documentation

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You have modified or added at least one vcpkg.json where you should check the license field.

If you feel able to do so, please consider adding a "license" field to the following files:

  • ports/halide/vcpkg.json

Valid values for the license field can be found in the documentation

@BillyONeal
Copy link
Member

Thanks for burninating a lot of patches, and updating LLVM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-update The issue is with a library, which is requesting update new revision
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[llvm] update to 14
5 participants