zhsj
March 30, 2023, 10:34am
1
The go snap fails to build on riscv64.
The build log is at https://launchpad.net/~go-snap-maintainers/+snap/go120/+build/2067566
The relevant part is
Cannot pack snap file: Command '['snap', 'pack', '--filename', 'go_1.20.2_riscv64.snap', '--compression', 'xz', PosixPath('/build/go/prime'), PosixPath('/build/go')]' returned non-zero exit status 20. (error: cannot pack "/build/go/prime": mksquashfs call failed: libgcc_s.so.1 must be installed for pthread_cancel to work)
I assume the mksquashfs
command is from the snapcraft snap (or snapd snap?)? So itās broken by missing libgcc_s.so.1?
Has anyone successfully built snaps with core22 on riscv64?
ogra
March 30, 2023, 11:19am
2
Have you tried simply adding libgcc (probably with an architecture flag for riscv64) to your build-packages to work around the blocker for the moment?
zhsj
March 30, 2023, 11:34am
3
I think itās already there. I have build-essential in build-packages. It should brings libgcc-s1.
And I can see libgcc-s1 is in the build log.
1 Like
@mvo care to look into this?
zhsj
April 3, 2023, 6:21am
5
itās already fixed 6 month ago, but not released in riscv64 branch.
ref:
snapcore:master-riscv64
ā mvo5:riscv-libgcc-s1
opened 02:26PM - 10 Oct 22 UTC
snapcore:beta-riscv64
ā xnox:merging-release-2.58-into-beta-riscv64
opened 03:57PM - 04 Mar 23 UTC
zhsj
April 3, 2023, 8:02am
6
Actually libgcc_s1 is in snapdās snap
$ sudo find /snap/snapd/ -name libgcc_s.so.1
/snap/snapd/18440/lib/libgcc_s.so.1
/snap/snapd/18331/lib/libgcc_s.so.1
but the execution doesnāt include /lib path
ubuntu 1105 97.8 7.4 349004 73152 ttyS0 Sl+ 07:47 4:35 \_ /snap/snapd/current/lib/riscv64-linux-gnu/ld-2.31.so --library-path /snap/snapd/current/usr/local/lib:/snap/sn
apd/current/usr/local/lib/riscv64-linux-gnu:/snap/snapd/current/lib/riscv64-linux-gnu:/snap/snapd/current/usr/lib/riscv64-linux-gnu /snap/snapd/current/usr/bin/mksquashfs . /home/ubuntu/go-
snap/prime/go_1.20.2_amd64.snap -noappend -comp xz -no-fragments -no-progress -wildcards -ef /tmp/.snap-pack-exclude-704354971 -all-root -no-xattrs
mvo
April 6, 2023, 4:40pm
7
I merged xnox branch in https://github.com/snapcore/snapd/pull/12616 and triggered a new build, hopefully that fixes the issue. Fwiw, in āedgeā the problem is fixed so hopefully that is enough.
zhsj
April 7, 2023, 9:05am
8
@mvo sadly it fails to buildā¦ (not sure why apparmor part is dropped in beta-riscv64 branchā¦ accident?)
The snapcraft.yaml in riscv64 branch is almost same with release branch, and the difference is guarded by riscv64 conditionā¦ so maybe itās time to merge back?
Hi zhsj ,
The build works after another merge from mvo on 12 April.