Package Details: anki 25.02-1

Git Clone URL: https://aur.archlinux.org/anki.git (read-only, click to copy)
Package Base: anki
Description: Helps you remember facts (like words/phrases in a foreign language) efficiently
Upstream URL: https://apps.ankiweb.net/
Keywords: anki languages learning vocabulary
Licenses: AGPL3
Conflicts: anki-bin, anki-git, anki-qt5
Submitter: demize
Maintainer: AlexBocken
Last Packager: AlexBocken
Votes: 190
Popularity: 6.12
First Submitted: 2021-09-17 22:31 (UTC)
Last Updated: 2025-02-22 13:26 (UTC)

Latest Comments

« First ‹ Previous 1 .. 5 6 7 8 9 10 11 12 13 14 15 .. 31 Next › Last »

AlexBocken commented on 2023-05-29 18:07 (UTC)

@asdrubalivan Not at all familiar with how manjaro holds packages back compared to arch. Your build is currently failing at the cargo fetch step so I'm assuming your default stable is not 1.69.0 as on arch maybe?

Could you delete line 95 in the PKGBUILD (sed -i ... rust-toolchain.toml) and let me know whether that allows you to makepkg -o? (I guess should all be in /var/tmp/pamac-build-asdru/anki according to your log.

Otherwise maybe someone else here is more familiar how Manjaro works and could comment.

asdrubalivan commented on 2023-05-29 13:31 (UTC)

Hello, I'm getting the following errors right now when trying to build Anki

  -> Extracting anki-2.1.64.tar.gz with bsdtar
  -> Extracting anki-core-i18n-150aac792e07cfeeea50202b50c226c0fa4b32e2.tar.gz with bsdtar
  -> Extracting anki-desktop-ftl-e2d2a9ebfaa83ff648063bd95140546179e7471b.tar.gz with bsdtar
==> Starting prepare()...
patching file qt/aqt/update.py
patching file pylib/tools/hookslib.py
patching file build/configure/src/python.rs
patching file build/ninja_gen/src/git.rs
patching file build/runner/src/build.rs
error: failed to load manifest for workspace member `/var/tmp/pamac-build-asdru/anki/src/anki-2.1.64/rslib`

Caused by:
  failed to parse manifest at `/var/tmp/pamac-build-asdru/anki/src/anki-2.1.64/rslib/Cargo.toml`

Caused by:
  invalid type: map, expected a sequence for key `package.authors`
==> ERROR: A failure occurred in prepare().
    Aborting...

Using 6.2.16-1-MANJARO

AlexBocken commented on 2023-05-24 11:27 (UTC)

thanks for the catch, updated

0x9fff00 commented on 2023-05-24 11:23 (UTC)

sed -i 's/channel = [0-9\.]*$/channel = "stable"/' rust-toolchain.toml should be changed to sed -i 's/channel = "[0-9\.]*"$/channel = "stable"/' rust-toolchain.toml because the version number is in quotes. Currently it does nothing so the package still builds with 1.68.2

AlexBocken commented on 2023-05-24 10:04 (UTC) (edited on 2023-05-24 10:04 (UTC) by AlexBocken)

With 2.1.64 I gave the PKGBUILD a major overhaul to install a bit cleaner. A great help for this was GitHub user 'antecrescent' with his gentoo PR: https://github.com/gentoo/gentoo/pull/31122

Major changes:

  • major overhaul. All fetching is now done in prepare() the latest. build() can be run offline
  • moved back to tarballs, patching .git folder manually
  • all typecheck/formatting dependencies are stripped out as this is only required for development
  • pip-sync is masked during build as we provide dependencies ourselves
  • we use the most recent stable rust toolchain in the build
  • yarn and cargo store their cache in $srcdir, a yay/paru -Sc will now more reliably reset the build environment

AlexBocken commented on 2023-05-21 16:39 (UTC)

@adriantsai As the error clearly states, you couldn't compile due to a connection timeout for your dependency fetching. This might be a temporary outage upstream for the node repo or your internet connection got interrupted. Try again. If unsure, please clean your cache via yay -Sc (defaults are good)

adriantsai commented on 2023-05-21 15:49 (UTC) (edited on 2023-05-21 15:49 (UTC) by adriantsai)

Package failed to compile due to node dependencies.

warning " > svelte2tsx@0.4.14" has incorrect peer dependency "typescript@^4.1.2".
error /home/adrian/.cache/yay/anki/src/anki/node_modules/dprint: Command failed.
Exit code: 1
Command: node ./install.js
Arguments: 
Directory: /home/adrian/.cache/yay/anki/src/anki/node_modules/dprint
Output:
Error downloading dprint zip file.

Error [ERR_SOCKET_CONNECTION_TIMEOUT]: Socket connection timeout

[10/68; 1 active; 136.242s] rslib/i18n
ninja: build stopped: subcommand failed.

Build failed.
==> ERROR: A failure occurred in build().
    Aborting...

AlexBocken commented on 2023-05-21 12:46 (UTC)

@mrsrd0 Thanks for reporting! A bit odd as it should build in a clean chroot and compiled for me on two separate machines/setups as well. As always, please ensure that base-devel is installed and in doubt delete various .cache folders: .cache/yarn, .cache/yay/anki, .cache/pip, ~/.rustup.

If the error persists please provide more information about your particular setup. (any packages held back? special version of rust/node?) Alternatively, you could always use build-scripts such as extra-x86_64-build from devtools (execute in .cache/yay/anki) to build in a clean chroot and install afterwards via pacman -U <anki.zst>

msrd0 commented on 2023-05-21 12:16 (UTC)

The package fails to compile for me

     Running `out/rust/debug/configure`
[0/68; 1 active; 0.000s] qt/aqt:data/qt/icons:from_src
[0/68; 2 active; 0.000s] qt/aqt:data/web/imgs
[0/68; 3 active; 0.000s] qt/aqt:py.typed
[0/68; 4 active; 0.001s] node_modules
[0/68; 5 active; 0.001s] build:configure
[0/68; 6 active; 0.001s] ftl:repo:core
[0/68; 7 active; 0.001s] pyenv
[4/68; 4 active; 3.031s] ftl:repo:qt
[5/68; 4 active; 4.857s] build:run_configure
ninja: job failed: /home/msrd0/.cache/yay/anki/src/anki/out/rust/debug/runner run /home/msrd0/.cache/yay/anki/src/anki/out/rust/debug/configure "&&" ninja -f /home/msrd0/.cache/yay/anki/src/anki/out/build.ninja -t cleandead
Command failed:

ninja: unknown tool 'cleandead'

ninja: subcommand failed

Build failed.
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: anki-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
anki - exit status 4

AlexBocken commented on 2023-05-21 11:30 (UTC) (edited on 2023-05-21 11:33 (UTC) by AlexBocken)

Thank you very much for the help, @Ugzuzg !

Additionally to now using local node/yarn I have added the following:

  • As I wanted this package to build with link time optimization (LTO) I have forced the build to use mold for now.

  • rust packages are built with opt-level = 3 as to my knowledge, not opt-level = 1 as previously given by the anki devs.

  • rust packages are fetched in prepare(), not build(), for a cleaner install process as recommended by the Rust package guidelines.