mace: Ubuntu 16.04 LTS fails on "source tools/build-standalone-lib.sh"
Before you open an issue, please make sure you have tried the following steps:
- Make sure your environment is the same with (https://mace.readthedocs.io/en/latest/installation/env_requirement.html).
- Have you ever read the document for your usage?
- The form below must be filled.
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04 LTS
- NDK version(e.g., 15c): android-ndk-r16b
- GCC version(if compiling for host, e.g., 5.4.0): gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
- MACE version (Use the command: git describe --long --tags): origin/master v0.8.1-172-g915d38c
- Python version(2.7): Python 2.7.12
- Bazel version (e.g., 0.13.0): bazel version Build label: 0.13.1 Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Wed May 23 11:17:23 2018 (1527074243) Build timestamp: 1527074243 Build timestamp as int: 1527074243
Model deploy file (*.yml)
......
Describe the problem
source tools/build-standalone-lib.sh but get error at very begining
To Reproduce
Steps to reproduce the problem:
1. cd /path/to/mace
2. python tools/converter.py convert --config_file=/path/to/your/model_deployment_file
Error information / logs
Please include the full log and/or traceback here. `user@user:~$ cd XiaoMi/mace-master/ user@user:~/XiaoMi/mace-master$ source tools/build-standalone-lib.sh build shared lib for armeabi-v7a + cpu_gpu_dsp ERROR: /home/user/XiaoMi/mace-master/mace/codegen/BUILD:22:1: no such target ‘@local_opencl_kernel_encrypt//:gen/encrypt_opencl_kernel’: target ‘gen/encrypt_opencl_kernel’ not declared in package ‘’ defined by /home/user/.cache/bazel/_bazel_user/f0687a5e625be804d93da8f6c2ce5b6a/external/local_opencl_kernel_encrypt/BUILD and referenced by ‘//mace/codegen:encrypt_opencl_kernel_gen’ ERROR: Analysis of target ‘//mace/libmace:libmace_dynamic’ failed; build aborted: Loading failed INFO: Elapsed time: 0.347s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded)
Additional context
Add any other context about the problem here, e.g., what you have modified about the code.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 31 (10 by maintainers)
@PennySHE
try to clean the folder “/home/user/.cache/bazel/_bazel_user” and run again
I might find a fix for this “no such package ‘@local_opencl_kernel_encrypt//’” issue. My setup is a Ubuntu16.04 vm running on my Macbook, cloned the latest master branch. I grep the repo to find where has the encrypt, then I got one file encrypt_opencl_codegen.py in tools dir.
root@ubuntu:~/mace# python ./mace/python/tools/encrypt_opencl_codegen.py Generate OpenCL kernel done.
Then I re-run the build-standalone-lib.sh, took a while completed with no error:
root@ubuntu:~/mace# bash tools/build-standalone-lib.sh build shared lib for armeabi-v7a + cpu_gpu_dsp Generate OpenCL kernel done. INFO: Analysed target //mace/libmace:libmace_dynamic (1 packages loaded). INFO: Found 1 target… … … INFO: 1 process: 1 linux-sandbox. INFO: Build completed successfully, 2 total actions LIB PATH: builds/lib INCLUDE FILE PATH: builds/include/mace/public
I would suggest add a line to this tools/build-standalone-lib.sh before first " bazel build" command as a possible fix.
python ./mace/python/tools/encrypt_opencl_codegen.py
@hzwangjl Your error happened to me when I ran with python3. When I tried python2 or I fixed this file:
I catch this error too. I’m using the 0.90 version. Howerver bazel clean --expunge works for me. I guess “Required dependencies” not installed properly will result this.
A workaround is to run
bazel clean --expungelatest code reproduce it on macOS