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

.configure error Unrecognized option: --action_env=PATH #7979

Closed
gopi77 opened this Issue Mar 1, 2017 · 7 comments

Comments

Projects
None yet
2 participants
@gopi77

gopi77 commented Mar 1, 2017

OS: Ubuntu 16.04
gcc 5.4.0
bazel info >> bazel is already the newest version (0.4.4)
Cuda compilation tools, release 8.0, V8.0.61

Tried with tensorflow source https://github.com/tensorflow/tensorflow, commit 27a9808

gopi@gp:~/tensorflow$ ./configure
Please specify the location of python. [Default is /usr/bin/python]:
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]:
Do you wish to use jemalloc as the malloc implementation? [Y/n] Y
jemalloc enabled
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] N
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? [y/N] N
No Hadoop File System support will be enabled for TensorFlow
Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N] N
No XLA JIT support will be enabled for TensorFlow
Found possible Python library paths:
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
Please input the desired Python library path to use. Default is [/usr/local/lib/python2.7/dist-packages]

Using python library path: /usr/local/lib/python2.7/dist-packages
Do you wish to build TensorFlow with OpenCL support? [y/N] N
No OpenCL support will be enabled for TensorFlow
Do you wish to build TensorFlow with CUDA support? [y/N] y
CUDA support will be enabled for TensorFlow
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]:
Please specify the CUDA SDK version you want to use, e.g. 7.0. [Leave empty to use system default]:
Please specify the location where CUDA toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify the Cudnn version you want to use. [Leave empty to use system default]: 5.1.10
Please specify the location where cuDNN 5.1.10 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr/lib/x86_64-linux-gnu
Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size.
[Default is: "3.5,5.2"]: 6.1
.
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=97
INFO: Reading options for 'clean' from /home/gopi/tensorflow/tools/bazel.rc:
Inherited 'build' options: --force_python=py2 --host_force_python=py2 --python2_path=/usr/bin/python --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define PYTHON_BIN_PATH=/usr/bin/python --spawn_strategy=standalone --genrule_strategy=standalone -c opt
INFO: Reading options for 'clean' from /etc/bazel.bazelrc:
Inherited 'build' options: --action_env=PATH --action_env=LD_LIBRARY_PATH --action_env=TMPDIR --test_env=PATH --test_env=LD_LIBRARY_PATH
Unrecognized option: --action_env=PATH

@gunan

This comment has been minimized.

Show comment
Hide comment
@gunan

gunan Mar 2, 2017

Member

I do not think our configure script or our bazelrc template has the --action_env flag set. It looks like you have these options in your /etc/bazel.bazelrc file. Could you share its contents?

Member

gunan commented Mar 2, 2017

I do not think our configure script or our bazelrc template has the --action_env flag set. It looks like you have these options in your /etc/bazel.bazelrc file. Could you share its contents?

@gopi77

This comment has been minimized.

Show comment
Hide comment
@gopi77

gopi77 Mar 2, 2017

build --action_env=PATH
build --action_env=LD_LIBRARY_PATH
build --action_env=TMPDIR
build --test_env=PATH
build --test_env=LD_LIBRARY_PATH

gopi77 commented Mar 2, 2017

build --action_env=PATH
build --action_env=LD_LIBRARY_PATH
build --action_env=TMPDIR
build --test_env=PATH
build --test_env=LD_LIBRARY_PATH

@gunan

This comment has been minimized.

Show comment
Hide comment
@gunan

gunan Mar 2, 2017

Member

My theory seems to be correct.
Did you manually edit this file?

If you set these manually, I am pretty certain you want to set them up this way:

build --action_env=$PATH
build --action_env=$LD_LIBRARY_PATH
build --action_env=$TMPDIR
build --test_env=$PATH
build --test_env=$LD_LIBRARY_PATH

Please note the added $ signs.
If the above also does not work, if you remove the file /etc/bazel.bazelrc, the build should work.
The issue is related to your setup, so I will close this issue.

Member

gunan commented Mar 2, 2017

My theory seems to be correct.
Did you manually edit this file?

