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 fail on MacBook M1 #5368

Closed
zanmato1984 opened this issue Jul 14, 2022 · 4 comments · Fixed by #5436
Closed

Build fail on MacBook M1 #5368

zanmato1984 opened this issue Jul 14, 2022 · 4 comments · Fixed by #5436
Assignees
Labels
type/question The issue belongs to a question.

Comments

@zanmato1984
Copy link
Contributor

zanmato1984 commented Jul 14, 2022

General Question

It's a brand new MacBook M1 I just obtained, with barely nothing installed.

Clang version:

Apple clang version 13.0.0 (clang-1300.0.27.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

CMake version:

cmake version 3.23.2

Build tiflash with:

cmake .. -DCMAKE_BUILD_TYPE=DEBUG -DENABLE_TESTS=ON
make -j

Two errors occurred:

Undefined symbols for architecture arm64:
  "_GetAarch64FeaturesEnumName", referenced from:
      _AddFlags in list_cpu_features.c.o
  "_GetAarch64FeaturesEnumValue", referenced from:
      _AddFlags in list_cpu_features.c.o
  "_GetAarch64Info", referenced from:
      _CreateTree in list_cpu_features.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [contrib/cpu_features/list_cpu_features] Error 1
make[1]: *** [contrib/cpu_features/CMakeFiles/list_cpu_features.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
error: failed to run custom build command for `kvproto v0.0.2 (https://github.com/pingcap/kvproto.git#0e2f26c0)`

Caused by:
  process didn't exit successfully: `/Users/zanmato/dev/tiflash/contrib/tiflash-proxy/target/debug/build/kvproto-53533e5785490f67/build-script-build` (exit status: 101)
  --- stdout
  `protoc` not in PATH, try using the bundled protoc

  --- stderr
  thread 'main' panicked at 'No suitable `protoc` (>= 3.1.0) found in PATH', /Users/zanmato/.cargo/registry/src/github.com-1ecc6299db9ec823/protobuf-build-0.13.0/src/protobuf_impl.rs:35:14
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
make[5]: *** [build] Error 101
make[4]: *** [debug] Error 2
make[3]: *** [release] Error 2
make[2]: *** [../contrib/tiflash-proxy/target/release/libtiflash_proxy.dylib] Error 2
make[1]: *** [contrib/tiflash-proxy-cmake/CMakeFiles/tiflash_proxy.dir/all] Error 2
make: *** [all] Error 2

I think I was following every step in the build doc, but I don't know why it failed.

@zanmato1984 zanmato1984 added the type/question The issue belongs to a question. label Jul 14, 2022
@fuzhe1989
Copy link
Contributor

Waiting for workaround.

@zanmato1984
Copy link
Contributor Author

Any update? @solotzg @SchrodingerZhu

@SchrodingerZhu
Copy link
Contributor

I have been on some personal stuffs since Thursday. I will be looking into the CPU features specific problems this weekend.

@fuzhe1989
Copy link
Contributor

Some updates:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question The issue belongs to a question.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants