I’m trying to install anki-git for flashcards (default Anki is too dated), but can’t seem to do so due to a non set JAVA_HOME.
Error Message:
Building anki-git...
==> Making package: anki-git 2.1.46-2 (Sat 28 Aug 2021 02:30:14 PM EDT)
==> Checking runtime dependencies...
warning: config file /etc/pacman.conf, line 37: directive 'TotalDownload' in section 'options' not recognized.
==> Checking buildtime dependencies...
warning: config file /etc/pacman.conf, line 37: directive 'TotalDownload' in section 'options' not recognized.
==> Retrieving sources...
-> Cloning anki-git git repo...
Cloning into bare repository '/var/tmp/pamac-build-sarah/anki-git/anki-git'...
==> Validating source files with sha512sums...
anki-git ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Creating working copy of anki-git git repo...
Cloning into 'anki-git'...
done.
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: anki-git r8306.3077a1f98-1
==> Starting build()...
Extracting Bazel installation...
FATAL: Could not find system javabase. Ensure JAVA_HOME is set, or javac is on your PATH.
==> ERROR: A failure occurred in build().
Aborting...
echo $JAVA_HOME' return nothing as expected, but I'm not sure what to set it to. I have JDK 16 installed and java --version` returns a string as expected.
Please be advised: I’m not at all qualified to assist you. These are just findings while reading and searching and learning about issues.
There is a user with the same problem as you in the comments of the AUR package. It seems there might be a issue with dependencies that are not resolved.
One thing I find strange while reading the anki & bazel documentation is the languages used, there is no java listed.
Installing the base-devel group might help on manjaro?
That will happen automatically while installing the build dependencies. jdk11-openjdk will be pulled in as the java-environment=11 dependency of bazel.
sarah@MidnightStarSign:~$ git clone https://aur.archlinux.org/packages/anki-git
Cloning into 'anki-git'...
fatal: https://aur.archlinux.org/packages/anki-git/info/refs not valid: could not determine hash algorithm; is this a git repository?
There was a lot of text when I ran that command, but there was an error on Bazel (aparrantly trying to build the wheel failed)(yes, I was in the directory above anki-git ):
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: anki-git r8315.9a27e44ff-1
==> Starting build()...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:dist (676 packages loaded, 29689 targets configured).
INFO: Found 1 target...
ERROR: /build/anki-git/src/anki-git/qt/aqt/data/web/js/BUILD.bazel:12:11: Compiling TypeScript (devmode) //qt/aqt/data/web/js:aqt failed: Worker process did not return a WorkResponse:
---8<---8<--- Start of log, file at /build/.cache/bazel/_bazel_builduser/116c99ede22396e48537dd52ab68397f/bazel-workers/worker-4-TypeScriptCompile.log ---8<---8<---
Error: Cannot find module '../tsetse/runner'
Require stack:
- /build/.cache/bazel/_bazel_builduser/116c99ede22396e48537dd52ab68397f/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> (/build/.cache/bazel/_bazel_builduser/116c99ede22396e48537dd52ab68397f/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<---
Target //:dist failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /build/anki-git/src/anki-git/qt/aqt/BUILD.bazel:91:9 Building wheel failed: Worker process did not return a WorkResponse:
---8<---8<--- Start of log, file at /build/.cache/bazel/_bazel_builduser/116c99ede22396e48537dd52ab68397f/bazel-workers/worker-4-TypeScriptCompile.log ---8<---8<---
Error: Cannot find module '../tsetse/runner'
Require stack:
- /build/.cache/bazel/_bazel_builduser/116c99ede22396e48537dd52ab68397f/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> (/build/.cache/bazel/_bazel_builduser/116c99ede22396e48537dd52ab68397f/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: 49.617s, Critical Path: 2.57s
INFO: 201 processes: 188 internal, 9 processwrapper-sandbox, 4 worker.
FAILED: Build did NOT complete successfully
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Building package [anki-git] failed.
Cleaning up.
I just tried it with the same result. I’m not familiar with Bazel, so I’m not sure why it failed to build. I guess you’ll have to wait until the AUR package maintainer fixes it.