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.yaml --------------------------------------------------

name: ldc2
version: "1.1.0-beta6"
summary: D compiler with LLVM backend
description: |
    LDC is a portable compiler for the D programming Language, with
    modern optimization and code generation capabilities.  It uses
    the official DMD compiler frontend to support the latest version
    of D2, and uses the LLVM Core libraries for code generation.
confinement: classic
grade: devel

apps:
  ldc2:
    command: ldc2
    plugs: [home]
  ldmd2:
    command: ldmd2
    plugs: [home]
  ldc-profdata:
    command: ldc-profdata
    plugs: [home]

parts:
  ldc:
    source: git://github.com/ldc-developers/ldc.git
    source-tag: v1.1.0-beta6
    plugin: cmake
    stage:
    - -etc/ldc2.conf
    build-packages:
    - build-essential
    - ldc
    - llvm-dev
    - libconfig++-dev
    - libedit-dev
    - zlib1g-dev
    stage-packages:
    - libconfig++-dev
    - libphobos2-ldc-dev
  ldc-config:
    plugin: dump
    source: ldc-config
    organize:
      ldc2.conf: etc/ldc2.conf

  gcc:
    plugin: nil
    stage-packages: [gcc]
    organize:
      usr/bin/gcc: usr/bin/gcc.real
  gcc-wrapper:
    plugin: dump
    source: gcc-wrapper
    organize:
      gcc.wrapper: usr/bin/gcc
  libc6:
    plugin: nil
    stage-packages: [libc6]
  libc6-dev:
    plugin: nil
    stage-packages: [libc6-dev]

--
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to