-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve download-latest.sh
to return error when is using MUSL
or bionic
C library
#4386
base: main
Are you sure you want to change the base?
Conversation
adapt the script to terminate on error in case the system is using bionic or MUSL
download-latest.sh
to make it return error when system is using MUSL
or bionic
C librarydownload-latest.sh
to return error when is using MUSL
or bionic
C library
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.
Hello @mathias-vandaele
thank you very much for this PR, I will test it soon
Before I test it, can you ensure we display the workarounds to users when getting the error?
The possible workarounds are compiling from the source files or using the Docker image (https://www.meilisearch.com/docs/learn/getting_started/installation#local-installation)
Hi @curquiza, I will do it later this evening |
…on-when-musl-present
…sage more understanding
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.
Hello @mathias-vandaele
On my mac I got the following errors (before downloading correctly the binary)
@curquiza I will correct it. |
…on-when-musl-present
…uld go through the test of C lib fixing few error after test
e09f80f
to
9cd4378
Compare
Hey @curquiza Linux (POP OS) Linux (Alpine) MAC OS |
Hello @mathias-vandaele |
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.
else | ||
return 1 | ||
fi | ||
return 0 |
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.
we will never reach the final return 0
because of the else return 1
, so let's replace it by return 1
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.
else | |
return 1 | |
fi | |
return 0 | |
fi | |
return 1 |
c_lib='glibc' | ||
return 0 | ||
elif ldd --version | grep -qi musl; then | ||
c_library_failure_usage |
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.
you already display the failure usage in the function in main
, so don't display it here.
c_lib='glibc' | ||
return 0 | ||
elif ldd --version | grep -qi musl; then | ||
c_library_failure_usage |
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.
c_library_failure_usage |
c_library_failure_usage | ||
return 1 | ||
elif ldd --version | grep -qi bionic; then | ||
c_library_failure_usage |
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.
c_library_failure_usage |
@@ -65,6 +65,30 @@ get_os() { | |||
return 0 | |||
} | |||
|
|||
# Gets the C lib the system is using by setting the $c_lib variable. |
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.
we don't use $c_lib
in the script, so no point in storing it.
Can you remove it?
Thank you for coming back to me, |
Adapt the script to terminate on error in case the system is using bionic or MUSL
Pull Request
Related issue
Fixes #4379
What does this PR do?
bionic
,glibc
andmusl
, withglibc
being the only one workingPR checklist
Please check if your PR fulfills the following requirements:
If there is anything you want me to rework on, just let me know!