Package Details: anki 24.11-2

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: 178
Popularity: 4.84
First Submitted: 2021-09-17 22:31 (UTC)
Last Updated: 2024-12-23 08:04 (UTC)

Latest Comments

« First ‹ Previous 1 .. 18 19 20 21 22 23 24 25 26 27 28 .. 31 Next › Last »

MacroController commented on 2022-02-20 23:22 (UTC)

So I can build now, but I can't launch the application:

Traceback (most recent call last):
  File "/usr/bin/anki", line 16, in <module>
    import aqt
  File "/usr/lib/python3.10/site-packages/aqt/__init__.py", line 18, in <module>
    from anki.collection import Collection
  File "/usr/lib/python3.10/site-packages/anki/collection.py", line 19, in <module>
    from anki._legacy import DeprecatedNamesMixin, deprecated
  File "/usr/lib/python3.10/site-packages/anki/_legacy.py", line 12, in <module>
    import stringcase
ModuleNotFoundError: No module named 'stringcase'

And yes, stringcase is installed ^^

Goetz commented on 2022-02-19 21:31 (UTC) (edited on 2022-02-19 21:31 (UTC) by Goetz)

Some suggestions for the PKGBUILD:

@@ -48,14 +49,6 @@

     'bazel'
     'clang'
-
-    'maturin'
-    'rust'
-
-    'python-pip'
-    'python-mypy-protobuf'
-    'npm'
-    'typescript'
 )
 optdepends=(
     'lame: record sound'

These packages are not mandatory, because bazel is downloading its own toolchain, whether they are available or not.

@@ -87,14 +80,19 @@
         export LDSHARED="/usr/bin/clang -shared"
     fi
     # build requires java 11 to work, does not compile with java 17
-    env PATH="/usr/lib/jvm/java-11-openjdk/bin/:$PATH" bazel build -c opt dist
+    export JAVA_HOME="/usr/lib/jvm/java-11-openjdk"
+
+   rm -rf bazel-dist
+   bazel build --config opt dist
 }

 package() {
     cd "anki-$pkgver"
-    PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps bazel-bin/pylib/anki/anki-*.whl bazel-bin/qt/aqt/aqt-*.whl
+    PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps --no-warn-script-location bazel-bin/pylib/anki/anki-*.whl bazel-bin/qt/aqt/aqt-*.whl

     install -Dm755 qt/runanki.py "$pkgdir"/usr/bin/anki
     install -Dm644 qt/linux/anki.desktop "$pkgdir"/usr/share/applications/anki.desktop
     install -Dm644 qt/linux/anki.png "$pkgdir"/usr/share/pixmaps/anki.png
+   find $pkgdir -iname __pycache__ | xargs rm -rf
+   find $pkgdir -iname direct_url.json | xargs rm -rf
 }

Use JAVA_HOME instead of setting the javac in PATH, only with this change I am able to compile the AUR.

The rm command is part of the original build script, I have no experience with bazel so I have kept it inside.

In addition delete all __pycache__ folders, these are not mandatory for the package. The other changes prevent warnings during packaging.

Goetz commented on 2022-02-19 21:15 (UTC) (edited on 2022-02-19 21:16 (UTC) by Goetz)

My solution to prevent build errors with bazel is deleting the cache in .cache/bazel.

MacroController commented on 2022-02-18 12:49 (UTC)

@arsh if you want a code block, you can indent 4 spaces or 1 tab (at least), after an additional linebreak.

MacroController commented on 2022-02-18 12:45 (UTC) (edited on 2022-02-18 12:47 (UTC) by MacroController)

With pamac, I get the following error when I try to build:

Target //:dist failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /var/tmp/pamac-build-username/anki/src/anki-2.1.49/ts/change-notetype/BUILD.bazel:61:8 Bundling Javascript ts/change-notetype/index.mjs [esbuild] failed: Worker process quit or closed its stdin stream when we tried to send a WorkRequest:

---8<---8<--- Exception details ---8<---8<---
java.io.IOException: Broken pipe
    at java.base/java.io.FileOutputStream.writeBytes(Native Method)
    at java.base/java.io.FileOutputStream.write(FileOutputStream.java:354)
    at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
    at java.base/java.io.BufferedOutputStream.write(BufferedOutputStream.java:127)
    at com.google.protobuf.CodedOutputStream$OutputStreamEncoder.doFlush(CodedOutputStream.java:3062)
    at com.google.protobuf.CodedOutputStream$OutputStreamEncoder.write(CodedOutputStream.java:2994)
    at com.google.protobuf.CodedOutputStream$OutputStreamEncoder.writeLazy(CodedOutputStream.java:3013)
    at com.google.protobuf.ByteString$LiteralByteString.writeTo(ByteString.java:1392)
    at com.google.protobuf.CodedOutputStream$OutputStreamEncoder.writeBytesNoTag(CodedOutputStream.java:2801)
    at com.google.protobuf.CodedOutputStream$OutputStreamEncoder.writeBytes(CodedOutputStream.java:2775)
    at com.google.protobuf.GeneratedMessageV3.writeString(GeneratedMessageV3.java:3092)
    at com.google.devtools.build.lib.worker.WorkerProtocol$Input.writeTo(WorkerProtocol.java:235)
    at com.google.protobuf.CodedOutputStream$OutputStreamEncoder.writeMessageNoTag(CodedOutputStream.java:2855)
    at com.google.protobuf.CodedOutputStream$OutputStreamEncoder.writeMessage(CodedOutputStream.java:2824)
    at com.google.devtools.build.lib.worker.WorkerProtocol$WorkRequest.writeTo(WorkerProtocol.java:1171)
    at com.google.protobuf.AbstractMessageLite.writeDelimitedTo(AbstractMessageLite.java:95)
    at com.google.devtools.build.lib.worker.ProtoWorkerProtocol.putRequest(ProtoWorkerProtocol.java:38)
    at com.google.devtools.build.lib.worker.SingleplexWorker.putRequest(SingleplexWorker.java:127)
    at com.google.devtools.build.lib.worker.WorkerSpawnRunner.execInWorker(WorkerSpawnRunner.java:419)
    at com.google.devtools.build.lib.worker.WorkerSpawnRunner.exec(WorkerSpawnRunner.java:209)
    at com.google.devtools.build.lib.exec.SpawnRunner.execAsync(SpawnRunner.java:245)
    at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:146)
    at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:108)
    at com.google.devtools.build.lib.actions.SpawnStrategy.beginExecution(SpawnStrategy.java:47)
    at com.google.devtools.build.lib.exec.SpawnStrategyResolver.beginExecution(SpawnStrategyResolver.java:68)
    at com.google.devtools.build.lib.analysis.actions.SpawnAction.beginExecution(SpawnAction.java:328)
    at com.google.devtools.build.lib.actions.Action.execute(Action.java:133)
    at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$5.execute(SkyframeActionExecutor.java:907)
    at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.continueAction(SkyframeActionExecutor.java:1076)
    at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:1031)
    at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:152)
    at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:91)
    at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:492)
    at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:856)
    at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.computeInternal(ActionExecutionFunction.java:349)
    at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:169)
    at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:590)
    at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:382)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
