Package Details: anki-git r9947.96a9dba67-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: http://ankisrs.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: 24
Popularity: 0.012601
First Submitted: 2017-02-12 11:51 (UTC)
Last Updated: 2023-01-24 22:00 (UTC)

Latest Comments

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

petronny commented on 2023-09-14 06:47 (UTC)

My previous error superisely disappears after disabling LTO.

petronny commented on 2023-08-04 05:56 (UTC) (edited on 2023-08-04 06:02 (UTC) by petronny)

Getting this error in a clean chroot:

  = note: /usr/bin/ld: /build/anki-git/src/anki-git/out/rust/release/deps/libzstd_sys-31396a3548e0e204.rlib: error adding symbols: file format not recognized
          collect2: error: ld returned 1 exit status

https://github.com/arch4edu/cactus/actions/runs/5750924259/job/15612081037

I experienced a similiar issue before https://github.com/bartoszek/AUR-cloudcompare/issues/18 .

DarkShadow44 commented on 2023-01-24 22:01 (UTC)

Thanks, updated

tobias.predel commented on 2023-01-24 19:53 (UTC) (edited on 2023-01-24 19:57 (UTC) by tobias.predel)

A recent commit in Anki introduced the possibility to control which protoc binary is called via the environment variable PROTOC_BINARY. If not set, it will try to call the protoc binary at a place that does not exist. Please adapt the PKGBUILD so that the protoc binary from the python-protobuf is used. Thanks in advance!

diff --git a/PKGBUILD b/PKGBUILD
index 641908e..09b2b44 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,9 +7,10 @@
 # Contributor: Timm Preetz <timm@preetz.us>
 # Contributor: Michael 'manveru' Fellinger <m.fellinger@gmail.com>
 # Contributor: Dave Pretty <david dot pretty at gmail dot com>
+# Contributor: Tobias Predel <tobias.predel@gmail.com>

 pkgname=anki-git
-pkgver=r9764.797270802
+pkgver=r9947.96a9dba67
 pkgrel=1
 pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently"
 url="http://ankisrs.net/"
