Why are official binaries much larger than those compiled manually?

❯ git status
HEAD detached at v1.19.0
nothing to commit, working tree clean

❯ TAGS="bindata sqlite sqlite_unlock_notify" make build &> /tmp/build.out

❯ ls -sh gitea
93M gitea

❯ curl -L -O "https://github.com/go-gitea/gitea/releases/download/v1.19.0/gitea-1.19.0-linux-amd64"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  119M  100  119M    0     0  9753k      0  0:00:12  0:00:12 --:--:-- 9380k

❯ ls -sh gitea-1.19.0-linux-amd64
120M gitea-1.19.0-linux-amd64

Toolchain: archlinux
golang: 🐹 v1.20.2
nodejs:  v19.8.1
commit: 726d6a5

As shown above, If I compile manually the binary size is 93M but the official release binary from github is 120M. Manually compiled one seems to be working good. Due to tool-chain differences, there could be minor size differences but 27M is too much.

Am I the only one seeing this difference?

1 Like