Snapcraft python build fails to run with `GLIBC_2.25' not found error message

Bug #1730208 reported by Manu Varkey
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Snapcraft
Confirmed
Undecided
Unassigned

Bug Description

While starting snap build using snapcraft python plugin, following error message is displayed.

/snap/gestimator/x1/usr/bin/python3: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /snap/gestimator/x1/usr/bin/python3)

App git: https://github.com/manuvarkey/GEstimator.git
Ubuntu Version: 17.10 (64 bit) (Fully updated)
Kernel: 4.13.0-16-generic
Snapcraft version: 2.34
Snap Version: 2.28.5+17.10

Contents of yaml file is as below:

name: gestimator
version: 1.1.0
summary: GEstimator is a simple civil estimation software written in Python and GTK+
description: |
  GEstimator is a simple civil estimation software written in Python and GTK+. GEstimator can prepare estimates along with rate analysis and supports multiple databases.

grade: devel
confinement: devmode

parts:
  gestimator:
    source: .
    plugin: python
    python-version: python3
    after: []
apps:
  gestimator:
    command: bin/GEstimator.py
    desktop: usr/share/applications/GEstimator.desktop

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Hey Manu, how do you have Snapcraft installed? This sounds like a problem that I believe has been fixed in master, but not yet released. Can you try installing the snap from edge and trying again?

    sudo snap install --edge snapcraft

Changed in snapcraft:
status: New → Incomplete
Revision history for this message
Manu Varkey (manuvarkey-gmail) wrote :
Download full text (15.0 KiB)

Installed snapcraft from edge. But the same error is being displayed. Terminal output is attached.

pced@pced-laptop:~$ snap refresh snapcraft --edge
snapcraft (edge) 2.35+git2.30f6268 from 'canonical' refreshed
pced@pced-laptop:~$ cd GEstimator/
pced@pced-laptop:~/GEstimator$ git pull origin master
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 5 (delta 4), reused 5 (delta 4), pack-reused 0
Unpacking objects: 100% (5/5), done.
From https://github.com/manuvarkey/GEstimator
 * branch master -> FETCH_HEAD
   5a4f390..db89c98 master -> origin/master
Updating 5a4f390..db89c98
Fast-forward
 estimator/view/schedule.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
pced@pced-laptop:~/GEstimator$ snapcraft
Preparing to pull gestimator
Get:1 http://archive.canonical.com/ubuntu artful InRelease [10.2 kB]
Get:2 http://archive.canonical.com/ubuntu artful/partner amd64 Packages [1616 B]
Get:3 http://archive.canonical.com/ubuntu artful/partner i386 Packages [1616 B]
Hit http://in.archive.ubuntu.com/ubuntu artful InRelease
Get:4 http://in.archive.ubuntu.com/ubuntu artful-updates InRelease [78.6 kB]
Get:5 https://deb.opera.com/opera-stable stable InRelease [2592 B]
Get:6 http://in.archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages [50.8 kB]
Get:7 https://deb.opera.com/opera-stable stable/non-free amd64 Packages [1823 B]
Get:8 http://in.archive.ubuntu.com/ubuntu artful-updates/main i386 Packages [50.8 kB]
Get:9 http://in.archive.ubuntu.com/ubuntu artful-updates/main Translation-en [23.3 kB]
Get:10 http://in.archive.ubuntu.com/ubuntu artful-updates/main amd64 DEP-11 Metadata [13.5 kB]
Get:11 http://in.archive.ubuntu.com/ubuntu artful-updates/main DEP-11 64x64 Icons [8171 B]
Get:12 http://in.archive.ubuntu.com/ubuntu artful-updates amd64 Contents (deb) [341 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu artful-updates i386 Contents (deb) [339 kB]
Get:14 http://in.archive.ubuntu.com/ubuntu artful-updates/restricted amd64 Packages [2204 B]
Get:15 http://in.archive.ubuntu.com/ubuntu artful-updates/restricted i386 Packages [2184 B]
Get:16 http://in.archive.ubuntu.com/ubuntu artful-updates/restricted Translation-en [1284 B]
Get:17 http://in.archive.ubuntu.com/ubuntu artful-updates/universe amd64 Packages [17.5 kB]
Get:18 http://in.archive.ubuntu.com/ubuntu artful-updates/universe i386 Packages [17.6 kB]
Get:19 http://in.archive.ubuntu.com/ubuntu artful-updates/universe Translation-en [10.9 kB]
Get:20 http://in.archive.ubuntu.com/ubuntu artful-updates/universe amd64 DEP-11 Metadata [11.8 kB]
Get:21 http://in.archive.ubuntu.com/ubuntu artful-updates/universe DEP-11 64x64 Icons [15.9 kB]
Get:22 http://in.archive.ubuntu.com/ubuntu artful-updates/multiverse amd64 Packages [1844 B]
Get:23 http://in.archive.ubuntu.com/ubuntu artful-updates/multiverse i386 Pa...

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Ah, the description implies this happens at build time, but it actually happens at run time. I believe the issue here is that you're building on 17.10, which has a newer libc than Xenial, which is what you run against. Is there a reason you're building on 17.10? If not, you can run `snapcraft cleanbuild`, which will spin up a Xenial lxd container for building, or otherwise run Snapcraft on Xenial.

Revision history for this message
Manu Varkey (manuvarkey-gmail) wrote :

That solves it! Now the snap runs without the GLIBC error. A 'Namespace Gtk not available' error is showed, but its a different issue with building against Gtk that I have to look into.

The requirement that you have to build the snap against Xenial is not mentioned anywhere in the snapcraft tutorials. The tutorials may need updating or am I missing something ?

Revision history for this message
Jonathan White (droidmonkey) wrote :

Agree with Manu on this issue, the platform that you build your snap on should not matter one bit. The whole point of running a snap is portability. Snapcraft should not even allow you to build on 17.10 without using cleanbuild if this is an issue!

Changed in snapcraft:
status: Incomplete → Confirmed
Javad Shafique (javadsm)
no longer affects: ubuntu
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.