Snap build not stripping the binary?

Bug #1883703 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Harry Pidcock

Bug Description

I'm not sure if something broke with our build process, but checking out 2.8 and doing 'make go-install' I get:

$ make go-install
go install -mod=mod -tags "" -ldflags "-s -w -X github.com/juju/juju/version.GitCommit=db826b53169164894237721327a1407658e154df -X github.com/juju/juju/version.GitTreeState=clean -X github.com/juju/juju/version.build=" -v $MAIN_PACKAGES
github.com/juju/juju/cmd/juju

$ go version
go version go1.14.4 linux/amd64

$ ll -h ~/dev/go/bin/juju
-rwxrwxr-x 1 jameinel jameinel 89M Jun 16 16:49 /home/jameinel/dev/go/bin/juju*

So 89MB for 'juju'. However, the snap 2.8.0 is:
$ ll /snap/juju/current/bin/juju -h
-rwxr-xr-x 1 root root 120M Jun 3 09:22 /snap/juju/current/bin/juju*

If instead of doing 'make go-install' I run 'go install -v github.com/juju/juju/...' which doesn't pass the magic '-s -w' flags to make it strip the binary I get:
$ ll -h ~/dev/go/bin/juju
-rwxrwxr-x 1 jameinel jameinel 119M Jun 16 16:51 /home/jameinel/dev/go/bin/juju*

Which is about the same size as the snap.

So I think we broke stripping for the snap build.

Tags: build
Revision history for this message
John A Meinel (jameinel) wrote :
Harry Pidcock (hpidcock)
Changed in juju:
status: Triaged → In Progress
importance: Undecided → Medium
assignee: nobody → Harry Pidcock (hpidcock)
Revision history for this message
Harry Pidcock (hpidcock) wrote :
Harry Pidcock (hpidcock)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.