Webdm not working with 64bits Kernel and 32bits User Space: "$plat_abi=aarch64-linux-gnu" & "/snap/webdm/current/bin arm-linux-gnueabihf"

Bug #1597845 reported by Pedro Coca
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapweb
Incomplete
Undecided
Unassigned

Bug Description

Webdm not working with 64bits Kernel and 32bits User Space: "$plat_abi=aarch64-linux-gnu" & "/snap/webdm/current/bin arm-linux-gnueabihf"

root@localhost:~# uname -i
aarch64

root@localhost:~# ls /snap/webdm/current/bin
arm-linux-gnueabihf

root@localhost:~# cat /snap/webdm/current/snappyd | grep exec
exec $SNAP/bin/$plat_abi/snappyd

=====================================================================

root@localhost:~# cat /snap/webdm/current/snappyd
#!/bin/sh
set -e

platform=$(uname -i)

case $platform in
    x86_64)
        plat_abi=x86_64-linux-gnu
        ;;
    armv7l)
        plat_abi=arm-linux-gnueabihf
        ;;
    aarch64)
        plat_abi=aarch64-linux-gnu
        ;;
    *)
        echo "unknown platform for snappy-magic: $platform. remember to file a bug or better yet: fix it :)"
        ;;
esac

exec $SNAP/bin/$plat_abi/snappyd

# never reach this
exit 1

=====================================================================

so
$plat_abi = aarch64-linux-gnu
and
/snap/webdm/current/bin contains arm-linux-gnueabihf

Revision history for this message
Steven Wilkin (stevenwilkin) wrote :

This is possibly due to the wrong version of the snap being uploaded to the store for the architecture or a problem with how `snap install` determines the architecture.

Could you try building from source and seeing if the resulting arm64 snap works? The project is now located here:

https://github.com/snapcore/snapweb

I've also a branch which uses `snapcraft` to construct the snap which may be more useful:

https://github.com/snapcore/snapweb/tree/snapcraft

Revision history for this message
Michael Vogt (mvo) wrote :

What version of snappy/snapd is used for this?

Could you please paste the output of:
$ snap list

I think the wrapper script is actually wrong here, it should not check the kernel (uname -i) but instead the go architecture. With the latest code where we do not use a "fat" binary we should probably just change the build script.
In the meantime `dpkg --print-architecture` (while we still have it) might be enough.
Thanks,
 Michael

Changed in webdm:
status: New → Incomplete
Revision history for this message
Yann Sionneau (yann-sionneau) wrote :

Yes exactly, the issue is the wrapper script which checks the kernel arch instead of the user space one.
root@localhost:~# dpkg --print-architecture
armhf
root@localhost:~# uname -i
aarch64

Changed in webdm:
status: Incomplete → New
Revision history for this message
Yann Sionneau (yann-sionneau) wrote :

In fact I think we should use SNAP_ARCH environment variable.

Revision history for this message
Steven Wilkin (stevenwilkin) wrote :

I've a work-in-progress PR open to use Snapcraft to build the snap. It removes all cross-building concerns from this project with the intention that the Launchpad build farm will build for all supported architectures and upload to the store on the edge channel automatically.

Changed in snapweb:
status: New → Confirmed
Revision history for this message
Jamie Bennett (jamiebennett) wrote :

There have been changes to the build script lately, can you please retest with the latest version of snapweb?

Changed in snapweb:
status: Confirmed → Incomplete
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.