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

Statically compile the binaries #985

Merged
merged 1 commit into from
Mar 7, 2017
Merged

Statically compile the binaries #985

merged 1 commit into from
Mar 7, 2017

Conversation

tboerger
Copy link
Member

@tboerger tboerger commented Feb 20, 2017

To also provide static binaries I have integrated 3 different flavors
for now. We got so far static, tidb and sqlite. I think the naming is
quite obvious.

Now we got really static compiled binaries that should also work on older linux distributions.

Signed-off-by: Thomas Boerger thomas@webhippie.de

@tboerger tboerger added topic/deployment type/enhancement An improvement of existing functionality labels Feb 20, 2017
@tboerger tboerger added this to the 1.1.0 milestone Feb 20, 2017
@lunny
Copy link
Member

lunny commented Feb 20, 2017

build failed

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 20, 2017
@tboerger
Copy link
Member Author

The static flags won't work for the darwin target.

As we can not compile darwin binaries with static flags I have split the
build process into different make tasks. Now we get static linked
binaries especially for linux so that it also can run on older versions
of CenOS and so on.

Signed-off-by: Thomas Boerger <thomas@webhippie.de>
@tboerger
Copy link
Member Author

tboerger commented Mar 7, 2017

root@66368096fb5a:/mnt/dist/binaries# file gitea-master-linux-amd64
gitea-master-linux-amd64: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=c3c0bfb58c61708854baa1cac0cb8c0a057084be, not stripped
root@66368096fb5a:/mnt/dist/binaries# ldd gitea-master-linux-386
	not a dynamic executable
root@66368096fb5a:/mnt/dist/binaries# file gitea-master-linux-386
gitea-master-linux-386: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=a71b677b924f887e25e78c9a741b2443cff262db, not stripped
root@66368096fb5a:/mnt/dist/binaries# ldd gitea-master-linux-arm-5
	not a dynamic executable
root@66368096fb5a:/mnt/dist/binaries# file gitea-master-linux-arm-5
gitea-master-linux-arm-5: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=01b57fe0bc56092c9fe367d9c3320e7094ffb647, not stripped
root@66368096fb5a:/mnt/dist/binaries# ldd gitea-master-linux-arm-6
	not a dynamic executable
root@66368096fb5a:/mnt/dist/binaries# file gitea-master-linux-arm-6
gitea-master-linux-arm-6: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=e3fb65471377d6ca8e071d221367459c22d71c1e, not stripped
root@66368096fb5a:/mnt/dist/binaries# ldd gitea-master-linux-arm-7
	not a dynamic executable
root@66368096fb5a:/mnt/dist/binaries# file gitea-master-linux-arm-7
gitea-master-linux-arm-7: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=4eeb43f0b80b9a599b1ea8034c8fff56062b8c38, not stripped
root@66368096fb5a:/mnt/dist/binaries# ldd gitea-master-linux-arm64
	not a dynamic executable
root@66368096fb5a:/mnt/dist/binaries# file gitea-master-linux-arm64
gitea-master-linux-arm64: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for GNU/Linux 3.7.0, BuildID[sha1]=10a50db83b11a363b0a9565a6c1267ac476bfa15, not stripped
root@66368096fb5a:/mnt/dist/binaries# ldd gitea-master-linux-mips
	not a dynamic executable
root@66368096fb5a:/mnt/dist/binaries# file gitea-master-linux-mips
gitea-master-linux-mips: ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1, statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=ff06ab1ef23a309fe1ae514b2301d965ce7eb223, not stripped
root@66368096fb5a:/mnt/dist/binaries# ldd gitea-master-linux-mips64
	not a dynamic executable
root@66368096fb5a:/mnt/dist/binaries# file gitea-master-linux-mips64
gitea-master-linux-mips64: ELF 64-bit MSB executable, MIPS, MIPS64 rel2 version 1, statically linked, BuildID[sha1]=bf612715c91fe973dbe0d6d4d8040b0bfa18b138, for GNU/Linux 3.2.0, not stripped
root@66368096fb5a:/mnt/dist/binaries# ldd gitea-master-linux-mips64le
	not a dynamic executable
root@66368096fb5a:/mnt/dist/binaries# file gitea-master-linux-mips64le
gitea-master-linux-mips64le: ELF 64-bit LSB executable, MIPS, MIPS64 rel2 version 1, statically linked, BuildID[sha1]=a3404024386b7179cf30b89e43e35423e55f4dea, for GNU/Linux 3.2.0, not stripped
root@66368096fb5a:/mnt/dist/binaries# ldd gitea-master-linux-mipsle
	not a dynamic executable
root@66368096fb5a:/mnt/dist/binaries# file gitea-master-linux-mipsle
gitea-master-linux-mipsle: ELF 32-bit LSB executable, MIPS, MIPS32 version 1, statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=f78299deba24f1de541d3b3e46b78c9e5f0784d2, not stripped

@tboerger tboerger changed the title Integrated different flavors Statically compile the binaries Mar 7, 2017
@lunny
Copy link
Member

lunny commented Mar 7, 2017

trusted LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 7, 2017
@andreynering
Copy link
Contributor

Trusted LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 7, 2017
@lunny lunny merged commit 7ed00b6 into go-gitea:master Mar 7, 2017
@lunny
Copy link
Member

lunny commented Mar 7, 2017

fix #551

@tboerger tboerger deleted the flavors branch March 9, 2017 14:50
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/deployment type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants