Classic confinement and core_dynamic_linker

Joe Talbott joe.talbott at canonical.com
Thu Jan 19 15:56:44 UTC 2017


On Wed, Jan 18, 2017 at 7:37 PM, Joseph Rushton Wakeling
<joseph.wakeling at webdrake.net> wrote:
> On 18/01/17 02:21, Sergio Schvezov wrote:
>>
>> The logic is still run, but the resulting binary in classic uses rpath and
>> no dynamic loading so there is no resolution to a on-system library we can
>> pick up. I guess we can do some magic, but it feels it might be either
>> fragile or make the build process a lot slower. We will need to look into
>> it, but not short term.
>
>
> OK -- thanks for the explanation.  Completely understand the preference to
> require explicit staging of packages over potentially fragile automation.
>
> Anyway, I had a go at tweaking my snap package as defined here:
> https://github.com/WebDrake/ldc2.snap/pull/1/files
> https://github.com/WebDrake/ldc2.snap/blob/a437ec17d50bdd767febebf5b617d7d3a716716b/snapcraft.yaml
>
> ... to use `classic` confinement and staging packages necessary for linking.
> I've posted the resulting `snapcraft.yaml` below.  The major diff apart from
> the `confinement` setting is the addition of these lines to the `ldc` part
> of the file:
>
>     stage-packages:
>     - libconfig++-dev
>     - libphobos2-ldc-dev
>
> When I run `snapcraft build`, however, everything builds and links fine, but
> _nothing_ gets staged (the `stage/` and `prime/` directories both remain
> empty).  I've tried the same thing while removing the `gcc`, `gcc-wrapper`,
> `libc6` and `libc6-dev` parts, with the same result.
>
> Any thoughts on what could be the problem here?
>

'snapcraft build' only builds the part.  You'd need to run 'snapcraft
stage' to get files into the stage directory and 'snapcraft prime' to
get files into the prime directory.  'snapcraft prime' will do a
'snapcraft stage' as part of its lifecycle.

Joe




More information about the Snapcraft mailing list