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

compile tensorflow fails with error: SWIGing tensorflow/python/tensorflow.i ... swig failed: error executing command #41806

Closed
Flamefire opened this issue Jul 28, 2020 · 2 comments · Fixed by #42362
Assignees
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.2 Issues related to TF 2.2 type:build/install Build and install issues

Comments

@Flamefire
Copy link
Contributor

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): CentOS 6
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below):1.14, 1.15, 2.1, 2.2, 2.3
  • Bazel version (if compiling from source): 2.0.0

Describe the current behavior

Running the build fails with a rather undescriptive:

ERROR: /home/username/src/tensorflow/tensorflow/python/BUILD:2974:1: SWIGing tensorflow/python/tensorflow.i failed (Exit 1): swig failed: error executing command
  (cd /tmp/_bazel_username/dcca333cc36b578f4473c754fbbc85ff/execroot/org_tensorflow && \
  exec env - \
  bazel-out/host/bin/external/swig/swig -c++ -python -module pywrap_tensorflow_internal -o bazel-out/local-py3-opt/bin/tensorflow/python/pywrap_tensorflow_internal.cc -outdir bazel-out/local-py3-opt/bin/tensorflow/python -ltensorflow/python/client/device_lib.i -ltensorflow/python/client/events_writer.i -ltensorflow/python/client/tf_session.i -ltensorflow/python/client/tf_sessionrun_wrapper.i -ltensorflow/python/framework/cpp_shape_inference.i -ltensorflow/python/framework/python_op_gen.i -ltensorflow/python/grappler/cluster.i -ltensorflow/python/grappler/cost_analyzer.i -ltensorflow/python/grappler/item.i -ltensorflow/python/grappler/model_analyzer.i -ltensorflow/python/grappler/tf_optimizer.i -ltensorflow/python/lib/core/py_func.i -ltensorflow/python/lib/core/strings.i -ltensorflow/python/lib/io/file_io.i -ltensorflow/python/lib/io/py_record_reader.i -ltensorflow/python/lib/io/py_record_writer.i -ltensorflow/python/platform/base.i -ltensorflow/python/pywrap_tfe.i -ltensorflow/python/training/quantize_training.i -ltensorflow/python/training/server_lib.i -ltensorflow/python/util/kernel_registry.i -ltensorflow/python/util/port.i -ltensorflow/python/util/py_checkpoint_reader.i -ltensorflow/python/util/stat_summarizer.i -ltensorflow/python/util/tfprof.i -ltensorflow/python/util/transform_graph.i -ltensorflow/python/util/util.i -Ibazel-out/local-py3-opt/genfiles -Iexternal/eigen_archive -Iexternal/grpc -Iexternal/protobuf_archive -Iexternal/swig -Iexternal/boringssl -Ibazel-out/local-py3-opt/genfiles/external/local_config_python -Iexternal/nsync -Iexternal/gemmlowp -Iexternal/jpeg -Iexternal/com_googlesource_code_re2 -Iexternal/jsoncpp_git -Iexternal/zlib_archive -Iexternal/highwayhash -Iexternal/gif_archive -Ibazel-out/local-py3-opt/genfiles/external/jpeg -Iexternal/lmdb -Iexternal/png_archive -Iexternal/farmhash_archive -Iexternal/local_config_cuda -Iexternal/sqlite_archive -Iexternal/swig/Lib -Iexternal/swig/Lib/cffi -Iexternal/swig/Lib/python -Iexternal/swig/Lib/std -Iexternal/swig/Lib/typemaps tensorflow/python/tensorflow.i).
Target //tensorflow/tools/pip_package:build_pip_package failed to build

This is as reported in #14211, looked like an issue in Bazel (bazelbuild/bazel#4053) but was deemed a Bug in TensorFlow, hence requesting a fix here

Describe the expected behavior

Build succeeds without need to apply patch from bazelbuild/bazel#4053 (comment)

@Flamefire Flamefire added the type:bug Bug label Jul 28, 2020
@Flamefire Flamefire changed the title compile tensorflow with error: SWIGing tensorflow/python/tensorflow.i compile tensorflow fails with error: SWIGing tensorflow/python/tensorflow.i ... swig failed: error executing command Jul 28, 2020
@amahendrakar amahendrakar added subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.2 Issues related to TF 2.2 type:build/install Build and install issues and removed type:bug Bug labels Jul 28, 2020
@gowthamkpr gowthamkpr assigned angerson and unassigned gowthamkpr Jul 29, 2020
@gowthamkpr gowthamkpr added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Jul 29, 2020
Flamefire added a commit to Flamefire/tensorflow that referenced this issue Aug 14, 2020
This avoids failures when swig is build in custom envs e.g. with a
compiler installed into another location (e.g. /opt)
See also bazelbuild/bazel#4053
Patch by @boegel from bazelbuild/bazel#4053 (comment)

Fixes tensorflow#41806
Flamefire added a commit to Flamefire/tensorflow that referenced this issue Aug 15, 2020
This avoids failures when swig is build in custom envs e.g. with a
compiler installed into another location (e.g. /opt)
See also bazelbuild/bazel#4053
Patch by @boegel from bazelbuild/bazel#4053 (comment)

Fixes tensorflow#41806
@Flamefire
Copy link
Contributor Author

SWIG no longer used. Closing

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting tensorflower Status - Awaiting response from tensorflower subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.2 Issues related to TF 2.2 type:build/install Build and install issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants