Package Details: anki 24.06.2-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: 160
Popularity: 7.08
First Submitted: 2021-09-17 22:31 (UTC)
Last Updated: 2024-06-11 16:44 (UTC)

Required by (2)

Sources (7)

Latest Comments

« First ‹ Previous 1 .. 3 4 5 6 7 8 9 10 11 12 13 .. 29 Next › Last »

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.

Ugzuzg commented on 2023-05-20 21:15 (UTC)

@AlexBocken, this worked for me:

diff --git a/PKGBUILD b/PKGBUILD
index 794ce86..d269d05 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -81,7 +81,8 @@ build() {
     #use local binaries instead of downloading them as well for python and protoc
     export PYTHON_BINARY=$(which python)
     export PROTOC_BINARY=$(which protoc)
-    #export NODE_BINARY=$(which node) # does not yet compile
+    export NODE_BINARY=$(which node)
+    export YARN_BINARY=$(which yarn)

     ./tools/build
 }

AlexBocken commented on 2023-05-16 07:47 (UTC)

thanks for the headsup, for some reason i was under the believe that which was not in base-devel and didnt want to add another make dependency. Updated the PKGBUILD but won't be forcing rebuilds with a -2.