debian: do not build with -buildmode=pie on i386 (2.27) #3737

Merged
merged 2 commits into from Aug 16, 2017

Conversation

Projects
None yet
4 participants
Collaborator

mvo5 commented Aug 16, 2017

With -buildmode=pie mode on i386 snapd panics in spectacular
ways (LP: #1711052) so we need to disable it for the time
being.

See also https://forum.snapcraft.io/t/artful-i386-panics/

debian: do not build with -buildmode=pie on i386
With -buildmode=pie mode on i386 snapd panics in spectacular
ways (LP: #1711052) so we need to disable it for the time
being.

See also https://forum.snapcraft.io/t/artful-i386-panics/

@mvo5 mvo5 added this to the 2.27 milestone Aug 16, 2017

@mvo5 mvo5 changed the title from debian: do not build with -buildmode=pie on i386 to debian: do not build with -buildmode=pie on i386 (2.27) Aug 16, 2017

@mvo5 mvo5 requested a review from chipaca Aug 16, 2017

codecov-io commented Aug 16, 2017

Codecov Report

Merging #3737 into release/2.27 will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff                @@
##           release/2.27    #3737      +/-   ##
================================================
- Coverage         74.87%   74.86%   -0.01%     
================================================
  Files               382      382              
  Lines             32995    32995              
================================================
- Hits              24704    24701       -3     
- Misses             6490     6493       +3     
  Partials           1801     1801
Impacted Files Coverage Δ
cmd/snap/cmd_aliases.go 93.33% <0%> (-1.67%) ⬇️
overlord/ifacestate/helpers.go 62.33% <0%> (-0.67%) ⬇️
interfaces/sorting.go 94.28% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 191f8e9...6dc8495. Read the comment docs.

Seems fine and pragmatic

+# Disable -buildmode=pie mode on i386 as can panics in spectacular
+# ways (LP: #1711052).
+# See also https://forum.snapcraft.io/t/artful-i386-panics/
+BUILDFLAGS:=-pkgdir=$(CURDIR)/_build/std
@mwhudson

mwhudson Aug 16, 2017

Contributor

It's not really important but you don't need to set -pkgdir unless you are also setting -buildmode=pie

@mvo5

mvo5 Aug 16, 2017

Collaborator

Aha, nice! I was not aware of this

packaging/ubuntu-16.04/rules
+# ways (LP: #1711052).
+# See also https://forum.snapcraft.io/t/artful-i386-panics/
+BUILDFLAGS:=-pkgdir=$(CURDIR)/_build/std
+ifneq ($(shell dpkg --print-architecture),i386)
@mwhudson

mwhudson Aug 16, 2017

Contributor

As I mentioned on IRC, this should be dpkg-architecture -qDEB_TARGET_ARCH or something like that

@mvo5

mvo5 Aug 16, 2017

Collaborator

Thanks, silly me. Fixed.

@@ -21,7 +21,14 @@ SYSTEMD_UNITS_DESTDIR="lib/systemd/system/"
# work around that by constructing the appropriate -I flag by hand.
GCCGO := $(shell go tool dist env > /dev/null 2>&1 && echo no || echo yes)
-BUILDFLAGS:=-buildmode=pie -pkgdir=$(CURDIR)/_build/std
+# Disable -buildmode=pie mode on i386 as can panics in spectacular
@chipaca

chipaca Aug 16, 2017

Member

if you happen to commit again to this, tidy the language a bit :-) (as can panics?)

@mvo5

mvo5 Aug 16, 2017

Collaborator

cough thank you

@mvo5 mvo5 merged commit 04412b0 into snapcore:release/2.27 Aug 16, 2017

1 of 7 checks passed

artful-amd64 autopkgtest running
Details
xenial-amd64 autopkgtest running
Details
xenial-i386 autopkgtest running
Details
xenial-ppc64el autopkgtest running
Details
yakkety-amd64 autopkgtest running
Details
zesty-amd64 autopkgtest running
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment