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

fix macOS build way #3638

Closed
sreev opened this issue Nov 29, 2020 · 6 comments
Closed

fix macOS build way #3638

sreev opened this issue Nov 29, 2020 · 6 comments

Comments

@sreev
Copy link
Contributor

sreev commented Nov 29, 2020

Is your feature request related to a problem? Please describe.
build macos artifacts in a consistent way. update/upgrade to a small dependency is breaking the build.

Describe the solution you'd like
detail out the dependencies and versions.
make optional as possible
create new flag/options to keep an existing feature.
for eg. make pex optional.

Describe alternatives you've considered
open.

Additional context
none.

@sreev
Copy link
Contributor Author

sreev commented Nov 29, 2020

Build from source on macOS bigsur fails. python3.9.0_2 / pip3 20.2.4.


% ./bazel_configure.py
% bazel build --config=darwin heron/...


DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Package 'pex' requires a different Python: 3.9.0 not in '>=2.7,<3.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*'
INFO: Elapsed time: 228.509s, Critical Path: 85.54s
INFO: 876 processes: 153 internal, 723 local.
FAILED: Build did NOT complete successfully

WARNING: incubator-heron/heron/healthmgr/tests/java/BUILD:52:13: in srcs attribute of java_library rule //heron/healthmgr/tests/java:healthmgr-tests: please do not import '//heron/healthmgr/src/java:org/apache/heron/healthmgr/HealthManager.java' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'java_library', the error might have been caused by the macro implementation

warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: bazel-out/darwin-fastbuild/bin/heron/proto/libproto-cxx.a the table of contents is empty (no object file members in the library define global symbols)

ERROR: incubator-heron/tools/rules/pex/BUILD:53:8: Bootstrapping pex //tools/rules/pex:pex_wrapper failed (Exit 1): bash failed: error executing command 
  (cd /private/var/tmp/_bazel_svaddi/5513d20b4906d6e334d9ceb49a2d11d7/execroot/org_apache_heron && \
  exec env - \
    PATH='/usr/local/Cellar/python@3.9/3.9.0_2/bin:/usr/local/opt/openjdk@11/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Library/Apple/usr/bin' \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; OUTDIR=$(cd bazel-out/host/bin/tools/rules/pex && pwd)

@joshfischer1108
Copy link
Member

Can you please list the command that caused this failure so that it can be reproduced?

@joshfischer1108
Copy link
Member

It looks like you are using Python 3.9. At this time we are supporting 3.8 at the highest. I just ran the commands listed above and was able to successfully build on my local.

If using brew on OSX you can install Python 3.8 and switch to it. Note: The following commands may not be 100% correct.

To install

$  brew install python@3.8

To switch it would be something like the below

$  brew switch python 3.8 

@joshfischer1108
Copy link
Member

@sreev Is your issue resolved?

@Code0x58
Copy link
Contributor

Code0x58 commented Dec 8, 2020

I created a PR that should allow you to run on a system with python 3.9 installed, so you could test out the branch @sreev

edit: it builds, but there's some integration tests failing that I'll check in on tomorrow

@nicknezis
Copy link
Contributor

I'm closing this issue. I believe the build works on Python 3.8, and with #3646 we can move to Python 3.9. But we don't need to keep this open. @sreev if you do get around to helping test #3646, just leave a comment on that pull request. If not, no worries.

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

4 participants