when the host doesn't have installed a library needed by a go snap, the build fails

Bug #1513935 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Sergio Schvezov

Bug Description

Some go packages will need libraries. If those libraries are not installed in the system, snapcraft allows you to pull them as stage-packages. But in the case of go, when building the source code it is not looking for those libraries on the snap path, so the build fails.

To reproduce:

- make sure that libgudev-1.0-dev is not installed on your system and try to build the following snap:

name: godd
version: 1.0
vendor: Michael Vogt <email address hidden>
binaries:
  godd:
    exec: ./bin/godd
summary: Simple dd like tool
description: Written in go with support for device auto-detection via libgudev, you would need to use hw-assign to access devices.
icon: icon.png

parts:
  godd:
    plugin: go
    source: git://github.com/mvo5/godd
    stage-packages: [libgudev-1.0-dev]
    snap:
     - usr/lib/x86_64-linux-gnu/libgudev-1.0.so*
     - usr/lib/x86_64-linux-gnu/libobject-2.0.so*
     - usr/lib/x86_64-linux-gnu/libglib-2.0.so*
     - bin/godd*

Leo Arias (elopio)
description: updated
Changed in snapcraft:
importance: Undecided → High
assignee: nobody → Sergio Schvezov (sergiusens)
Changed in snapcraft:
status: New → Fix Committed
Changed in snapcraft:
milestone: none → 0.5
Revision history for this message
Leo Arias (elopio) wrote :

Fixed in https://github.com/ubuntu-core/snapcraft/pull/92 with a unit test and bringing back the godd example test.

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.