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
Polish Bazel build scripts #6424
Conversation
Can one of the admins verify this patch? |
Test FAILed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I wasn't aware of these built-in conditions.
No worries! There might be some more changes coming though -- I realized after I made this PR that I need to add some copts and such for Windows compatibility. I'll update the PR when I get it working. |
BUILD.bazel
Outdated
"//conditions:default": [ | ||
"-Wl,--version-script,$(location //:src/ray/ray_version_script.lds)", | ||
], | ||
}), | ||
}, | ||
copts = COPTS + if_linux_x86_64(["-fno-gnu-unique"]), | ||
copts = COPTS + select({ | ||
"@bazel_tools//src/conditions:linux_x86_64": ["-fno-gnu-unique"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing the following error on macOS. I think you need to add a default condition here.
/Users/travis/build/ray-project/ray/BUILD.bazel:785:1: Configurable attribute "copts" doesn't match this configuration (would a default condition help?).
Conditions checked:
@bazel_tools//src/conditions:linux_x86_64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup I do have that fix locally! I haven't pushed it to avoid clogging the builds for now. Will hopefully push it when I fix some other things as well.
@raulchen This is really unfortunate... I've I just started getting a ton of linker errors on Windows as a result of the previous PR, and tracking them down is proving to be somewhat of a nightmare. To give some examples, here's a sample of what I'm seeing:
It seems to me that a lot of these are due to the new use of shared libraries, which we had tried to avoid until this point—getting them to work seamlessly seems to be really painful. In fact, I don't yet even know how to handle them at all! But I'm unsure that the current approach is correct either—if for no other reason than the fact that Bazel should have a mechanism to auto-detect the library names so that you don't have to specify Would it be possible for you to lend me a hand at fixing some issues? (Do you happen to have a Windows machine to test on, or any guesses as to how to fix them?) Or even better—is there any chance you could switch to static libraries? That might make things much, much easier. |
@mehrdadn sorry about these problems. |
Oh that's a great idea if that's possible. Right now it's a dependency of |
@mehrdadn I'll disable building streaming for Windows for now. And looking into whether we can use exported dynamic libraries symbols in windows. |
@chaokunyang Okay sure, thanks! Feel free to just push a commit here if that's easier. |
@mehrdadn You can try this, I don't have a windows machine for this test, hope it works.
|
@chaokunyang I think it's working! I just pushed a new commit with this change, I think it should be good to merge on my end if it builds fine on other platforms. Thanks a ton! :) |
@mehrdadn Please add |
@chaokunyang Done, thanks! |
Test FAILed. |
Test PASSed. |
Test PASSed. |
Test FAILed. |
Actually, @chaokunyang I have a question for you: As far as I can tell (though I'm not entirely sure), Clang doesn't support |
Hi @mehrdadn, |
Oh awesome, okay thanks @chaokunyang! I just removed it. |
Test FAILed. |
Why are these changes needed?
Normalizes the conditionals used for platform-dependent build configurations (introduced in Streaming data transfer and python integration #6185).
Fixes string quotation
Related issue number
#6185
Checks
scripts/format.sh
to lint the changes in this PR.