google / google/lyra

MacOS `bazel build -c opt :encoder_main` fails to build

Open
#82 3 comments 0 reactions 0 assignees View on GitHub
bug duplicate
Dominant language
C++
Stars
4k
Forks
368
PR merge metrics
No merged PRs in 30d

Description

Hi, I want to build lyra encoder, decoder for macos target. For now it requires android ndk which I don't want to install, ofc.

## Build error
I also tried with `--config=clang_toolchain`, same error.

`$ bazel build -c opt :encoder_main`

```tb
DEBUG: Rule 'com_google_protobuf' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "fd8aabf32d1d1ae3319e280fed07aa6eb24d150d", shallow_since = "1614800268 -0800" and dropping ["tag"]
DEBUG: Repository com_google_protobuf instantiated at:
/Users/sotomi/projects/lyra-audio-codec/WORKSPACE:26:15: in
Repository rule git_repository defined at:
/private/var/tmp/_bazel_sotomi/f57c4149873f470db18811454562e7ef/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in
DEBUG: Rule 'gmaven_rules' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "c166ae9f06069025eab59ad74c102db23badc93abb6582ca69c42a0f441c52b5"
DEBUG: Repository gmaven_rules instantiated at:
/Users/sotomi/projects/lyra-audio-codec/WORKSPACE:139:13: in
Repository rule http_archive defined at:
/private/var/tmp/_bazel_sotomi/f57c4149873f470db18811454562e7ef/external/bazel_tools/tools/build_defs/repo/http.bzl:353:31: in
ERROR: /Users/sotomi/projects/lyra-audio-codec/WORKSPACE:124:23: fetching android_ndk_repository rule //external:androidndk: Either the path attribute of android_ndk_repository or the ANDROID_NDK_HOME environment variable must be set.
ERROR: Analysis of target '//:encoder_main' failed; build aborted: Either the path attribute of android_ndk_repository or the ANDROID_NDK_HOME environment variable must be set.
INFO: Elapsed time: 0.259s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
currently loading: @androidsdk//
Fetching @local_jdk; fetching
Fetching @local_config_cc_toolchains; Building xcode-locator
```

## Versions
```bash
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

bazel 5.2.0-homebrew
MacOS 12.3.1 (intel)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.