Package Details: anki-git r11208.b7cb0c0d0-1

Git Clone URL: https://aur.archlinux.org/anki-git.git (read-only, click to copy)
Package Base: anki-git
Description: Helps you remember facts (like words/phrases in a foreign language) efficiently
Upstream URL: hhttps://apps.ankiweb.net/
Keywords: anki memorise memory study
Licenses: AGPL3
Conflicts: anki, anki-official-binary-bundle, anki20
Provides: anki
Submitter: degeberg
Maintainer: DarkShadow44
Last Packager: DarkShadow44
Votes: 25
Popularity: 0.000276
First Submitted: 2017-02-12 11:51 (UTC)
Last Updated: 2024-08-29 18:32 (UTC)

Latest Comments

1 2 3 4 5 6 .. 12 Next › Last »

hmry commented on 2024-10-31 13:20 (UTC)

For those getting linker errors during the Rust build, like error adding symbols: file format not recognized: Try adding this to the build() section of the PKGBUILD, underneath the other compiler env var exports:

export RUSTFLAGS="-Clink-args=-fuse-ld=lld -Ctarget-cpu=native"

DarkShadow44 commented on 2024-05-24 20:33 (UTC) (edited on 2024-05-24 20:34 (UTC) by DarkShadow44)

I have the same issue (as of 2024-05-24, up-to-date system). I found a thread here, and downgrading Linux to 6.8.9 helped.

hearth commented on 2024-05-24 11:04 (UTC)

Having trouble building this again lately. I don't think it is a python issue this time. I've tried clearing out the yarn and bazel caches with no luck. Asking here before opening a git issue in case the solution is bleedingly obvious.

FAILED: /tmp/makepkg/anki-git/src/anki/out/node_modules/.marker ... very long so redacted
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["string-width@^4.1.0"] is trying to unpack in the same destination "/home/hearth/.cache/yarn/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
warning svelte-preprocess@5.1.3: The engine "pnpm" appears to be invalid.
[3/4] Linking dependencies...
warning " > esbuild-sass-plugin@2.16.1" has incorrect peer dependency "esbuild@^0.19.4".
[4/4] Building fresh packages...
error /tmp/makepkg/anki-git/src/anki/node_modules/vite/node_modules/esbuild: Command failed.
Exit code: 126
Command: node install.js
Arguments: 
Directory: /tmp/makepkg/anki-git/src/anki/node_modules/vite/node_modules/esbuild
Output:
/bin/sh: /tmp/yarn--1716547874268-0.043145118609238864/node: /bin/sh: bad interpreter: Text file busy
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Failed with code Some(126): /tmp/makepkg/anki-git/src/anki/out/extracted/node/bin/yarn install
ninja: build stopped: subcommand failed.

Build failed.
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'anki-git-r10935.eb597475c-1': 
error: packages failed to build: anki-git-r10935.eb597475c-1

elimik31 commented on 2024-04-05 16:50 (UTC)

Seems the hard requirement of pip_system_certs was removed in Anki PR #3114, with the reasoning:

"This dependency usually doesn't benefit Linux distros with requests library configured to use system certificate already."

I didn't test yet building the latest commit without pip_system_certs, just saw the git log message. If the requests library is actually configured as described in the PR, then maybe the dependency can be removed.

DarkShadow44 commented on 2024-03-11 02:53 (UTC)

Thanks, that's a dependency of python-pip-system-certs - I added that.

Eol commented on 2024-03-10 11:48 (UTC) (edited on 2024-03-10 11:48 (UTC) by Eol)

Maybe python-wrapt is also a dependency. After installation, anki failed to start with the error pip_system_certs: ERROR: could not register module: No module named 'wrapt'. Fixed after installing python-wrapt.

elimik31 commented on 2024-03-05 20:39 (UTC) (edited on 2024-03-05 21:02 (UTC) by elimik31)

@hearth You have Python packages installed in ~/.local/lib/python3.11, which often breaks system packages. This is why normally it's not recommended to use pip to install local system packages except in virtual environments. For system packages you should always use pacman or the AUR. Admittedly, until earlier today pip_system_certs was not available in the AUR, so personally I had used pip install --break-system-packages ..., but I knew the risk and what to do if conflicts happen.

Now, python-pip-system-certs is in the AUR thanks to @hearth. You could install it from there but the latest version of anki-git requires it automatically, so there is nothing more you should do, except the following: My recommendation would be to uninstall all locally installed Python packages, either via

pip freeze | xargs pip uninstall -y

or just by nuking the local python directories:

# you can also use rm -rf, here I use mv so that you can revert the "deletion" 
mv ~/.local/lib/python3.11 ~/.local/lib/python3.11_to_delete

And then just install the latest version of anki-git from the AUR.

DarkShadow44 commented on 2024-03-05 19:34 (UTC)

@elimik31 Thanks, pushed an update.

@hearth Sorry, I can't reproduce this. Is your system full up to date, and did you do a clean build of anki? If so, how exactly do you reproduce this issue?

hearth commented on 2024-03-05 18:03 (UTC)

@elimik31 thanks for this. after installing this, I get further errors, however:

pip_system_certs: ERROR: could not register module: cannot import name 'formatargspec' from 'inspect' (/usr/lib/python3.11/inspect.py)
Traceback (most recent call last):
  File "/usr/bin/anki", line 17, in <module>
    import aqt
  File "/usr/lib/python3.11/site-packages/aqt/__init__.py", line 9, in <module>
    import pip_system_certs.wrapt_requests
  File "/home/hearth/.local/lib/python3.11/site-packages/pip_system_certs/wrapt_requests.py", line 3, in <module>
    import wrapt
  File "/home/hearth/.local/lib/python3.11/site-packages/wrapt/__init__.py", line 10, in <module>
    from .decorators import (adapter_factory, AdapterFactory, decorator,
  File "/home/hearth/.local/lib/python3.11/site-packages/wrapt/decorators.py", line 34, in <module>
    from inspect import ismethod, isclass, formatargspec
ImportError: cannot import name 'formatargspec' from 'inspect' (/usr/lib/python3.11/inspect.py)

Would anyone happen to know a fix?

elimik31 commented on 2024-03-04 18:30 (UTC)

Since Anki PR #3050 Anki built with this PKGBUILD doesn't start with the message

ModuleNotFoundError: No module named 'pip_system_certs'

Fixed it locally by pip-installing pip_system_certs. Sadly didn't find a system-package for that python packages yet.