The GLIBC version of the targeted core is 2.2x. A newer libc will be required for the following files:

Hi, i tried to make snap. This works fine but i have the following warning :

"
The GLIBC version of the targeted core is 2.27. A newer libc will be required for the following files:

  • /home/stan/mysnaps/caprice32/prime/usr/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1.0.0 (requires GLIBC 2.28)
    " with core18 (Bionic)
    Same this with older libc with default core (16 - Xenial)

Seems libdrm_amdgpu package needs newer libc6 than snapcraft core.
Tried sevral configuration (core and core18 (target)), add/remove stage-packages (libc6, libc6-dev, libdrm…) and do snapcrapt snapcraft clean xxxxx -s pull, snapcraft cleanbuild, snapcraft each time but warnings still rest.

OS of my machine is 64bits Ubuntu Cosmix (18.10) and Brix (with display chipset integrate to motherboard).

Any can help me ?

My log :

Building launcher
Skipping stage desktop-qt5 (already ran)
Staging caprice32
Staging launcher
Priming desktop-qt5
warning: working around a Linux kernel bug by creating a hole of 4096 bytes in ‘/tmp/tmpmv88ez5e’
warning: working around a Linux kernel bug by creating a hole of 8192 bytes in ‘/tmp/tmpc8oe8d16’
warning: working around a Linux kernel bug by creating a hole of 4096 bytes in ‘/tmp/tmpc7v_6kxd’
warning: working around a Linux kernel bug by creating a hole of 4096 bytes in ‘/tmp/tmpm1x0xu2r’
Priming caprice32
The GLIBC version of the targeted core is 2.27. A newer libc will be required for the following files:

  • /home/stan/mysnaps/caprice32/prime/usr/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1.0.0 (requires GLIBC 2.28)
    warning: working around a Linux kernel bug by creating a hole of 4096 bytes in ‘/tmp/tmpnq0voei3’
    warning: working around a Linux kernel bug by creating a hole of 8192 bytes in ‘/tmp/tmp5q82_l8m’
    warning: working around a Linux kernel bug by creating a hole of 4096 bytes in ‘/tmp/tmpqvqpbun6’
    warning: working around a Linux kernel bug by creating a hole of 319488 bytes in ‘/tmp/tmpn7daidfq’
    warning: working around a Linux kernel bug by creating a hole of 4096 bytes in ‘/tmp/tmpc_yk3_1z’
    Priming launcher
    Snapping ‘caprice32’ |
    Snapped caprice32_4.5.0_amd64.snap

Sample of my snapcraft.yaml

name: caprice32
version: ‘4.5.0’

summary: Amstrad CPC emulator
description: |
Caprice32 AMSTRAD CPC 464/664/6128 emulator.

#use snap core of Ubuntu 18.04 Bionic
base: core18

#grade: devel,stable
grade: stable
#confinement: devmode,classic,strict
confinement: strict

architectures: [amd64]
type: app

#command exposition from outside of the snap
apps:
launcher:
#launcher for cap32 binary
command: bin/caprice32-launch
#desktop application menu shortcut
desktop: usr/share/applications/caprice32.desktop
#define interfaces for confinement
plugs: [desktop, desktop-legacy, wayland, x11, opengl, home, pulseaudio, joystick, raw-usb, removable-media, network, network-bind]

#order of snap creation step : pull > build > stage > prime > snap
#build application parts
parts:
#build caprice32 from sources with snapcraft make plugin
caprice32:
source: https://github.com/ColinPitrat/caprice32.git
source-tag: ‘v4.5.0’
plugin: make
artifacts : [cap32,cap32.cfg,rom,resources,doc]
after:
- desktop-qt5
stage-packages:
- libc6-dev
- libc6
- libslang2
- libflac8
- libx11-6
- libxext6
- libasound2
- libasyncns0
- libcaca0
- libgl1
- libglu1-mesa
- libxi6
- libfreetype6
- libpulse0
- libsdl1.2debian
- freeglut3
organize:
‘cap32’: bin/cap32
‘cap32.cfg’ : etc/cap32.cfg
rom/: usr/share/caprice32/rom/
resources/
: usr/share/caprice32/resources/

#add specific files to use caprice32 as lambda user
launcher:
source: ./snap/
plugin: dump
organize:
#wrapper to use cap32 binary as user
‘caprice32-launch’: bin/caprice32-launch
#setting file to display desktop application menu
‘caprice32.desktop’: usr/share/applications/caprice32.desktop
#logo 256x256px for desktop application menu
‘caprice32.png’: usr/share/applications/caprice32.png

#add QT5 part to launch Caprice32 from desktop application menu
desktop-qt5:
stage-packages:
- libc6-dev
- libc6

You should build the snap on the same distribution release as the base snap, in this case it is Ubuntu 18.04.

Build it on a 18.04 LXD container or a VM.

1 Like

Thanks ! Great idea ! i think this can solve the problem.

I’m going to test it, then come back here to report if it.

Just did my snap file !

Works perfect : i use virtual machine Ubuntu Xenial 16.04 with standard snacraft core (not core18).
No error or working left. Every modes (devmode/classic/strict) are ok.

Thanks a lot !