Thank you very much for your help, folks!
Following your suggestions i removed the call to apt-get install -y ...
from override-build
and switched from stage-packages:
to build-packages
, may i ask what is the difference between the last two?
name: tinmop # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
apps:
tinmop:
command: bin/tinmop
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
parts:
my-part:
# See 'snapcraft plugins'
plugin: autotools
source: "https://codeberg.org/cage/tinmop.git"
source-type: "git"
build-packages:
- sbcl
- gettext
- gettext-base
- libgettextpo-dev
- libgettextpo0
- man-db
- gpg
- curl
- openssl
- gcc
- git
- tk
- imagemagick
- xdg-utils
- unzip
- file
- libssl3
- libssl-dev
- libncursesw6
- libncurses-dev
- libsqlite3-0
- libsqlite3-dev
- libturbojpeg
- libturbojpeg0-dev
- libsdl2-dev
- libsdl2-2.0-0
# - pkg-config
- pkgconf
override-build: |
./configure --prefix=/usr/
bash quick_quicklisp.sh --do-not-prompt
make
make install
Regarding the -dev
library packages, they are needed because the lisp libraries that wrap the C libraries try to get information about typedef or struct from the header file and try to map them to lisp code (maybe i can safely remove the gettext related ones, though).
Anyway the compilation works fine but i still get an error, i attached what i believe are the relevant parts of the log below:
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.813 :: /usr/bin/mkdir -p '/usr/bin'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.816 :: /usr/bin/install -c tinmop '/usr/bin'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.930 :: /usr/bin/mkdir -p '/usr/etc/tinmop'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.933 :: /usr/bin/install -c -m 644 etc/init.lisp etc/default-theme.conf etc/shared.conf etc/shared-gui.conf '/usr/etc/tinmop'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.936 :: /usr/bin/mkdir -p '/usr/share/doc/tinmop'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.940 :: /usr/bin/install -c -m 644 README.org LICENSES.org CONTRIBUTING.org doc/tinmop.org doc/send-toot.lisp NEWS.org ChangeLog AUTHORS '/usr/share/doc/tinmop'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.944 :: /usr/bin/mkdir -p '/usr/share/man/man1'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.947 :: /usr/bin/install -c -m 644 'doc/tinmop.man' '/usr/share/man/man1/tinmop.1'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.951 :: /usr/bin/mkdir -p '/usr/share/tinmop'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.955 :: /usr/bin/mkdir -p '/usr/share/tinmop/data/modules'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.955 :: /usr/bin/install -c -m 644 data/modules/delete-by-regex.lisp data/modules/expand-abbrev-command-window.lisp data/modules/fetch-expired-poll.lisp data/modules/next-previous-open.lisp data/modules/rewrite-message-urls.lisp data/modules/share-gemini-link.lisp '/usr/share/tinmop/data/modules'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.965 :: /usr/bin/mkdir -p '/usr/share/tinmop/data/error-pages'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.966 :: /usr/bin/install -c -m 644 data/error-pages/51 data/error-pages/header-51.png '/usr/share/tinmop/data/error-pages'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.968 :: /usr/bin/mkdir -p '/usr/share/tinmop/data/icons'
2024-04-17 16:02:38.495 :: 2024-04-17 16:02:28.968 :: /usr/bin/install -c -m 644 data/icons/fmw_arrow-down.png data/icons/fmw_arrow-up.png data/icons/fmw_back.png data/icons/fmw_bullet-go.
[...]
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.173 Staging my-part
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.214 execute action my-part:Action(part_name='my-part', step=Step.STAGE, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.234 Priming my-part
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.234 execute action my-part:Action(part_name='my-part', step=Step.PRIME, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.253 patch_elf: not enabled for part 'my-part'
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.257 Extracting and updating metadata...
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.277 Copying snap assets...
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.280 finalize icon: None
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.281 relative icon path: None
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.281 Generating snap metadata...
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.304 Generated snap metadata
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.307 Reading snap metadata...
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.312 Running linters...
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.314 Running linter: classic
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.332 Running linter: library
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.389 pack_snap: output=None, compression='xz'
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.389 pack_snap: check skeleton
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.431 Creating snap package...
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.432 Pack command: ['snap', 'pack', '--filename', 'tinmop_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.442 Command '['snap', 'pack', '--filename', 'tinmop_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1.
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.443 Detailed information: 2024/04/17 16:02:30.438442 container.go:215: in snap "tinmop": path "bin" does not exist
2024-04-17 16:02:38.496 :: 2024/04/17 16:02:30.438505 container.go:215: in snap "tinmop": path "bin/tinmop" does not exist
2024-04-17 16:02:38.496 :: error: cannot pack "/root/prime": snap is unusable due to missing files
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.447 Traceback (most recent call last):
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.447 File "/snap/snapcraft/11040/lib/python3.10/site-packages/snapcraft/pack.py", line 137, in pack_snap
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.447 proc = subprocess.run(
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.447 File "/snap/snapcraft/11040/usr/lib/python3.10/subprocess.py", line 526, in run
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.447 raise CalledProcessError(retcode, process.args,
2024-04-17 16:02:38.496 :: 2024-04-17 16:02:30.447 subprocess.CalledProcessError: Command '['snap', 'pack', '--filename', 'tinmop_0.1_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1.
2024-04-17 16:02:38.497 Executing on host: lxc --project snapcraft config device show local:snapcraft-tinmop-on-amd64-for-amd64-391742
2024-04-17 16:02:38.560 Executing on host: lxc --project snapcraft config device remove local:snapcraft-tinmop-on-amd64-for-amd64-391742 disk-/root/project
2024-04-17 16:02:39.118 Executing on host: lxc --project snapcraft stop local:snapcraft-tinmop-on-amd64-for-amd64-391742
2024-04-17 16:02:44.497 Failed to execute pack in instance.
2024-04-17 16:02:44.507 Traceback (most recent call last):
2024-04-17 16:02:44.507 File "/snap/snapcraft/11040/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 482, in _run_in_provider
2024-04-17 16:02:44.507 instance.execute_run(cmd, check=True, cwd=output_dir)
2024-04-17 16:02:44.507 File "/snap/snapcraft/11040/lib/python3.10/site-packages/craft_providers/lxd/lxd_instance.py", line 293, in execute_run
2024-04-17 16:02:44.507 return self.lxc.exec(
2024-04-17 16:02:44.507 File "/snap/snapcraft/11040/lib/python3.10/site-packages/craft_providers/lxd/lxc.py", line 387, in exec
2024-04-17 16:02:44.507 return runner(final_cmd, timeout=timeout, check=check, **kwargs)
2024-04-17 16:02:44.507 File "/snap/snapcraft/11040/usr/lib/python3.10/subprocess.py", line 526, in run
2024-04-17 16:02:44.507 raise CalledProcessError(retcode, process.args,
2024-04-17 16:02:44.507 subprocess.CalledProcessError: Command '['lxc', '--project', 'snapcraft', 'exec', 'local:snapcraft-tinmop-on-amd64-for-amd64-391742', '--cwd', '/root/project', '--', 'env', 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin', 'SNAPCRAFT_MANAGED_MODE=1', 'DEBIAN_FRONTEND=noninteractive', 'DEBCONF_NONINTERACTIVE_SEEN=true', 'DEBIAN_PRIORITY=critical', 'snapcraft', 'pack', '--verbosity=brief', '--build-for', 'amd64']' returned non-zero exit status 1.