@@ -89,7 +90,7 @@ build() {

     export CC=/usr/bin/clang
     export CXX=/usr/bin/clang++
-    ./tools/build
+    PROTOC_BINARY=$(which protoc) ./tools/build
 }

 package() {

langfingaz commented on 2023-01-23 17:09 (UTC)

Has anyone tried to build this package with docker?

For me it does fail with the following error. Not sure how to resolve this. All dependencies (including protobuf and python-protobuf) are installed. My build container is based on archlinux:base-devel. The full log can be viewed here.

This may be a Docker-specific issue, independent of the anki-git PKGBUILD file. Thanks for creating/maintaining that file!

?[0m?[0m?[1m?[32m   Compiling?[0m workspace-hack v0.1.0 (/tmp/pkg/src/anki-git/tools/workspace-hack)
?[0m?[0m?[1m?[32m   Compiling?[0m ninja_gen v0.0.0 (/tmp/pkg/src/anki-git/build/ninja_gen)
?[0m?[0m?[1m?[32m   Compiling?[0m configure v0.0.0 (/tmp/pkg/src/anki-git/build/configure)
?[0m?[0m?[1m?[32m    Finished?[0m dev [unoptimized + debuginfo] target(s) in 18.65s
?[0m?[0m?[1m?[32m     Running?[0m `out/rust/debug/configure`
ninja: error: '/tmp/pkg/src/anki-git/out/extracted/protoc/bin/protoc', needed by '/tmp/pkg/src/anki-git/out/pylib/anki/ankidroid_pb2.py', missing and no known rule to make it
?[0m?[0m?[1m?[32m    Finished?[0m dev [unoptimized + debuginfo] target(s) in 0.16s
?[0m?[0m?[1m?[32m     Running?[0m `out/rust/debug/configure`
ninja: error: '/tmp/pkg/src/anki-git/out/extracted/protoc/bin/protoc', needed by '/tmp/pkg/src/anki-git/out/pylib/anki/ankidroid_pb2.py', missing and no known rule to make it
?[0m?[1m?[31m
Build failed.

DarkShadow44 commented on 2022-11-27 21:17 (UTC)

Thanks, pushed an update! If something goes wrong, please tell me.

tobias.predel commented on 2022-11-27 20:34 (UTC) (edited on 2022-11-27 20:38 (UTC) by tobias.predel)

Anki has recently changed its build system to Ninja.

I applied something like the following changes to adapt the PKGBUILD in compliance with development.md:

diff --git a/PKGBUILD b/PKGBUILD
index 0fbf561..9c7182f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,15 +8,15 @@
 # Contributor: Michael 'manveru' Fellinger <m.fellinger@gmail.com>
 # Contributor: Dave Pretty <david dot pretty at gmail dot com>

 pkgname=anki-git
 pkgver=r9412.bc6ede7c1
 pkgrel=1
 pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently"
 url="http://ankisrs.net/"
 license=('AGPL3')
 arch=('any')
 provides=('anki')
 conflicts=('anki' 'anki20' 'anki-official-binary-bundle')
 depends=(
     # anki and aqt
     'python-beautifulsoup4'
@@ -36,22 +36,20 @@ depends=(
     'python-markdown'
     'python-jsonschema'
     'python-pyaudio'
-    'python-pyqtwebengine'
     'python-flask'
     'python-flask-cors'
     'python-waitress'
-    'python-pyqt5'
+    'python-pyqt6'
+    'python-pyqt6-webengine'
 )
 makedepends=(
     'git'
     'rsync'
-
-    'bazel'
+    'ninja'
     'clang'

     'maturin'
     'rust'
-
     'python-pip'
     'python-mypy-protobuf'
     'npm'
@@ -65,13 +63,11 @@ optdepends=(
 )
 source=(
     $pkgname::git+https://github.com/dae/anki.git
-
-    #ankitects-anki-core-i18n-master.tar.gz::https://github.com/ankitects/anki-core-i18n/tarball/master
-    #ankitects-anki-desktop-ftl-master.tar.gz::https://github.com/ankitects/anki-desktop-ftl/tarball/master
-    #ankitects-anki-desktop-i18n-master.tar.gz::https://github.com/ankitects/anki-desktop-i18n/tarball/master
 )
 sha512sums=('SKIP')

 pkgver() {
     cd "$pkgname"
     printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
@@ -80,34 +76,21 @@ pkgver() {
 prepare() {
     cd "$pkgname"

-    # Disable foring a specific bazel version to build with
-    rm .bazelversion
-
-    # Work around option that got removed in bazel
-    sed -i 's/--experimental_no_product_name_out_symlink//g' .bazelrc
-
-    # Put translations in place.
-    #ln -sf "$srcdir"/ankitects-anki-core-i18n-*/ rslib/ftl/repo
-    #ln -sf "$srcdir"/ankitects-anki-desktop-ftl-*/ qt/ftl/repo
-    #ln -sf "$srcdir"/ankitects-anki-desktop-i18n-*/ qt/po/repo
-
-    echo "build --action_env=PYO3_PYTHON=/usr/bin/python3" > "$srcdir/$pkgname/user.bazelrc"
 }

 build() {
     cd "$pkgname"

     export CC=/usr/bin/clang
     export CXX=/usr/bin/clang++
-    export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
     ./tools/build
 }

 package() {
     cd "$pkgname"
-    PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps .bazel/out/dist/anki-*.whl .bazel/out/dist/aqt-*.whl
+    PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps out/wheels/*.whl

     install -Dm755 qt/runanki.py "$pkgdir"/usr/bin/anki
     install -Dm644 qt/bundle/lin/anki.desktop "$pkgdir"/usr/share/applications/anki.desktop
     install -Dm644 qt/bundle/lin/anki.png "$pkgdir"/usr/share/pixmaps/anki.png
 }

Hope this helps.

york commented on 2022-09-17 23:53 (UTC)

Hi @DarkShadow44,

Just saw the pinned comments, and tried:

rm -rf ./cache/bazel

and then the build succeeded. Thank you for the help.

york commented on 2022-09-17 23:40 (UTC)

@DarkShadow44. Yes I did clean the cache from "~/.cache/yay/anki-git" before running

yay -S anki-git

Also, I just tried it again hopping to have different results as I just upgraded my Arch Linux system lately, but I still got the exact same errors.

DarkShadow44 commented on 2022-08-16 21:37 (UTC)

@york Did you try cleaning the cache from "~/.cache/yay/anki-git/"?