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

Fix codespaces build by bumping clang llvm #105385

Merged

Conversation

ilonatommy
Copy link
Member

Command e.g. ./build.sh mono+libs -c release -os browser

Without this change:

  In file included from /workspaces/runtime/artifacts/obj/mono/browser.wasm.Release/llvm//x64/include/c++/v1/stdint.h:106:
  /workspaces/runtime/artifacts/obj/mono/browser.wasm.Release/llvm//x64/include/c++/v1/__config:48:8: warning: "Libc++ only supports Clang 16 and later" [-W#warnings]
  #      warning "Libc++ only supports Clang 16 and later"
         ^
....
  /workspaces/runtime/artifacts/obj/mono/browser.wasm.Release/llvm//x64/include/c++/v1/new:227:14: error: 'std' is not a class, namespace, or enumeration
  operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
               ^
  /workspaces/runtime/artifacts/obj/mono/browser.wasm.Release/llvm//x64/include/c++/v1/__fwd/functional.h:18:1: note: 'std' declared here
  _LIBCPP_BEGIN_NAMESPACE_STD
  ^
  /workspaces/runtime/artifacts/obj/mono/browser.wasm.Release/llvm//x64/include/c++/v1/__config:853:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                                        namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std {                                  \
                                                                                  ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  1 warning and 20 errors generated.
  [333/385] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/interp/transform-opt.c.o
  [334/385] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/interp/interp.c.o
  [335/385] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/interp/transform.c.o
  [336/385] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/mini-llvm.c.o
  [337/385] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/method-to-ir.c.o
  ninja: build stopped: subcommand failed.
/workspaces/runtime/src/mono/mono.proj(1049,5): error MSB3073: The command " cmake --build . --target install --config Release" exited with code 1.

Build FAILED.

With this change:
build succeeds.

Both are tested with applying the fix from #105110.

Ubuntu 22.04 does not have system clang/llvm newer than 14.0, so we have to manually add repo and update packages from it. I took v=18 because that's what we have on CI.

@ilonatommy ilonatommy added arch-wasm WebAssembly architecture os-linux Linux OS (any supported distro) labels Jul 24, 2024
@ilonatommy ilonatommy requested review from kg and akoeplinger July 24, 2024 08:21
@ilonatommy ilonatommy self-assigned this Jul 24, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 24, 2024
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

@ilonatommy ilonatommy added area-Build-mono and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jul 24, 2024
@ilonatommy ilonatommy added this to the 9.0.0 milestone Jul 24, 2024
@kg
Copy link
Member

kg commented Jul 24, 2024

We should think about updating the documentation on how to build dotnet/runtime on linux at some point too. The current requirements just say to install clang, but it will be more complex now.

https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/linux-requirements.md

I don't think that needs to happen in this PR necessarily though.

@ilonatommy ilonatommy merged commit d91d9a1 into dotnet:main Jul 24, 2024
13 checks passed
@akoeplinger
Copy link
Member

Note that the clang-16 requirement only applies to builds where we use our llvm, i.e. wasm and mobile. On Desktop platforms an earlier clang should be fine still.

@ilonatommy
Copy link
Member Author

ilonatommy commented Jul 24, 2024

Note that the clang-16 requirement only applies to builds where we use our llvm, i.e. wasm and mobile. On Desktop platforms an earlier clang should be fine still.

You mean that the doc is misleading now? Running codespaces with newer clang than 14 for desktop won't do any harm I think. We don't have a better, wasm-only document. Do you think we should update

clang 16 or newer

to

clang (for WASM 16 or newer)

?

@akoeplinger
Copy link
Member

Yeah I was mostly concerned about the docs

@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono os-linux Linux OS (any supported distro)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants