The linker version '2.27' used by the base 'core18' is incompatible with files in this snap

Hi Folks,

Trying to build a snap and I am running into this problem

The linker version '2.27' used by the base 'core18' is incompatible with files in this snap:
/home/jon/incuvers/snaps/prime/usr/bin/python3.7 (2.29)
/home/jon/incuvers/snaps/prime/usr/bin/python3.7m (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/python3.7/lib-dynload/ossaudiodev.cpython-37m-x86_64-linux-gnu.so (2.28)
/home/jon/incuvers/snaps/prime/usr/lib/python3/dist-packages/numpy/core/_multiarray_umath.cpython-37m-x86_64-linux-gnu.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/i915_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/i965_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/kms_swrast_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/nouveau_vieux_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/r200_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/r300_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/r600_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/radeon_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/virtio_gpu_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/dri/vmwgfx_dri.so (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0.0.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0.0.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1.0.0 (2.28)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libgbm.so.1.0.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.6000.4 (2.28)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1.0.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6000.4 (2.28)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libgstaudio-1.0.so.0.1590.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1590.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libgstrtsp-1.0.so.0.1590.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libgsttag-1.0.so.0.1590.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0.1590.0 (2.29)
/home/jon/incuvers/snaps/prime/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 (2.29)

Target is Ubuntu Core 18, Build system is 19.04

Snapcraft.yaml :

name: test-incuvers-iot-jy
version: '1.02'
summary: IRIS
description: |
  The main snap for IRIS: Incuvers Realtime Imaging System.
  An IoT cell incubator with imaging capabilities.
grade: devel

architectures:
  - build-on: amd64
    run-on: amd64

confinement: devmode

base: core18

apps:

  python:
      command: python3
      plugs: [camera,framebuffer]
      environment:
          LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/home/ubuntu/mysnaps/snaps/parts/tis/install/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$SNAP/lib/tcam-0:$SNAP/usr/lib/aarch64-linux-gnu/blas:$SNAP/usr/lib/aarch64-linux-gnu/lapack
          GST_PLUGIN_PATH: $SNAP/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$SNAP/home/ubuntu/mysnaps/snaps/parts/tis/install/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$SNAP/lib/tcam-0
          GST_PLUGIN_SYSTEM_PATH : $SNAP/usr/lib/aarch64-linux-gnu/gstreamer-1.0
          GST_PLUGIN_SCANNER: $SNAP/usr/lib/aarch64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner
          GI_TYPELIB_PATH: $SNAP/usr/lib/girepository-1.0:$SNAP/usr/lib/aarch64-linux-gnu/girepository-1.0


  stream:
      command: gst-launch-1.0 tcambin ! video/x-raw, format=GRAY8, width=640, height=480, framerate=60/1 ! videoconvert ! fbdevsink
      plugs: [camera,framebuffer]
      environment:
          LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/home/ubuntu/mysnaps/snaps/parts/tis/install/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$SNAP/lib/tcam-0
          GST_PLUGIN_PATH: $SNAP/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$SNAP/home/ubuntu/mysnaps/snaps/parts/tis/install/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$SNAP/lib/tcam-0
          GST_PLUGIN_SYSTEM_PATH : $SNAP/usr/lib/aarch64-linux-gnu/gstreamer-1.0
          GST_PLUGIN_SCANNER: $SNAP/usr/lib/aarch64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner

  iris-incuvers:
      command: flask run --host=0.0.0.0 #--port=80 --no-reload   
      daemon: simple
      restart-condition: always
      plugs: [home, network, network-bind]
      environment:
          LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/home/ubuntu/mysnaps/snaps/parts/tis/install/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$SNAP/lib/tcam-0:$SNAP/usr/lib/aarch64-linux-gnu/blas:$SNAP/usr/lib/aarch64-linux-gnu/lapack
          GST_PLUGIN_PATH: $SNAP/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$SNAP/home/ubuntu/mysnaps/snaps/parts/tis/install/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$SNAP/lib/tcam-0
          GST_PLUGIN_SYSTEM_PATH : $SNAP/usr/lib/aarch64-linux-gnu/gstreamer-1.0
          GST_PLUGIN_SCANNER: $SNAP/usr/lib/aarch64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner
          FLASK_APP: $SNAP/incuvers-iris/
          LC_ALL: C.UTF-8
          LANG: C.UTF-8
parts:
  tis:
    source-type: git
    source: https://github.com/TheImagingSource/tiscamera
    plugin: cmake
    #organize:
    #    src/data/uvc-extensions : usr/share/uvcdynctrl/data/199
    #stage:
    #    - usr/share/uvcdynctrl/data/199
    prime: ['*']
    #    override-pull: |  
        #ls $SNAP/usr/share/
        #mkdir $SNAP/usr/share/uvcdynctr
        #mkdir $SNAP/usr/share/uvcdynctr/data/
        #mkdir usr/share/uvcdynctrl
        #mkdir $SNAP/usr/share/uvcdynctrl/data
        #mkdir $SNAP/usr/share/uvcdynctrl/data/199e

#        snapcraftctl pull
#        pwd
#        ls
        #mkdir usr/share/uvcdynctrl/data/199e
        #pwd
        #ls
        #echo "=================="
        #  src/data/uvc-extensions/
        #cp src/data/uvc-extensions/*.xml $SNAP/usr/share/uvcdynctrl/data/199e
        #snapcraftctl stage
    build-packages:
            - gstreamer1.0-tools
            - git
            - g++
            - pkg-config
            - uuid-dev
            - libudev-dev
            - libgstreamer1.0-dev
            - libgstreamer1.0-0
            - libgstreamer-plugins-base1.0-dev
            - libglib2.0-dev
            - libgirepository1.0-dev
            - libusb-1.0-0-dev
            - libzip-dev
            - python3-setuptools
            - libusb-1.0-0
            - libgl1
            - libglvnd0
            - libglx0
            - libgpm2
            - libslang2
            - uvcdynctrl # needed to load up uvc extension units
    stage-packages:
            - gstreamer1.0-tools
            - libusb-1.0-0
            - libgstreamer1.0-0
            - libgstreamer1.0-dev
            - libgstreamer-plugins-base1.0-0
            - gstreamer1.0-plugins-good
            - gstreamer1.0-plugins-bad
            - liborc-0.4-0
            - libpcre2-8-0
            - udev
            - uvcdynctrl # needed for udev rules
    after:
        - python-stuff

#  uvc:
#    plugin: dump
#    source: ./parts/tis/src/data/uvc-extensions
#    stage:
#      - usb3.xml
#    after:
#      - tis

  python-stuff:
    plugin: python
    python-version: python3
    python-packages:
       [flask]
    stage-packages:
            - python3-distutils
            - python3-numpy
            - libatlas-base-dev
            - libatlas3-base
            - libblas3
            - liblapack3
            - python3-gi
            - python3-gst-1.0
            - gir1.2-gstreamer-1.0
            - gir1.2-gst-plugins-base-1.0

  incuvers-app:
    plugin: dump
    source: ./app
    after:
        - python-stuff

Thanks for the help!

The error indicates that a number of binaries included in your snap have been built against a newer version of glibc than the one available within the snap sandbox. This causes problems, since new versions of glibc often introduce new symbols that your application can end up depending on, breaking compatibility with the older glibc release.

In normal operation, Snapcraft should build your snap in a clean environment that matches the base you’ve chosen (either a VM using Multipass, or a container using LXD). Is there anything unusual about the way you built your snap?

Nothing unusual that I can think of. I posted my yaml file in the previous post if that helps.

I’m so new at this I don’t know if I would be aware of a non standard way of building it.

@jonyorker Can you share the snapcraft command you are using? Are you by chance attempting to use --destructive-mode? If so, can you try removing it and use LXD or multipass?

Just used sudo snapcraft

What’s your environment? sudo shouldn’t be necessary.

Can you share the output of
(1) export | grep SNAPCRAFT
(2) sudo bash -c export | grep SNAPCRAFT (as you are using sudo…)

Can you try invoking snapcraft with LXD build environment: snapcraft --use-lxd

If I try --use-lxd, I get this:

Error: no such option: --use-lxd

What does snapcraft version say ?

1 Like

snapcraft --version
snapcraft, version 2.43.1+18.10

snap list

Name                  Version                     Rev    Tracking     Publisher     Notes
core                  16-2.42.5                   8268   stable       canonicalâś“    core
core18                20200113                    1650   stable       canonicalâś“    base
gitkraken             6.4.1                       148    stable       gitkrakenâś“    -
gnome-3-28-1804       3.28.0-16-g27c9498.27c9498  110    stable/…     canonical✓    -
gnome-calculator      3.34.1+git1.d34dc842        544    stable/…     canonical✓    -
gnome-characters      v3.32.1+git3.b9120df        375    stable/…     canonical✓    -
gnome-logs            3.34.0                      81     stable/…     canonical✓    -
gnome-system-monitor  3.32.1-3-g0ea89b4922        123    stable/…     canonical✓    -
gtk-common-themes     0.1-28-g1503258             1440   stable/…     canonical✓    -
lxd                   3.18                        12631  stable/…     canonical✓    -
multipass             1.0.2                       1597   latest/beta  canonicalâś“    classic
snapcraft             3.9.7                       3943   stable       canonicalâś“    classic
sublime-text          3211                        85     stable       snapcrafters  classic
test-incuvers-iot-jy  1.03                        20     stable       jonyorker     -
ubuntu-image          1.8+snap1                   159    stable       canonicalâś“    classic

Ubuntu 19.04

You seem to be using snapcraft from the debian package, you should upgrade to snapcraft as a snap:

sudo apt remove snapcraft
sudo snap install snapcraft

Then try building your snap again.

2 Likes

That cleared it up!

Thanks for the help!