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

Can you provide a normal Android project with Gradle #8

Open
stewForAni opened this issue Apr 8, 2021 · 7 comments
Open

Can you provide a normal Android project with Gradle #8

stewForAni opened this issue Apr 8, 2021 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@stewForAni
Copy link

compile failed with bazel project,there are too many error case

@aluebs aluebs added the enhancement New feature or request label Apr 10, 2021
@aluebs
Copy link
Contributor

aluebs commented Apr 10, 2021

Sorry to hear you've encountered errors building with bazel. Currently we have no Gradle support, but feel free to report the errors you are encountering.

@aluebs aluebs added the help wanted Extra attention is needed label Apr 19, 2021
@aigeek
Copy link

aigeek commented Apr 21, 2021

bazel compile fail:
external/androidndk/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find Foundation: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Target //android_example:lyra_android_example failed to build
INFO: Elapsed time: 485.357s, Critical Path: 96.67s
INFO: 715 processes: 17 internal, 658 darwin-sandbox, 40 worker.
FAILED: Build did NOT complete successfully

+1 need gradle project to save the time of building...

@alx696
Copy link

alx696 commented Apr 22, 2021

bazel do not support chinese! Do not put source under chinese directory.

OS: Ubuntu 20.04.2 LTS 64Bit

It's hard for Android developers to compile. Better to provide gradle library.

m@m-pc:~/dev/lyra-main$ bazel build -c opt :encoder_main
INFO: SHA256 (https://github.com/bazelbuild/gmaven_rules/archive/20180625-1.tar.gz) = c166ae9f06069025eab59ad74c102db23badc93abb6582ca69c42a0f441c52b5
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:
  /home/m/dev/lyra-main/WORKSPACE:27:15: in <toplevel>
Repository rule git_repository defined at:
  /home/m/.cache/bazel/_bazel_m/c527f4412d4b5cf28fe5c5dd05e80820/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
DEBUG: Rule 'gmaven_rules' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "c166ae9f06069025eab59ad74c102db23badc93abb6582ca69c42a0f441c52b5"
DEBUG: Repository gmaven_rules instantiated at:
  /home/m/dev/lyra-main/WORKSPACE:140:13: in <toplevel>
Repository rule http_archive defined at:
  /home/m/.cache/bazel/_bazel_m/c527f4412d4b5cf28fe5c5dd05e80820/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
DEBUG: Rule 'gulrak_filesystem' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "7e37433f318488ae4bc80f80e12df12a01579874", shallow_since = "1602313866 +0200" and dropping ["tag"]
DEBUG: Repository gulrak_filesystem instantiated at:
  /home/m/dev/lyra-main/WORKSPACE:54:19: in <toplevel>
Repository rule new_git_repository defined at:
  /home/m/.cache/bazel/_bazel_m/c527f4412d4b5cf28fe5c5dd05e80820/external/bazel_tools/tools/build_defs/repo/git.bzl:186:37: in <toplevel>
DEBUG: Rule 'com_google_glog' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "8d40d7564d4a06d77d707d7c4a50c8b5dc45dd80", shallow_since = "1618423177 +0200" and dropping ["branch"]
DEBUG: Repository com_google_glog instantiated at:
  /home/m/dev/lyra-main/WORKSPACE:94:15: in <toplevel>
Repository rule git_repository defined at:
  /home/m/.cache/bazel/_bazel_m/c527f4412d4b5cf28fe5c5dd05e80820/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
DEBUG: Rule 'com_google_absl' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "6f9d96a1f41439ac172ee2ef7ccd8edf0e5d068c", shallow_since = "1611082155 -0500" and dropping ["branch"]
DEBUG: Repository com_google_absl instantiated at:
  /home/m/dev/lyra-main/WORKSPACE:37:15: in <toplevel>
Repository rule git_repository defined at:
  /home/m/.cache/bazel/_bazel_m/c527f4412d4b5cf28fe5c5dd05e80820/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
DEBUG: Rule 'com_github_gflags_gflags' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "59fb6443a82b84c6b5971b2f45403c78727b7604", shallow_since = "1614883768 -0800" and dropping ["branch"]
DEBUG: Repository com_github_gflags_gflags instantiated at:
  /home/m/dev/lyra-main/WORKSPACE:100:15: in <toplevel>
Repository rule git_repository defined at:
  /home/m/.cache/bazel/_bazel_m/c527f4412d4b5cf28fe5c5dd05e80820/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
DEBUG: Rule 'com_google_audio_dsp' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "b73ca8f6c0a6331c3b36a76c211c7f837312a095", shallow_since = "1611434935 -0800" and dropping ["branch"]
DEBUG: Repository com_google_audio_dsp instantiated at:
  /home/m/dev/lyra-main/WORKSPACE:62:15: in <toplevel>
Repository rule git_repository defined at:
  /home/m/.cache/bazel/_bazel_m/c527f4412d4b5cf28fe5c5dd05e80820/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
WARNING: /home/m/.cache/bazel/_bazel_m/c527f4412d4b5cf28fe5c5dd05e80820/external/com_google_audio_dsp/third_party/fft2d/BUILD:3:11: in linkstatic attribute of cc_library rule @com_google_audio_dsp//third_party/fft2d:fft2d: setting 'linkstatic=1' is recommended if there are no object files
INFO: Analyzed target //:encoder_main (54 packages loaded, 1593 targets configured).
INFO: Found 1 target...
ERROR: /home/m/.cache/bazel/_bazel_m/c527f4412d4b5cf28fe5c5dd05e80820/external/com_google_glog/BUILD.bazel:5:13: Compiling src/demangle.cc failed: undeclared inclusion(s) in rule '@com_google_glog//:glog':
this rule is missing dependency declarations for the following files included by 'src/demangle.cc':
  '/usr/local/lib/clang/13.0.0/include/stddef.h'
  '/usr/local/lib/clang/13.0.0/include/stdarg.h'
  '/usr/local/lib/clang/13.0.0/include/__stddef_max_align_t.h'
  '/usr/local/lib/clang/13.0.0/include/stdint.h'
  '/usr/local/lib/clang/13.0.0/include/limits.h'
Target //:encoder_main failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 132.057s, Critical Path: 8.04s
INFO: 213 processes: 29 internal, 184 linux-sandbox.
FAILED: Build did NOT complete successfully

@aluebs
Copy link
Contributor

aluebs commented Apr 22, 2021

@aigeek, that seems to be an error when working on Mac. Maybe the workaround mentioned in #7 works for you.

@alx696, I am not sure what you mean with putting source under chinese directory.

@alx696
Copy link

alx696 commented Apr 23, 2021

@aluebs If move source from dev to 下载, then run bazel build:

m@m-pc:~/下载/lyra-main$ bazel build -c opt :encoder_main

bazel error: can not find ~/??/lyra-main

@aluebs
Copy link
Contributor

aluebs commented Apr 23, 2021

That seems to be problem of bazel not recognizing chinese characters. But that folder is not part of our repository, rather the path where you cloned it into. It should be as easy as moving the Lyra folder into a path with no chinese characters.

@aluebs
Copy link
Contributor

aluebs commented Sep 30, 2022

Since it has been mentioned in this thread, the new Lyra 1.2.0 release now has experimental Mac support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants