adanet icon indicating copy to clipboard operation
adanet copied to clipboard

bazel build not working

Open Mistobaan opened this issue 6 years ago • 11 comments

bazel test -c opt //...
ERROR: $HOME/.cache/bazel/_bazel_fmilo/9c8a25ad1f3a0959bd40f01be01ceda5/external/com_google_protobuf/BUILD:645:1: no such target '//external:python_headers': target 'python_headers' not declared in package 'external' defined by $HOME/workspace/adanet/WORKSPACE and referenced by '@com_google_protobuf//:python/google/protobuf/internal/_api_implementation.so'
ERROR: Analysis of target '//adanet/core:report_accessor' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.293s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)

Ubuntu 14.04

bazel version
Build label: 0.18.1rc4
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Mon Oct 29 09:54:52 2018 (1540806892)
Build timestamp: 1540806892
Build timestamp as int: 1540806892

Mistobaan avatar Oct 31 '18 00:10 Mistobaan

Which version of Bazel are you using? I've built with as low as v0.15.2.

In the meantime, you can install the official Pypi package: pip install adanet

cweill avatar Oct 31 '18 00:10 cweill

bazel version: 0.18.1rc4

note that the pypi package does not have the examples directory inside it and the second notebook will fail.

Mistobaan avatar Oct 31 '18 00:10 Mistobaan

I have the latest version of bazel, but still I am not able to run the example : bazel version Build label: 0.19.0 Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Mon Oct 29 14:35:30 2018 (1540823730) Build timestamp: 1540823730 Build timestamp as int: 1540823730

There is a error when we run the test ~/adanet$ bazel test -c opt //... FAIL: //adanet/core:timer_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/timer_test/test.log) FAIL: //adanet/core:report_accessor_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/report_accessor_test/test.log) FAIL: //adanet/core:freezer_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/freezer_test/test.log) FAIL: //adanet/core:report_materializer_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/report_materializer_test/test.log) FAIL: //adanet/core:ensemble_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/ensemble_test/test.log) FAIL: //adanet/core:iteration_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/iteration_test/test.log) FAIL: //adanet/core:evaluator_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/evaluator_test/test.log) FAIL: //adanet/core:candidate_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/candidate_test/test.log) FAIL: //adanet/examples:simple_dnn_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/examples/simple_dnn_test/test.log) FAIL: //adanet/core:input_utils_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/input_utils_test/test.log) FAIL: //adanet/core:summary_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/summary_test/test.log) FAIL: //adanet/core/subnetwork:generator_test (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/subnetwork/generator_test/test.log) FAIL: //adanet/core:estimator_test (shard 1 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_1_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 3 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_3_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 19 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_19_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 2 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_2_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 5 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_5_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 16 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_16_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 6 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_6_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 12 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_12_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 11 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_11_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 18 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_18_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 14 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_14_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 17 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_17_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 9 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_9_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 20 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_20_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 10 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_10_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 7 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_7_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 13 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_13_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 8 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_8_of_20/test.log) FAIL: //adanet/core:estimator_test (shard 15 of 20) (see /home/sshetty/.cache/bazel/_bazel_sshetty/7a04043939e9b6c2e47d87e2ecc609c8/execroot/org_adanet/bazel-out/k8-opt/testlogs/adanet/core/estimator_test/shard_15_of_20/test.log)

FAILED: //adanet/core:estimator_test (Summary) .. .. .. .. .. .. .. .. INFO: Build completed, 14 tests FAILED, 34 total actions


Also installed the "sudo pip install adanet", but i get a errors when i try to run example "adanet_objective". "ValueError: b"\n\x83\x01\n;adanet/iteration_2/ensemble_3_layer_dnn/architecture/adanetB:\x08\x07\x12\x00B4| b'1_layer_dnn' | b'2_layer_dnn' | b'3_layer_dnn' |J\x08\n\x06\n\x04text" has type str, but isn't valid UTF-8 encoding. Non-UTF-8 strings must be converted to unicode objects before being added."

Any idea how to fix this ?

ShettyHarapanahalli avatar Oct 31 '18 09:10 ShettyHarapanahalli

@ShettyHarapanahalli
Use bazel test -c opt -j 1 //... The -j 1 will run 1 job a time.

jiayiliu avatar Oct 31 '18 22:10 jiayiliu

@ShettyHarapanahalli: This should be fixed now with #12 .

cweill avatar Nov 01 '18 21:11 cweill

@Mistobaan : Are you still encountering the original error?

cweill avatar Nov 01 '18 21:11 cweill

solved

WangHexie avatar Nov 02 '18 13:11 WangHexie

@cweill yes still same error.
If I add this to the WORKSPACE I get rid of that error but ...

bind(
  name = "python_headers",
  actual = "@protobuf_bzl//util/python:python_headers"
)

I get another one:

external/com_google_protobuf/python/google/protobuf/internal/api_implementation.cc:31:20: fatal error: Python.h: No such file or directory

Mistobaan avatar Nov 02 '18 17:11 Mistobaan

Could you try installing v0.2.0 from PyPi with pip? Let me know if that works for you.

cweill avatar Nov 02 '18 18:11 cweill

This was fixed with py2 for me.

ShettyHarapanahalli avatar Nov 02 '18 18:11 ShettyHarapanahalli

@jiayiliu

@ShettyHarapanahalli Use bazel test -c opt -j 1 //... The -j 1 will run 1 job a time.

This work for me, thanks liu.

ppaulggit avatar Nov 04 '18 14:11 ppaulggit