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

bazel build not working #3

Open
Mistobaan opened this issue Oct 31, 2018 · 11 comments
Open

bazel build not working #3

Mistobaan opened this issue Oct 31, 2018 · 11 comments
Labels
bug Something isn't working

Comments

@Mistobaan
Copy link
Contributor

Mistobaan commented Oct 31, 2018

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
@cweill
Copy link
Contributor

cweill commented Oct 31, 2018

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

@Mistobaan
Copy link
Contributor Author

bazel version: 0.18.1rc4

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

@ShettyHarapanahalli
Copy link

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 ?

@jiayiliu
Copy link

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

@cweill
Copy link
Contributor

cweill commented Nov 1, 2018

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

@cweill
Copy link
Contributor

cweill commented Nov 1, 2018

@Mistobaan : Are you still encountering the original error?

@cweill cweill added the bug Something isn't working label Nov 1, 2018
@WangHexie
Copy link

WangHexie commented Nov 2, 2018

solved

@Mistobaan
Copy link
Contributor Author

Mistobaan commented Nov 2, 2018

@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

@cweill
Copy link
Contributor

cweill commented Nov 2, 2018

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

@ShettyHarapanahalli
Copy link

This was fixed with py2 for me.

@ppaulggit
Copy link

ppaulggit commented Nov 4, 2018

@jiayiliu

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

This work for me, thanks liu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants