-
Notifications
You must be signed in to change notification settings - Fork 144
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
Update gradle to 8.13 to fix command exec on java 21 #2571
Conversation
Updates gradle version to fix command execution for java 21. With that, it simplifies overall gradle script and not having to locate dependencies. The environment is inherited from the path. Signed-off-by: John Mazanec <jmazane@amazon.com>
build.gradle
Outdated
task buildNmslib(type:Exec) { | ||
dependsOn cmakeJniLib | ||
def cmakePath = findExecutable("cmake") | ||
logger.lifecycle("Using cmake at: ${cmakePath}") | ||
|
||
if (cmakePath.isEmpty()) { | ||
throw new GradleException("CMake not found in PATH. Please install CMake.") | ||
} | ||
|
||
commandLine cmakePath, | ||
'--build', 'jni/build', | ||
'--target', 'opensearchknn_nmslib', | ||
'--parallel', "${nproc_count}" | ||
} |
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.
@jmazanec15 any reason for removing this? I remember @peterzhuamazon added this to ensure that release builds are not failing. Would like to know why we are removing it.
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.
Oh I see. Let me fix. I just thought it was duplicate code.
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.
np. :)
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.
Yes we add this specifically to build nmslib with different gccs compares to faiss lib.
cc: @naveentatikonda
Thanks.
@@ -1,12 +1,7 @@ | |||
# |
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.
nit : why was this removed
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.
no reason - let me put back
Signed-off-by: John Mazanec <jmazane@amazon.com>
Signed-off-by: John Mazanec <jmazane@amazon.com>
Description
Updates gradle version to fix command execution for java 21. With that, it simplifies overall gradle script and not having to locate dependencies. The environment is inherited from the path.
When setting up the project with jdk 21, the "cmake" command is not being found in the path. This is a bug in gradle and has been fixed. With this, we can remove some of the additional code.
Related Issues
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.