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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static binary? #11

Open
borestad opened this issue Aug 2, 2023 · 5 comments
Open

Static binary? #11

borestad opened this issue Aug 2, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@borestad
Copy link

borestad commented Aug 2, 2023

Hi!
Great util!
Any chance to also distribute it as a static binary? (and more platforms as well, like mac m1) 馃檪

@Drew-Alleman
Copy link
Owner

Hi there,

Thank you for the kind words!

Regarding your request for a static binary, I added a static binary for Linux available in the latest release. However, please note that this binary is specific to Linux and won't be directly runnable on macOS.

As for the macOS build, cross-compiling from a non-macOS system to macOS is challenging due to Apple's licensing restrictions and the proprietary nature of the macOS SDK and related build tools. However, we've made updates to the code that should allow it to compile on macOS. If you have access to a macOS machine, you should be able to compile and run the project there.

If you encounter any issues or have further questions, please don't hesitate to let me know. I appreciate your interest and support!

Best,
Drew

@borestad
Copy link
Author

borestad commented Aug 7, 2023

Awesome!

Just FYI - this seems to work fine on Ubuntu 22.04, but older dists like Debian 11 fails due libssl.so.3 being missing, hense it's not truly "static" .... might be a corner case though, but haven't tried other dists like alpine (that uses musl).

./ds: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

Just some food for thoughts regarding the naming convention if you want to add more architectures/builds later on - a lot of cli's seems to be using this naming pattern, like https://github.com/sharkdp/bat/releases or https://github.com/starship/starship/releases

image

Thanks again 鈽猴笍

@Drew-Alleman
Copy link
Owner

Hi,

Thanks for the feedback, I will look into the issue with the libssl.so.3 library, as well as the naming convention.

Best,
Drew Alleman

@Drew-Alleman
Copy link
Owner

Hi,

In the latest release I've added more binaries, though I still haven't included one for Mac M1. However, I believe I might have resolved the issue with the libssl.so.3 library. Additionally, I've updated the names of the binaries (e.g ds-v1.2.4-win-x64.exe, ds-v1.2.4-debian-aarch64). Please let me know if the library issue has been addressed.

Best,
Drew

@borestad
Copy link
Author

Hi!
Cool. Just tried it out.
The problem with the naming though is that you're now deferring it to per platform, which may get quickly confusing.

I.e, on debian11 - the working binary is ds-v1.2.4-redhat-x86_64 .... so, what about i.e ubuntu then? 馃槂

Not sure how to solve this in the best way though.
https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml#L69C19-L69C44
ripgrep is using a matrix and compiling it to musl as well (musl is often my goto arch, and works AFAIK on every distro)

Sorry for the trouble! 馃槆

@Drew-Alleman Drew-Alleman self-assigned this Sep 30, 2023
@Drew-Alleman Drew-Alleman added enhancement New feature or request help wanted Extra attention is needed labels Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants