snapcrafters / sommelier-core

Package a Windows application for Linux using a Snap with Wine.
MIT License
30 stars 10 forks source link

[Bug]: Sommelier makefile build fails to compile the a86 bindtextdomain on amd64 against core20 #31

Closed lucyllewy closed 2 years ago

lucyllewy commented 2 years ago

What happened?

I am updating a snap I package to Core20 which has been using sommelier-core for some time. After switching base: to core20 the build repeatedly fails when compiling the x86 variant of bindtextdomain.so on an amd64 build.

What should have happened?

The sommelier makefile should successfully compile bindtextdomain.so

Output of snap info $snap_name

N/A - this is at build time.

Output of snap connections $snap_name

N/A - this is at build time.

Output of snap version

snap    2.55.3+22.04ubuntu1
snapd   2.55.3+22.04ubuntu1
series  16
ubuntu  22.04
kernel  5.15.0-25-generic

Relevant log output

No response

Teminal output of app

$ snapcraft  --use-lxd
Launching a container.
Skipping pull gnome-3-38-extension (already ran)
Skipping pull sommelier-core (already ran)
Skipping build gnome-3-38-extension (already ran)
Building sommelier-core 
+ snapcraftctl build
+ make -j16
# Build the 32-bit version of the bindtextdomain patch. This patch
# makes it easier for applications to find gettext translations shipped
# by snaps. 
#
# The Gnome extensions only compile the library for 64-bit arch. 
sudo apt-get -y install libc6-dev-i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6-dev-i386 is already the newest version (2.31-0ubuntu9.7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sudo apt-get -y install gcc-multilib
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc-multilib is already the newest version (4:9.3.0-1ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mkdir -p i386-linux-gnu
gcc -m32 -Wall -O2 -o i386-linux-gnu/bindtextdomain.so -fPIC -shared /snap/snapcraft/current/share/snapcraft/extensions/desktop/src/bindtextdomain.c -ldl
/snap/gnome-3-38-2004-sdk/current/usr/bin/ld: skipping incompatible /snap/gnome-3-38-2004-sdk/130/usr/bin/../lib/gcc/x86_64-linux-gnu/9/libgcc.a when searching for -lgcc
/snap/gnome-3-38-2004-sdk/current/usr/bin/ld: cannot find -lgcc
/snap/gnome-3-38-2004-sdk/current/usr/bin/ld: skipping incompatible /snap/gnome-3-38-2004-sdk/130/usr/bin/../lib/gcc/x86_64-linux-gnu/9/libgcc.a when searching for -lgcc
/snap/gnome-3-38-2004-sdk/current/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
make: *** [Makefile:17: build] Error 1
Failed to build 'sommelier-core'.