If you set these manually, I am pretty certain you want to set them up this way:

build --action_env=$PATH
build --action_env=$LD_LIBRARY_PATH
build --action_env=$TMPDIR
build --test_env=$PATH
build --test_env=$LD_LIBRARY_PATH

Please note the added $ signs.
If the above also does not work, if you remove the file /etc/bazel.bazelrc, the build should work.
The issue is related to your setup, so I will close this issue.

@gunan gunan closed this Mar 2, 2017

@gopi77

This comment has been minimized.

Show comment
Hide comment
@gopi77

gopi77 Mar 2, 2017

Hi

I didn't edit anything manually till now.

After your suggestion i edited like below but still error.
build --action_env=$PATH
build --action_env=$LD_LIBRARY_PATH
build --action_env=$TMPDIR
build --test_env=$PATH
build --test_env=$LD_LIBRARY_PATH

gopi@gp:~/tensorflow$ ./configure
Please specify the location of python. [Default is /usr/bin/python]:
Please specify optimization flags to use during compilation [Default is -march=native]:
Do you wish to use jemalloc as the malloc implementation? (Linux only) [Y/n] Y
jemalloc enabled on Linux
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] N
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? [y/N] N
No Hadoop File System support will be enabled for TensorFlow
Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N] N
No XLA JIT support will be enabled for TensorFlow
Found possible Python library paths:
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
Please input the desired Python library path to use. Default is [/usr/local/lib/python2.7/dist-packages]

Using python library path: /usr/local/lib/python2.7/dist-packages
Do you wish to build TensorFlow with OpenCL support? [y/N] N
No OpenCL support will be enabled for TensorFlow
Do you wish to build TensorFlow with CUDA support? [y/N] y
CUDA support will be enabled for TensorFlow
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]:
Please specify the CUDA SDK version you want to use, e.g. 7.0. [Leave empty to use system default]: 8.0
Please specify the location where CUDA 8.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify the Cudnn version you want to use. [Leave empty to use system default]: 5.1.10
Please specify the location where cuDNN 5.1.10 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size.
[Default is: "3.5,5.2"]: 6.1
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=163
INFO: Reading options for 'clean' from /home/gopi/tensorflow/tools/bazel.rc:
Inherited 'build' options: --force_python=py2 --host_force_python=py2 --python2_path=/usr/bin/python --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define PYTHON_BIN_PATH=/usr/bin/python --spawn_strategy=standalone --genrule_strategy=standalone -c opt
INFO: Reading options for 'clean' from /etc/bazel.bazelrc:
Inherited 'build' options: --action_env=$PATH --action_env=$LD_LIBRARY_PATH --action_env=$TMPDIR --test_env=$PATH --test_env=$LD_LIBRARY_PATH
Unrecognized option: --action_env=$PATH


and some environment info of my pc

gopi@gp:/tensorflow$ echo $CUDA_HOME
/usr/local/cuda-8.0
gopi@gp:
/tensorflow$ echo $PATH
/home/gopi/aom_scripts/:/home/gopi/Android/Sdk/platform-tools/:/usr/local/android-ndk-r12b/:/usr/local/android-studio/bin/:/usr/local/cuda-8.0/bin:/home/gopi/bin:/home/gopi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
gopi@gp:~/tensorflow$ echo $LD_LIBRARY_PATH
/usr/local/cuda-8.0/lib64

gopi77 commented Mar 2, 2017

Hi

I didn't edit anything manually till now.

After your suggestion i edited like below but still error.
build --action_env=$PATH
build --action_env=$LD_LIBRARY_PATH
build --action_env=$TMPDIR
build --test_env=$PATH
build --test_env=$LD_LIBRARY_PATH

gopi@gp:~/tensorflow$ ./configure
Please specify the location of python. [Default is /usr/bin/python]:
Please specify optimization flags to use during compilation [Default is -march=native]:
Do you wish to use jemalloc as the malloc implementation? (Linux only) [Y/n] Y
jemalloc enabled on Linux
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] N
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? [y/N] N
No Hadoop File System support will be enabled for TensorFlow
Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N] N
No XLA JIT support will be enabled for TensorFlow
Found possible Python library paths:
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
Please input the desired Python library path to use. Default is [/usr/local/lib/python2.7/dist-packages]

Using python library path: /usr/local/lib/python2.7/dist-packages
Do you wish to build TensorFlow with OpenCL support? [y/N] N
No OpenCL support will be enabled for TensorFlow
Do you wish to build TensorFlow with CUDA support? [y/N] y
CUDA support will be enabled for TensorFlow
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]:
Please specify the CUDA SDK version you want to use, e.g. 7.0. [Leave empty to use system default]: 8.0
Please specify the location where CUDA 8.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify the Cudnn version you want to use. [Leave empty to use system default]: 5.1.10
Please specify the location where cuDNN 5.1.10 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size.
[Default is: "3.5,5.2"]: 6.1
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=163
INFO: Reading options for 'clean' from /home/gopi/tensorflow/tools/bazel.rc:
Inherited 'build' options: --force_python=py2 --host_force_python=py2 --python2_path=/usr/bin/python --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --define PYTHON_BIN_PATH=/usr/bin/python --spawn_strategy=standalone --genrule_strategy=standalone -c opt
INFO: Reading options for 'clean' from /etc/bazel.bazelrc:
Inherited 'build' options: --action_env=$PATH --action_env=$LD_LIBRARY_PATH --action_env=$TMPDIR --test_env=$PATH --test_env=$LD_LIBRARY_PATH
Unrecognized option: --action_env=$PATH


and some environment info of my pc

gopi@gp:/tensorflow$ echo $CUDA_HOME
/usr/local/cuda-8.0
gopi@gp:
/tensorflow$ echo $PATH
/home/gopi/aom_scripts/:/home/gopi/Android/Sdk/platform-tools/:/usr/local/android-ndk-r12b/:/usr/local/android-studio/bin/:/usr/local/cuda-8.0/bin:/home/gopi/bin:/home/gopi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
gopi@gp:~/tensorflow$ echo $LD_LIBRARY_PATH
/usr/local/cuda-8.0/lib64

@gopi77

This comment has been minimized.

Show comment
Hide comment
@gopi77

gopi77 Mar 2, 2017

you mentioned "My theory seems to be correct." & closed the bug, sad.

gopi77 commented Mar 2, 2017

you mentioned "My theory seems to be correct." & closed the bug, sad.

@gunan

This comment has been minimized.

Show comment
Hide comment
@gunan

gunan Mar 2, 2017

Member

The issue is caused by the contents of your file /etc/bazel.bazelrc.
That file is clearly not a part of the tensorflow repository.
And as I also suggested above, if you remove that file, your build should work.
The creation of that file however, if you did not create yourself, is a bazel issue, not a TensorFlow one as we do not install bazelrc files to your system.

Member

gunan commented Mar 2, 2017

The issue is caused by the contents of your file /etc/bazel.bazelrc.
That file is clearly not a part of the tensorflow repository.
And as I also suggested above, if you remove that file, your build should work.
The creation of that file however, if you did not create yourself, is a bazel issue, not a TensorFlow one as we do not install bazelrc files to your system.

@gopi77

This comment has been minimized.

Show comment
Hide comment
@gopi77

gopi77 Mar 2, 2017

The command sudo apt-get upgrade bazel had issues, so did below steps.

  1. cleaned-up all the bazel related files in my machine as per bazelbuild/bazel#838
  2. did fresh installation of bazel v4.4 with "Install with Installer" option as per https://bazel.build/versions/master/docs/install.html.

Now the ./configure runs fine, thanks

gopi77 commented Mar 2, 2017

The command sudo apt-get upgrade bazel had issues, so did below steps.

  1. cleaned-up all the bazel related files in my machine as per bazelbuild/bazel#838
  2. did fresh installation of bazel v4.4 with "Install with Installer" option as per https://bazel.build/versions/master/docs/install.html.

Now the ./configure runs fine, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment