gnn icon indicating copy to clipboard operation
gnn copied to clipboard

install ERROR: ProtoCompile tensorflow_gnn/tools/sampled_stats_pb2.py failed: (Segmentation fault)

Open mxmessi opened this issue 3 years ago • 1 comments

I managed to installl some days ago (removing the line package.BUILD)

As there are some new commits, I did a fresh clone of the repo and tried to install it, but get errors.

Additionally, a simple End-to-End-Example would really help.

... (all requirements successful)... ERROR: Command errored out with exit status 1: command: /Users/mess/dev/tf_gnn/.venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"'; file='"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-wheel-a_xckoy6 cwd: /Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/ Complete output (72 lines): running bdist_wheel running build running bazel_build Starting local Bazel server and connecting to it... Loading: Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded DEBUG: /private/var/tmp/_bazel_mess/3337b4c6ebf30f562b96f3f7e3030ff3/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software. Loading: 0 packages loaded Loading: 0 packages loaded Loading: 0 packages loaded Analyzing: target //package:move_generated_files (1 packages loaded, 0 targets configured) Analyzing: target //package:move_generated_files (31 packages loaded, 118 targets configured) Analyzing: target //package:move_generated_files (32 packages loaded, 118 targets configured) Analyzing: target //package:move_generated_files (38 packages loaded, 223 targets configured) Analyzing: target //package:move_generated_files (38 packages loaded, 223 targets configured) INFO: Analyzed target //package:move_generated_files (43 packages loaded, 731 targets configured). INFO: Found 1 target... [0 / 10] [Prepa] Creating source manifest for //package:move_generated_files ... (3 actions, 0 running) [14 / 191] Compiling src/google/protobuf/compiler/java/java_file.cc [for host]; 3s darwin-sandbox ... (8 actions, 7 running) [26 / 191] Compiling src/google/protobuf/compiler/php/php_generator.cc [for host]; 4s darwin-sandbox ... (8 actions, 7 running) [38 / 191] Compiling src/google/protobuf/compiler/command_line_interface.cc [for host]; 4s darwin-sandbox ... (8 actions, 7 running) [56 / 191] Compiling src/google/protobuf/compiler/cpp/cpp_file.cc [for host]; 2s darwin-sandbox ... (8 actions, 7 running) [74 / 191] Compiling src/google/protobuf/util/internal/protostream_objectwriter.cc [for host]; 3s darwin-sandbox ... (8 actions, 7 running) [92 / 191] Compiling src/google/protobuf/compiler/cpp/cpp_message.cc [for host]; 7s darwin-sandbox ... (8 actions, 7 running) [112 / 191] Compiling src/google/protobuf/compiler/js/js_generator.cc [for host]; 9s darwin-sandbox ... (8 actions, 7 running) [137 / 191] Compiling src/google/protobuf/descriptor.cc [for host]; 5s darwin-sandbox ... (8 actions, 7 running) INFO: From Linking external/com_google_protobuf/libprotobuf_lite.lo [for host]: /Library/Developer/CommandLineTools/usr/bin/libtool: file: bazel-out/host/bin/external/com_google_protobuf/_objs/protobuf_lite/io_win32.o has no symbols [187 / 193] [Prepa] Linking external/com_google_protobuf/libprotobuf.lo [for host] INFO: From Linking external/com_google_protobuf/libprotobuf.lo [for host]: /Library/Developer/CommandLineTools/usr/bin/libtool: file: bazel-out/host/bin/external/com_google_protobuf/_objs/protobuf/error_listener.o has no symbols ERROR: /Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/tensorflow_gnn/tools/BUILD:7:17: ProtoCompile tensorflow_gnn/tools/sampled_stats_pb2.py failed: (Segmentation fault): protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc '--python_out=bazel-out/darwin-opt/bin' -I. -Iexternal/com_google_protobuf/python -Ibazel-out/darwin-opt/bin/external/com_google_protobuf/python ... (remaining 1 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox Target //package:move_generated_files failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 84,704s, Critical Path: 16,88s INFO: 193 processes: 10 internal, 183 darwin-sandbox. FAILED: Build did NOT complete successfully ERROR: Build failed. Not running target FAILED: Build did NOT complete successfully Traceback (most recent call last): File "", line 1, in File "/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py", line 152, in setup( File "/Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/setuptools/init.py", line 159, in setup return distutils.core.setup(**attrs) File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run self.run_command('build') File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py", line 86, in run subprocess.check_call( File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/local/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '--macos_minimum_os=10.9', '//package:move_generated_files']' returned non-zero exit status 1.

ERROR: Failed building wheel for tensorflow-gnn Running setup.py clean for tensorflow-gnn Failed to build tensorflow-gnn Installing collected packages: tensorflow-gnn Attempting uninstall: tensorflow-gnn Found existing installation: tensorflow-gnn 0.1.0 Uninstalling tensorflow-gnn-0.1.0: Successfully uninstalled tensorflow-gnn-0.1.0 Running setup.py install for tensorflow-gnn ... error ERROR: Command errored out with exit status 1: command: /Users/mess/dev/tf_gnn/.venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"'; file='"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-record-n5tjgybo/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mess/dev/tf_gnn/.venv/include/site/python3.9/tensorflow-gnn cwd: /Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/ Complete output (53 lines): running install /Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running bazel_build Loading: Loading: 0 packages loaded DEBUG: /private/var/tmp/_bazel_mess/3337b4c6ebf30f562b96f3f7e3030ff3/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software. Analyzing: target //package:move_generated_files (0 packages loaded, 0 targets configured) INFO: Analyzed target //package:move_generated_files (0 packages loaded, 0 targets configured). INFO: Found 1 target... [0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt ERROR: /Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/tensorflow_gnn/tools/BUILD:7:17: ProtoCompile tensorflow_gnn/tools/sampled_stats_pb2.py failed: (Segmentation fault): protoc failed: error executing command bazel-out/host/bin/external/com_google_protobuf/protoc '--python_out=bazel-out/darwin-opt/bin' -I. -Iexternal/com_google_protobuf/python -Ibazel-out/darwin-opt/bin/external/com_google_protobuf/python ... (remaining 1 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
Target //package:move_generated_files failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0,617s, Critical Path: 0,06s
INFO: 5 processes: 5 internal.
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py", line 152, in <module>
    setup(
  File "/Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/setuptools/__init__.py", line 159, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/setuptools/command/install.py", line 68, in run
    return orig.install.run(self)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/install.py", line 546, in run
    self.run_command('build')
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py", line 86, in run
    subprocess.check_call(
  File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/bin/bazel', 'run', '-c', 'opt', '--experimental_repo_remote_exec', '--macos_minimum_os=10.9', '//package:move_generated_files']' returned non-zero exit status 1.
----------------------------------------

Rolling back uninstall of tensorflow-gnn Moving to /Users/mess/dev/tf_gnn/.venv/bin/tfgnn_generate_training_data from /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-uninstall-x1qgplh2/tfgnn_generate_training_data Moving to /Users/mess/dev/tf_gnn/.venv/bin/tfgnn_print_training_data from /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-uninstall-x1qgplh2/tfgnn_print_training_data Moving to /Users/mess/dev/tf_gnn/.venv/bin/tfgnn_sampled_stats from /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-uninstall-x1qgplh2/tfgnn_sampled_stats Moving to /Users/mess/dev/tf_gnn/.venv/bin/tfgnn_validate_graph_schema from /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-uninstall-x1qgplh2/tfgnn_validate_graph_schema Moving to /Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/tensorflow_gnn-0.1.0.dist-info/ from /Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/~ensorflow_gnn-0.1.0.dist-info Moving to /Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/tensorflow_gnn/ from /Users/mess/dev/tf_gnn/.venv/lib/python3.9/site-packages/~ensorflow_gnn ERROR: Command errored out with exit status 1: /Users/mess/dev/tf_gnn/.venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"'; file='"'"'/Users/mess/dev/test_tensorflow_gnn/tensorflow_gnn/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/nw/nlf3yqyx5_74d8nwc_g9bj6h0000gn/T/pip-record-n5tjgybo/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mess/dev/tf_gnn/.venv/include/site/python3.9/tensorflow-gnn Check the logs for full command output.

mxmessi avatar Jan 07 '22 11:01 mxmessi

May be a bazel issue related to this: https://github.com/protocolbuffers/protobuf/issues/8884

One recommended solution, is to install the full Xcode for MacOS (available in App store) rather than the dev tools version

I also have this problem still investigating.

cjoverbay avatar Mar 31 '22 06:03 cjoverbay

Hi @mxmessi and @cjoverbay, thanks for reaching out! Did your investigations turn up anything we should do in the TF-GNN code to avoid this problem? Or has it just gone away in the meantime?

arnoegw avatar Mar 24 '23 08:03 arnoegw

I suspect this issue (reported for tensorflow-gnn 0.1.0) is no longer current, so I'd like to close it. If you still see it happen, please reopen with detailed repro instructions. Much appreciated!

arnoegw avatar Mar 27 '23 14:03 arnoegw