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

Add configuration for OSX #21

Closed
wants to merge 6 commits into from
Closed

Add configuration for OSX #21

wants to merge 6 commits into from

Conversation

brey
Copy link

@brey brey commented Jul 2, 2021

Add configuration for OSX

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Hopefully closes #2

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@vnlitvinov
Copy link
Contributor

@conda-forge-admin, please rerender

@vnlitvinov
Copy link
Contributor

@brey you should have re-rendered, otherwise CI for MacOS won't get started at all... I also edited the first message to make checklist appear correctly, hope you don't mind :)

@h-vetinari
Copy link
Member

Thanks for opening this PR. :)

@vnlitvinov
Copy link
Contributor

Now the fun begins... compilation errors galore 🤣

@brey
Copy link
Author

brey commented Jul 3, 2021

Looks like declaration issues

@h-vetinari
Copy link
Member

Previously this failed in lzma:

[1,417 / 2,647] Compiling external/com_google_googletest/googletest/src/gtest.cc; 2s darwin-sandbox ... (3 actions, 2 running)
ERROR: /Users/runner/miniforge3/conda-bld/ray-packages_1625240530036/b-o/external/org_lzma_lzma/BUILD.bazel:32:11: C++ compilation of rule '@org_lzma_lzma//:lzma' failed (Exit 1): wrapped_clang failed: error executing command 
  (cd /Users/runner/miniforge3/conda-bld/ray-packages_1625240530036/b-o/sandbox/darwin-sandbox/446/execroot/com_github_ray_project_ray && \
  [...]

With macos 10.14 we get further (redis), but still fail:

[2,576 / 2,883] Compiling external/boringssl/src/ssl/ssl_versions.cc; 1s darwin-sandbox ... (3 actions running)
INFO: From Generating C++ proto_library //streaming:streaming_proto:
protobuf/streaming.proto:5:1: warning: Import google/protobuf/any.proto is unused.
ERROR: /Users/runner/miniforge3/conda-bld/ray-packages_1626273491907/b-o/external/com_github_antirez_redis/BUILD.bazel:9:8: Executing genrule @com_github_antirez_redis//:bin failed (Exit 2): bash failed: error executing command 
  (cd /Users/runner/miniforge3/conda-bld/ray-packages_1626273491907/b-o/sandbox/darwin-sandbox/1646/execroot/com_github_ray_project_ray && \
  [...]

@vnlitvinov
Copy link
Contributor

@krfricke as a new maintainer for this repo (and as a Ray contributor I assume) it would be awesome if you could give some help on this problem, too.

@h-vetinari
Copy link
Member

@krfricke as a new maintainer for this repo (and as a Ray contributor I assume) it would be awesome if you could give some help on this problem, too.

Absolutely. For me personally (after finishing the version upgrades), I'd much rather see #5 tackled first by someone who knows the upstream codebase/CI than OSX. 🙃

@krfricke
Copy link
Contributor

I'm very happy to work on #5 - as for this PR, I'm not very familiar with the build/toolchain, but I'll look into this and can ping the right persons to help with it

@h-vetinari
Copy link
Member

OK, a tiny step further by moving to osx 10.15 and adding pkg-config. Now there's a missing script:

make[3]: external/local_config_cc/cc_wrapper.sh: No such file or directory

which is interesting, because bazel itself seem to set it so (note export CC=):

ERROR: /Users/runner/miniforge3/conda-bld/ray-packages_1628785194066/b-o/external/com_github_antirez_redis/BUILD.bazel:9:8: Executing genrule @com_github_antirez_redis//:bin failed (Exit 2): bash failed: error executing command 
  (cd [...]
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; 
        export CC=external/local_config_cc/cc_wrapper.sh
        [...]
        make -s -C "${tmpdir}" -j"${parallel}" V=0 CFLAGS="${CFLAGS-} -DLUA_USE_MKSTEMP -Wno-pragmas -Wno-empty-body" AR="${AR}" RANLIB="${RANLIB}"
        [...]
    ')

Searching for cc_wrapper and consequently gen-bazel-toolchain in conda-forge, I see there's now a https://github.com/conda-forge/bazel-toolchain-feedstock, but that sounds more like cross compilation. CC @xhochy, who seems to know about these things... 🙃

Is this a bazel-issue?

@xhochy
Copy link
Member

xhochy commented Aug 12, 2021

Haven't looked at anything here (can do in 2 weeks).

In general bazel-toolchain is a package that generates a bazel config to use the conda-forge compilers with the correct flags in bazel. It can do cross-complilation but it is also needed normally for non-cross compiled setups.

@h-vetinari
Copy link
Member

h-vetinari commented Aug 12, 2021

Thanks for the super quick response! :)

Would you say it's better to use bazel-toolchain rather than "stand-alone" bazel for conda-forge recipes (notwithstanding the pinning here...)?

@xhochy
Copy link
Member

xhochy commented Aug 12, 2021

bazel-toolchain works around a lot of issues with finding the correct libs and includes. It is though only generating a config that you need to pass into bazel then.

@h-vetinari h-vetinari mentioned this pull request Aug 12, 2021
@hadim
Copy link
Member

hadim commented May 29, 2022

I am wondering whether there is any appetite into moving that PR forward? I don't have OSX to test the build myself locally.

@h-vetinari
Copy link
Member

I am wondering whether there is any appetite into moving that PR forward? I don't have OSX to test the build myself locally.

Neither do I, but you can try using CI! I haven't had time to look into the bazel-toolchain thing at the time.

@brey
Copy link
Author

brey commented May 31, 2022

I will try locally on my Mac and see if I can get somewhere. I'll let you know.

@brey brey closed this Jun 5, 2022
@brey brey deleted the master branch June 5, 2022 19:04
@brey
Copy link
Author

brey commented Jun 5, 2022

I will try again after rebase to main and do a new PR if successful.

@pyrito
Copy link

pyrito commented Aug 8, 2022

@brey has there been any progress on this front?

@h-vetinari h-vetinari mentioned this pull request Sep 23, 2022
@h-vetinari h-vetinari mentioned this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build for OSX
8 participants