Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Build Error on Mac OS Regarding PexPython and UI component #808

Closed
zuyu opened this issue May 26, 2016 · 6 comments
Closed

Build Error on Mac OS Regarding PexPython and UI component #808

zuyu opened this issue May 26, 2016 · 6 comments

Comments

@zuyu
Copy link
Member

zuyu commented May 26, 2016

My Mac OS has python 2.7.11, and I encountered the following error from a fresh build:

$ bazel build --config=darwin heron/...

INFO: From PexPython heron/ui/src/python/heron-ui.pex:
Traceback (most recent call last):
  File "bazel-out/local_darwin-fastbuild/bin/3rdparty/pex/_pex", line 105, in <module>
    Main()
  File "bazel-out/local_darwin-fastbuild/bin/3rdparty/pex/_pex", line 84, in Main
    'Cannot exec() %r: file not found.' % main_filename
AssertionError: Cannot exec() '/private/var/tmp/_bazel_zzhang/3964dd02d192385870c24d7a89344f18/heron/bazel-out/local_darwin-fastbuild/bin/3rdparty/pex/_pex.runfiles/3rdparty/pex/_pex.py': file not found.
ERROR: /Users/zzhang/workspace/heron/heron/ui/src/python/BUILD:18:1: null failed: _pex failed: error executing command bazel-out/local_darwin-fastbuild/bin/3rdparty/pex/_pex --not-zip-safe --entry-point heron.ui.src.python.main bazel-out/local_darwin-fastbuild/bin/heron/ui/src/python/heron-ui.pex ... (remaining 1 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
@kramasamy
Copy link
Contributor

Just wondering if you followed the instructions in the page

http://twitter.github.io/heron/docs/developers/compiling/mac/

@zuyu
Copy link
Member Author

zuyu commented May 26, 2016

@kramasamy Yes, I did, but got stuck in Step 8 due to the build error above.

@billonahill
Copy link
Contributor

billonahill commented May 26, 2016

That's really strange. the _pex.py file can't find another instance of itself. Can you try changing Trace.should_log to return True and see what you get:
https://github.com/twitter/heron/blob/master/3rdparty/pex/pex/tracer.py#L64

You'll also want to pass --verbose_failures to bazel build.

@zuyu
Copy link
Member Author

zuyu commented May 29, 2016

@billonahill Changing Trace.should_log does not print out any new error info, but enabling --verbose_failures does (see below).

INFO: From PexPython heron/ui/src/python/heron-ui.pex:
Traceback (most recent call last):
  File "bazel-out/local_darwin-fastbuild/bin/3rdparty/pex/_pex", line 105, in <module>
    Main()
  File "bazel-out/local_darwin-fastbuild/bin/3rdparty/pex/_pex", line 84, in Main
    'Cannot exec() %r: file not found.' % main_filename
AssertionError: Cannot exec() '/private/var/tmp/_bazel_zzhang/3964dd02d192385870c24d7a89344f18/heron/bazel-out/local_darwin-fastbuild/bin/3rdparty/pex/_pex.runfiles/3rdparty/pex/_pex.py': file not found.
ERROR: /Users/zzhang/workspace/heron/heron/ui/src/python/BUILD:18:1: null failed: _pex failed: error executing command
  (cd /private/var/tmp/_bazel_zzhang/3964dd02d192385870c24d7a89344f18/heron && \
  exec env - \
  bazel-out/local_darwin-fastbuild/bin/3rdparty/pex/_pex --not-zip-safe --entry-point heron.ui.src.python.main bazel-out/local_darwin-fastbuild/bin/heron/ui/src/python/heron-ui.pex bazel-out/local_darwin-fastbuild/bin/heron/ui/src/python/heron-ui.pex.manifest): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: _pex failed: error executing command
  (cd /private/var/tmp/_bazel_zzhang/3964dd02d192385870c24d7a89344f18/heron && \
  exec env - \
  bazel-out/local_darwin-fastbuild/bin/3rdparty/pex/_pex --not-zip-safe --entry-point heron.ui.src.python.main bazel-out/local_darwin-fastbuild/bin/heron/ui/src/python/heron-ui.pex bazel-out/local_darwin-fastbuild/bin/heron/ui/src/python/heron-ui.pex.manifest): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.

@billonahill
Copy link
Contributor

@zuyu looks like 3rdparty/pex/_pex failed to execute without much messaging as to why. Specfically this:

cd /private/var/tmp/_bazel_zzhang/3964dd02d192385870c24d7a89344f18/heron && \
  exec env - \
  bazel-out/local_darwin-fastbuild/bin/3rdparty/pex/_pex --not-zip-safe --entry-point \
  heron.ui.src.python.main bazel-out/local_darwin-fastbuild/bin/heron/ui/src/python/heron-ui.pex bazel-out/local_darwin-fastbuild/bin/heron/ui/src/python/heron-ui.pex.manifest

Best way to debug would be to add some print statements into 3rdparty/pex/_pex to see identify it's failing and improve the messaging.

@zuyu
Copy link
Member Author

zuyu commented Jun 4, 2016

I have no build errors in another Mac laptop, although the origin one still has the same build issue.

@zuyu zuyu closed this as completed Jun 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants