"Undefined symbol: g_date_copy" Problem


#1

Hello friends,

I have installed GitHub Desktop on Elementary OS.

But when I run it I get the following error.

tolga@tolga-EOS:~$ github-desktop 
/snap/github-desktop/63/app/github-desktop: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: g_date_copy

Can you help me?


#2

This sounds like a bug in the snap. The github-desktop snap uses classic confinement, so it can see the host system’s file system. This usually means it needs to be compiled in a way that it will pick bundled libraries in preference to the host system libraries, and that appears that hasn’t happened here.

In this particular case either github-desktop or a host system library it has loaded is trying to use the g_date_copy symbol, but the libglib-2.0.so.0 it has loaded doesn’t provide it. According to the docs, the symbol was added in 2.56.


#3

here also met the same problem on ubuntu 18.04


#4

Looking at the actual snap, it seems to include libglib-2.0.so.0 version 2.48.2.

It doesn’t include libgobject-2.0.so.0 though, despite it being needed by the github-desktop executable:

$ objdump -x app/github-desktop | grep libgobject
  NEEDED               libgobject-2.0.so.0

As a classic snap, it then picks the library from the host system. That library happens to use the g_date_copy symbol that doesn’t exist in the bundled libglib-2.0.so.0 and things explode.

CC’ing @popey and @Wimpress since this snap is published by snapcrafters. Is this something you guys worked on?


#5

Firstly thank you for your interest.

Can we create a solution in this scenario?


#6

This isn’t really something that a user can easily fix. It is up to the snap author to ensure their snap ships all the libraries it depends on.


#7

I get it, thank you very much.