classic snaps fail to build in launchpad in archs other than amd64

Bug #1665165 reported by Leo Arias
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Michael Hudson-Doyle
launchpad-buildd
Invalid
Undecided
Unassigned

Bug Description

I tried to build the git classic snap in launchpad i386, armhf and arm64. They all failed with:

checking whether we are cross compiling... configure: error: in `/build/elopio-classic-snap/parts/git/build':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Command '['/bin/sh', '/tmp/tmpu_mh0_qb', './configure', '--prefix=', '--with-curl', '--with-expat']' returned non-zero exit status 1
autoreconf -i
./configure --prefix= --with-curl --with-expat
Traceback (most recent call last):
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 203, in main
    builder.build()
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 149, in build
    ["snapcraft"], path=os.path.join("/build", self.name), env=env)
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 92, in run_build_command
    self.chroot(["/bin/sh", "-c", command], echo=echo)
  File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 66, in chroot
    "/usr/bin/sudo", "/usr/sbin/chroot", self.chroot_path] + args)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/sudo', '/usr/sbin/chroot', '/home/buildd/build-SNAPBUILD-22198/chroot-autobuild', 'linux64', '/bin/sh', '-c', 'cd /build/elopio-classic-snap && env LANG=C.UTF-8 https_proxy=http://snap-proxy.launchpad.net:3128 http_proxy=http://snap-proxy.launchpad.net:3128 snapcraft']' returned non-zero exit status 1

https://launchpadlibrarian.net/306596446/buildlog_snap_ubuntu_xenial_arm64_elopio-classic-snap_BUILDING.txt.gz

Tags: classic
Leo Arias (elopio)
tags: added: classic
Revision history for this message
Colin Watson (cjwatson) wrote :

I'm on leave for a couple of days so won't be able to investigate further, but this looks like a snapcraft bug to me rather than a Launchpad bug. Things I'd suggest investigating using an instrumented version of snapcraft:

 * What does config.log say? A modified autotools plugin could dump out that file on failure so that we could see the actual error message.
 * Is snapcraft actually downloading the core snap for the correct architecture?
 * Is snapcraft setting up the core dynamic linker and the core library paths to point to the right place?

affects: launchpad → launchpad-buildd
Changed in snapcraft:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Sergio Schvezov (sergiusens)
milestone: none → 2.27.1
Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: [Bug 1665165] classic snaps fail to build in launchpad in archs other than amd64

On Thu, 16 Feb 2017 06:06:44 +0000, Colin Watson wrote:
> I'm on leave for a couple of days so won't be able to investigate
> further, but this looks like a snapcraft bug to me rather than a
> Launchpad bug. Things I'd suggest investigating using an instrumented
> version of snapcraft:

I created a special version of snapcraft and put it into a PPA (most of the special stuff will probably make it into snapcraft proper though).

> * What does config.log say? A modified autotools plugin could
> dump out that file on failure so that we could see the actual
> error message.

To not clutter here, here's librarian: https://launchpadlibrarian.net/306868979/buildlog_snap_ubuntu_xenial_i386_test-snap_BUILDING.txt.gz

> * Is snapcraft actually downloading the core snap for the
> correct architecture?

Yes, I added more specific messaging:
Downloading core for i386 from https://public.apps.ubuntu.com/anon/download-snap/99T7MUlRhtI3U0QFgl5mXXESAiSwt776_1078.snap to /tmp/tmpmb6krw5u/core_i386.snap
Successfully downloaded core at /tmp/tmpmb6krw5u/core_i386.snap

> * Is snapcraft setting up the core dynamic linker and the core
> library paths to point to the right place?

config.log shows most of this, but I also added this:
Dynamic linker set to '/snap/core/current/i386-linux-gnu/ld-2.23.so'

Leo is going to be doing some local testing and come back to us.

--

Changed in snapcraft:
milestone: 2.27.1 → 2.28
Leo Arias (elopio)
Changed in launchpad-buildd:
status: New → Invalid
Revision history for this message
Leo Arias (elopio) wrote :

I tried this in an ubuntu xenial i386 kvm machine, and it fails with the same error.
I also tried dragonboard using classic mode. Same error.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :
Changed in snapcraft:
status: In Progress → Fix Committed
assignee: Sergio Schvezov (sergiusens) → Michael Hudson-Doyle (mwhudson)
Changed in snapcraft:
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.