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

build(mac): brew install llvm -> lld #18804

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Oct 8, 2024

Signed-off-by: xxchan [email protected]I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

brew info llvm

`lld` is now provided in a separate formula:
  brew install lld

wanted to use system linker, but #15407

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

xxchan added 2 commits October 8, 2024 11:32
Signed-off-by: xxchan <[email protected]>
@xxchan xxchan requested a review from BugenZhao October 8, 2024 08:44
@xxchan xxchan requested a review from stdrc October 8, 2024 10:47
Copy link
Member

@stdrc stdrc left a comment

Choose a reason for hiding this comment

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

LGTM

@xxchan xxchan added this pull request to the merge queue Oct 8, 2024
Merged via the queue into main with commit 18604b2 Oct 8, 2024
32 of 33 checks passed
@xxchan xxchan deleted the xxchan/slippery-constrictor branch October 8, 2024 20:54
@StrikeW
Copy link
Contributor

StrikeW commented Oct 9, 2024

Hi, this PR cause I fail to build risingwave locally. Why need to change the rustflags? @xxchan

./risedev d                                                                                                                                                                                                                                                          siyuan/pg-schema-event ✭ ✱
[cargo-make] INFO - cargo make 0.37.11
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: configure-if-not-configured
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Skipping Task: configure-if-not-configured
[cargo-make] INFO - Build Done in 0.22 seconds.
[cargo-make] INFO - cargo make 0.37.11
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: d
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Skipping Task: create-user-profiles-file
[cargo-make] INFO - Running Task: prepare-dir
[cargo-make] INFO - Execute Command: "/usr/bin/env" "bash" "/var/folders/xc/610kk6l57p7_j3_qzyb0kx940000gp/T/fsio_BZ0XKmbycn.sh"
Using /Users/siyuan/workspace/acting/rust/risingwave-main/.risingwave as base folder
[cargo-make] INFO - Skipping Task: check-risedev-configured
[cargo-make] INFO - Running Task: download-maven
[cargo-make] INFO - Execute Command: "/usr/bin/env" "bash" "/var/folders/xc/610kk6l57p7_j3_qzyb0kx940000gp/T/fsio_d0QDW1DJOL.sh"
[cargo-make] INFO - Running Task: download-etcd
[cargo-make] INFO - Execute Command: "/usr/bin/env" "bash" "/var/folders/xc/610kk6l57p7_j3_qzyb0kx940000gp/T/fsio_jBuvsAbWW7.sh"
[cargo-make] INFO - Skipping Task: download-grafana
[cargo-make] INFO - Skipping Task: download-tempo
[cargo-make] INFO - Running Task: download-mcli
[cargo-make] INFO - Execute Command: "/usr/bin/env" "bash" "/var/folders/xc/610kk6l57p7_j3_qzyb0kx940000gp/T/fsio_d8D6SAC6BG.sh"
[cargo-make] INFO - Running Task: download-minio
[cargo-make] INFO - Execute Command: "/usr/bin/env" "bash" "/var/folders/xc/610kk6l57p7_j3_qzyb0kx940000gp/T/fsio_uzmqNaYequ.sh"
[cargo-make] INFO - Skipping Task: download-prometheus
[cargo-make] INFO - Skipping Task: download-pubsub
[cargo-make] INFO - Skipping Task: download-redis
[cargo-make] INFO - Running Task: build-risingwave
[cargo-make] INFO - Execute Command: "/usr/bin/env" "bash" "/var/folders/xc/610kk6l57p7_j3_qzyb0kx940000gp/T/fsio_4Uyz5s9LQo.sh"
[Reminder] risedev will only build risingwave_cmd(_all) and risedev crates.
+ RUSTFLAGS=<not set>
+ cargo build -p risedev
   Compiling proc-macro2 v1.0.85
   Compiling unicode-ident v1.0.11
   Compiling libc v0.2.155
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling bytes v1.6.0
   Compiling memchr v2.7.4
   Compiling once_cell v1.19.0
   Compiling pin-project-lite v0.2.13
   Compiling shlex v1.3.0
   Compiling parking_lot_core v0.9.8
   Compiling itoa v1.0.9
   Compiling cc v1.1.21
error: linking with `cc` failed: exit status: 1
  |
  = note: env -u IPHONEOS_DEPLOYMENT_TARGET -u TVOS_DEPLOYMENT_TARGET -u XROS_DEPLOYMENT_TARGET LC_ALL="C" PATH="/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/siyuan/.pyenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/Users/siyuan/.cargo/bin:/Users/siyuan/.npm-global/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/siyuan/bin:/opt/homebrew/Cellar/openjdk@17/17.0.11/libexec/openjdk.jdk/Contents/Home/bin:/Users/siyuan/tools/apache-maven/bin:/usr/local/cuda/bin:/Users/siyuan/workspace/Go/bin:/Users/siyuan/tools/google-cloud-sdk/bin:/Users/siyuan/.orbstack/bin" VSLANG="1033" ZERO_AR_DATE="1" "cc" "-arch" "arm64" "/var/folders/xc/610kk6l57p7_j3_qzyb0kx940000gp/T/rustcp5YtUI/symbols.o" "/Users/siyuan/workspace/acting/rust/risingwave-main/target/debug/build/proc-macro2-2f8f60b7e725c1fb/build_script_build-2f8f60b7e725c1fb.build_script_build.95cd8a1e0196b74-cgu.0.rcgu.o" "/Users/siyuan/workspace/acting/rust/risingwave-main/target/debug/build/proc-macro2-2f8f60b7e725c1fb/build_script_build-2f8f60b7e725c1fb.build_script_build.95cd8a1e0196b74-cgu.1.rcgu.o" "/Users/siyuan/workspace/acting/rust/risingwave-main/target/debug/build/proc-macro2-2f8f60b7e725c1fb/build_script_build-2f8f60b7e725c1fb.2rtfokglayzjs46gg39e2qdj2.rcgu.o" "-L" "/Users/siyuan/workspace/acting/rust/risingwave-main/target/debug/deps" "-L" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd-dcec867b45ee6844.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libpanic_unwind-39c1637d17663360.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libobject-57355ffcdd18f294.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libmemchr-7945b4523a9f6608.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libaddr2line-66aa36e87ab06d5d.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgimli-69c96ef6a46c616a.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_demangle-a32434451dfbe489.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd_detect-5c3db13ac19ddc02.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libhashbrown-820d3f78c81c4381.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-37aaeba9bc1f58a8.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libminiz_oxide-5aba07aa1d82f73a.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libadler-f9ca9448c178e176.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunwind-41515ffa1ad226f1.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-2ddef8b0e1c0ab68.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liblibc-b57ba926984ef84e.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liballoc-8c4a3b0633b3e050.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-433a325e99d4092f.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcore-4b44a1965098f9de.rlib" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-ff0483af32478a3c.rlib" "-lSystem" "-lc" "-lm" "-L" "/Users/siyuan/.rustup/toolchains/nightly-2024-07-19-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/Users/siyuan/workspace/acting/rust/risingwave-main/target/debug/build/proc-macro2-2f8f60b7e725c1fb/build_script_build-2f8f60b7e725c1fb" "-Wl,-dead_strip" "-nodefaultlibs" "-fuse-ld=lld"
  = note: clang: error: invalid linker name in argument '-fuse-ld=lld'

@BugenZhao
Copy link
Member

Hi, this PR cause I fail to build risingwave locally.

Have you run brew install lld according to the PR description?

Why need to change the rustflags?

Because brew install lld uses a different path than the lld installed with brew install llvm.

@StrikeW
Copy link
Contributor

StrikeW commented Oct 9, 2024

Hi, this PR cause I fail to build risingwave locally.

Have you run brew install lld according to the PR description?

Why need to change the rustflags?

Because brew install lld uses a different path than the lld installed with brew install llvm.

Ok, I think we may need to notify this kind of project-level changes in public beforehand.

@BugenZhao
Copy link
Member

Ok, I think we may need to notify this kind of project-level changes in public beforehand.

It's announced in #team-engineering, not beforehand though. 🤣

StrikeW added a commit that referenced this pull request Oct 9, 2024
StrikeW added a commit that referenced this pull request Oct 9, 2024
wcy-fdu pushed a commit that referenced this pull request Nov 29, 2024
wcy-fdu pushed a commit that referenced this pull request Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants