0

I'm trying to create a snap for Alacritty on ubuntu 20.04 x64. Creating an executable with cargo build --release works fine. Creating a snap using snapcraft gives error message:

note: /usr/bin/ld: cannot find Scrt1.o: No such file or directory
      /usr/bin/ld: cannot find crti.o: No such file or directory
      collect2: error: ld returned 1 exit status

error: aborting due to previous error
error: could not compile `libc`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
Failed to run '/root/.cargo/bin/cargo +stable build --release' for 'allacrity-source': Exited with code 101.
Verify that the part is using the correct parameters and try again.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

I have both of the mentioned libraries installed, Scrt1.o and crti.o. I went further and checked for their location and edited my ~/.profile to include export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib32:/usr/libx32:$LIBRARY_PATH. This never helped either. How can I solve this.

Amani
  • 16,245
  • 29
  • 103
  • 153

1 Answers1