---8<---8<--- End of exception details ---8<---8<---

---8<---8<--- Start of log, file at /home/username/.cache/bazel/_bazel_username/8fb37c2fb4394548091699ed033241ec/bazel-workers/worker-1-TypeScriptCompile.log ---8<---8<---
Error: Cannot find module '../tsetse/runner'
Require stack:
- /home/username/.cache/bazel/_bazel_username/8fb37c2fb4394548091699ed033241ec/execroot/ankidesktop/node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/username/.cache/bazel/_bazel_username/8fb37c2fb4394548091699ed033241ec/execroot/ankidesktop/node_modules/@bazel/typescript/internal/tsc_wrapped/tsc_wrapped.js:7:18)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
---8<---8<--- End of log ---8<---8<---
INFO: Elapsed time: 315.045s, Critical Path: 157.33s
INFO: 763 processes: 255 internal, 508 linux-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
==> ERROR: A failure occurred in build().
    Aborting...

arsh commented on 2022-02-18 12:09 (UTC) (edited on 2022-02-18 13:03 (UTC) by arsh)

Trying to install 'anki' gives me these errors now: My apologies for the appearance I'm not sure how to use that code block properly. Thanks @MacroController

:: Proceed with installation? [Y/n] 
(4/4) checking keys in keyring                         [############################] 100%
(4/4) checking package integrity                       [############################] 100%
(4/4) loading package files                            [############################] 100%
(4/4) checking for file conflicts                      [############################] 100%
error: failed to commit transaction (conflicting files)
node-gyp: /usr/lib/node_modules/node-gyp/lib/create-config-gypi.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/make-fetch-happen/lib/agent.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/entry.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/errors.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/index.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/key.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/make-fetch-happen/lib/cache/policy.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/make-fetch-happen/lib/fetch.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/make-fetch-happen/lib/index.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/make-fetch-happen/lib/options.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/make-fetch-happen/lib/remote.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/negotiator/HISTORY.md exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/negotiator/LICENSE exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/negotiator/README.md exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/negotiator/index.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/negotiator/lib/charset.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/negotiator/lib/encoding.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/negotiator/lib/language.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/negotiator/lib/mediaType.js exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/node_modules/negotiator/package.json exists in filesystem
node-gyp: /usr/lib/node_modules/node-gyp/test/test-create-config-gypi.js exists in filesystem
Errors occurred, no packages were upgraded.
 -> error installing repo packages

The official binary installs and builds but when launching, it won't display any decks. Installing anki.bin works as it should.

RefSnow commented on 2022-02-15 02:54 (UTC) (edited on 2022-02-15 02:58 (UTC) by RefSnow)

Can someone help me solve this error? I tried to install using yay and paru, but I can't.

full log: https://pastebin.com/F2e7jJpM

.............................

python-psutil: /usr/lib/python3.10/site-packages/psutil/__pycache__/_psosx.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/__pycache__/_psposix.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/__pycache__/_pssunos.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/__pycache__/_pswindows.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_common.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_compat.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_psaix.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_psbsd.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_pslinux.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_psosx.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_psposix.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_pssunos.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_psutil_linux.cpython-310-x86_64-linux-gnu.so exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_psutil_posix.cpython-310-x86_64-linux-gnu.so exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/_pswindows.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__init__.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__main__.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/__init__.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/__main__.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/runner.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_aix.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_bsd.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_connections.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_contracts.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_linux.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_memleaks.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_misc.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_osx.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_posix.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_process.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_sunos.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_system.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_testutils.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_unicode.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/__pycache__/test_windows.cpython-310.pyc exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/runner.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_aix.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_bsd.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_connections.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_contracts.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_linux.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_memleaks.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_misc.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_osx.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_posix.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_process.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_sunos.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_system.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_testutils.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_unicode.py exists in filesystem
python-psutil: /usr/lib/python3.10/site-packages/psutil/tests/test_windows.py exists in filesystem
Errors occurred, no packages were upgraded.

kotetsu commented on 2022-01-26 15:00 (UTC)

Builds fine but Anki seems to be partly broken. You can't open the old deck options menu and when you do it completely resets/breaks your deck options. The official binary bundle works fine on the other hand.

jose1711 commented on 2022-01-20 12:07 (UTC)

@Ketchup901 thanks for sharing, it built for me too now!