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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow static building with ./build.sh --enable-static #398

Merged
merged 1 commit into from
Jun 2, 2024

Conversation

fasterit
Copy link

Closes #373

Please run autoreconf -iv to update the autotools files in the repo from the updated configure.ac and commit that, too.
Debian has 2.72 only in experimental and running an update on the 2.71 in stable / testing / unstable is just creating a lot of noise.

@genivia-inc
Copy link
Member

Thanks for contributing!

I know the -static flag, but I'm unsure how to one can do #373 to locally install/add ugrep for a host OS without running into issues or crashes such as x86 32 bit OS versus x64 64 bit OS versus arm7 etc. There is some flexibility for x64, since ugrep x64 performs a CPU check to only use AVX2/512BW when available. It defaults to SSE2. I suppose various executables have to be hosted somewhere and picked in an install script based on a host CPU check?

@fasterit
Copy link
Author

I would just build amd64 and arm64 variants of the executables, e.g. as part of your makemake.sh release process.
Put them in bin/linux_amd64/ and bin/linux_arm64/ and people can just wget them as they can with the Windows versions right now.

This satisfies #373 and should be a reasonable help for people wanting to try out new versions not packaged for their distribution yet. Otherwise apt install or dnf install are the ways to go. Free updates, care from the distro maintainers etc. included that way.

Building for niche CPU architectures is not worth it from your (upstream) perspective. This is what distros do and the user base for ugrep on some MIPS router is likely too limited to be constantly worth your maintenance time. The apt install works on these architectures just the same. That's the magic of the better Linux distributions.

Best, DLange
(Debian Developer)

@genivia-inc
Copy link
Member

I would just build amd64 and arm64 variants of the executables, e.g. as part of your makemake.sh release process. Put them in bin/linux_amd64/ and bin/linux_arm64/ and people can just wget them as they can with the Windows versions right now.

Makes sense. I'll look into building a statically-linked x64/amd64 version on Debian and cross compile a statically-linked AAarch64/arm64 version.

It would be nice if this can be (semi-) automated e.g. in a container from GitHub actions. Perhaps there is a way.

@genivia-inc genivia-inc merged commit ee2d222 into Genivia:master Jun 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Have portable, statically-linked releases for Linux
2 participants