-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Retry OSX support #80
Conversation
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 ( |
@mattip
presumably because our patched rule for building redis is not yet compatible with the OSX compiler stack (i.e. will probably need to use the LLVM versions and make sure the cc_wrapper is found):
|
No. I would prefer to move forward with #78 first, then return to this |
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 ( |
Not sure if this is relevant, but could be that we need to fill in our abseil
Immediately afterwards there's loads of:
|
Would sourcing the bazel-toolchain be helpful here? The build setup is pretty opaque... https://github.com/conda-forge/bazel-toolchain-feedstock |
Then likely patch bazelrc or something to tell bazel to pick up the custom toolchain like we do in jaxlib and tensorflow |
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- bazel =4.2.2
- sysroot_linux-64 2.17 # [linux64]
- patchelf # [linux]
- curl
- cython >=0.29.26
- make
- m2-bash # [win]
- python
host:
- python
- pip
- packaging
- openjdk =11 The bazel version is pretty old (upstream seems to be on 5.x) and I thought the openjdk issue was resolved. Also, it could prove useful to add bazel in both build and host --- I remember having all sorts of problems with such things in jaxlib and tensorflow but perhaps due to other dependencies and here the dependency list is a bit more forgiving. |
@ngam, thanks for taking a look - would you like to collaborate on this PR? |
86ed65d
to
db1d57f
Compare
I am going to try to help, but this is obviously going to be difficult (at least from the looks of it). I was planning to fork your PR and start tinkering, but I was frightened by the 1+ hours of build (which would likely translate to 2+ hours for osx). So I think I should perhaps consider building this locally, in which case I need to reset my local setup and decide which machine to use... |
Yeah, not saying this will be easy, haha. Sent you an invite in any case. 🙃 |
Thanks! I will obviously accept the invite 😄 I also want to spend a bit more time on the upstream source code. I think we can get away with tinkering with bazelrc alone (which actually may be the way to go in general) but there might be some hardcoded parts we need to be aware of. They obviously manage to build it in a somewhat straightforward way (download and install bazel; tell it to run) so hopefully not a complete hopeless endeavor! |
Things to try:
|
Stuck on this https://github.com/ray-project/ray/blob/7afc8d67f4c525f76e2288e04bf52861ac9eb108/cpp/BUILD.bazel#L6-L33 with an error of:
|
Currently based on #105, because why not |
So it looks like the main compilation succeed now, but we're running into
That sounds like a bazel thing? @ngam? |
This comment was marked as outdated.
This comment was marked as outdated.
But this is weird. Essentially, this is only happening on osx, right? Hmm... @conda-forge-admin, please rerender. |
This
didn't help. It stopped the build at the very start by complaining about zlib. Let me think what we can do... we may need to patch something... |
There are lots of these lines in the build log
|
@h-vetinari @mattip any history on the redis patch? I think the problem may have been in it (specifically the part about darwin and (un/re)setting the env variables). Obviously completely skipping it is just the brute-force attempt; we can likely edit it to suit our needs here. I will look into the issue with the filesystem complaints (we may need some extra bazel cleaning/expunging) |
Also, please assess before I make more tweaks. I can try some tricks on the filesystem front, but it would be best to get more context on the redis patch. |
That was mainly @vnlitvinov's work. We documented how to generate it, but that doesn't cover the content of the redis patch itself. |
Thanks. I think we need to change this part:
genrule_cmd = select({
"@bazel_tools//src/conditions:darwin": """
- unset CC LDFLAGS CXX CXXFLAGS
+ export CC=$(CC)
+ export CFLAGS=$(CC_FLAGS)
+ export AR=$${CC/gnu-cc/gnu-ar}
+ export NM=$${CC/gnu-cc/gnu-nm}
+ export RANLIB=$${CC/gnu-cc/gnu-ranlib}
tmpdir="redis.tmp"
p=$(location Makefile)
cp -p -L -R -- "$${p%/*}" "$${tmpdir}"
chmod +x "$${tmpdir}"/deps/jemalloc/configure
parallel="$$(getconf _NPROCESSORS_ONLN || echo 1)"
- make -s -C "$${tmpdir}" -j"$${parallel}" V=0 CFLAGS="$${CFLAGS-} -DLUA_USE_MKSTEMP -Wno-pragmas -Wno-empty-body"
+ make -s -C "$${tmpdir}" -j"$${parallel}" V=0 CFLAGS="$${CFLAGS-} -DLUA_USE_MKSTEMP -Wno-pragmas -Wno-empty-body" AR="$${AR}" RANLIB="$${RANLIB}"
mv "$${tmpdir}"/src/redis-server $(location redis-server)
chmod +x $(location redis-server)
mv "$${tmpdir}"/src/redis-cli $(location redis-cli) or simply undo it. I will have another look soon. The latter parts of the patch are likely safe. |
I wonder if rebasing this off 2.6.2 would help. |
…nda-forge-pinning 2023.09.11.19.37.56
The point of those patches (IIRC there were multiple related to this topic, but maybe some were already upstreamed) is to make sure we're using the "correct" compiler. Building with So, when a build isn't expecting to use the variables like Looking at the quoted patch, I would guess that it was just a copy of the Linux one, and (probably) names of compiler and tools might be different on Darwin (i.e. maybe they aren't |
Still getting this error, and lot of other build warnings.
|
Long-term, I'd like to avoid rebuilding redis completely (we have in in conda-forge), but to try that, we'll (well at least I) need to wait for ray to become compatible with bazel 6. |
Ray "ideology" of vendoring most of the dependencies internally (which is kind of safe when you're running stuff in a random but production environment) conflicts with conda-forge "do not vendor stuff" pretty badly. Redis is just one of the cases (and I think initially Ray vendored Redis because they patched something in it). |
Closing, #119 which replaces this was merged |
Follow-up from #77 (which already did most of the groundwork), as well as #21
Fixes #2
Also cleans up some dependency cruft.