WIP: improve Makefile #187

Closed
noerw wants to merge 3 commits from noerw/tea:static-build into main
Member
  • rework the makefile so that tags and build flags are consistently applied & injected across the build install and release targets

  • make install now creates a static without debug info

    • This is what make release already did via xgo. Considering that tea binaries are rather large, we should also go the extra mile and create static binaries..
  • adds comments on some quirks that I needed to research first

  • adds build instructions for the "proper" way using make to README

TODO:

  • check if it works with musl (eg alpine linux)
  • check if CI release is still working
  • move tag injection to modules/settings instead of main?
- rework the makefile so that tags and build flags are consistently applied & injected across the `build` `install` and `release` targets - `make install` now creates a static without debug info - This is what `make release` already did via xgo. Considering that tea binaries are rather large, we should also go the extra mile and create static binaries.. - adds comments on some quirks that I needed to research first - adds build instructions for the "proper" way using `make` to README TODO: - [x] check if it works with musl (eg alpine linux) - [ ] check if CI release is still working - [ ] move tag injection to modules/settings instead of main?
noerw added 1 commit 2020-09-18 16:16:08 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
944010a0ba
rework Makefile
make install & make release now create static binaries where possbile.
also properly and consistently apply & inject tags + version.
Author
Member

can we force a CI build with make release on this branch somehow?

can we force a CI build with `make release` on this branch somehow?
lunny added the
kind/build
label 2020-09-19 15:58:33 +00:00
Author
Member

@6543 you're working with alpine linux right? could you check if make install works for you here? Somewhere I read something about musl libc being not properly covered by go static builds..

@6543 you're working with alpine linux right? could you check if `make install` works for you here? Somewhere I read something about musl libc being not properly covered by go static builds..
6543 reviewed 2020-09-29 16:10:10 +00:00
Dismissed
README.md Outdated
@ -30,3 +16,3 @@
Distribution packages exist for: **alpinelinux ([tea](https://pkgs.alpinelinux.org/packages?name=tea&branch=edge))** and **archlinux ([gitea-tea](https://aur.archlinux.org/packages/gitea-tea))**
To install from source, go 1.12 or newer is required.
Owner

go >= 1.13 (sdk dependency)

go >= 1.13 (sdk dependency)

@norwin alpine should be fine as it builds packages themselves, so it will be sure to work with musl.

@norwin alpine should be fine as it builds packages themselves, so it will be sure to work with musl.
noerw added 1 commit 2020-09-29 18:38:23 +00:00
Some checks failed
continuous-integration/drone/pr Build is failing
0e3724835f
attempt to run make release in CI
revert later
noerw added 1 commit 2020-09-29 18:42:58 +00:00
Some checks failed
continuous-integration/drone/pr Build is failing
04a49c33a6
Merge branch 'master' into static-build
Author
Member

CI make release fails with -buildmode=pie not supported on linux/mips64le

other platforms work. what do? ?

CI `make release` fails with `-buildmode=pie not supported on linux/mips64le` other platforms work. what do? ?

tbh I think we can remove the mips targets.

tbh I think we can remove the mips targets.
noerw added the
status/wip
label 2020-09-30 06:58:54 +00:00
Owner

bevore 17M
avter 19M

bevore 17M avter 19M
Author
Member

closing this, as there are some tradeoffs that tend to make the situation worse:

  • static builds in make install is not a great idea, as a static libc is not available on many systems by default.
  • new build configuration is incompatible with mips crosscompilation
  • ...
closing this, as there are some tradeoffs that tend to make the situation worse: - static builds in make install is not a great idea, as a static libc is not available on many systems by default. - new build configuration is incompatible with mips crosscompilation - ...
noerw closed this pull request 2020-10-09 10:11:59 +00:00
Some checks are pending
continuous-integration/drone/pr Build is failing
check-and-test / check-and-test (pull_request)
Required

Pull request closed

Sign in to join this conversation.
No description provided.