Package Details: ibus-mozc-with-jp-dict 2.32.5981.102-2

Git Clone URL: https://aur.archlinux.org/mozc-with-jp-dict.git (read-only, click to copy)
Package Base: mozc-with-jp-dict
Description: Ibus engine module for Mozc(the Open Source Edition of Google Japanese Input) with SudachiDict and MeCab UniDic Neologd and MeCab IpaDic Neologd
Upstream URL: https://github.com/fcitx/mozc
Keywords: dictionary emacs fcitx5 ibus japanese mozc
Licenses: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND NAIST-2003 AND Unicode-3.0 AND LicenseRef-Okinawa-Dictionary
Conflicts: fcitx, fcitx-configtool, fcitx-mozc, fcitx-qt5, fcitx-qt6, fcitx5, fcitx5-configtool, fcitx5-mozc, fcitx5-qt, ibus-mozc
Provides: ibus-mozc
Submitter: phoepsilonix
Maintainer: phoepsilonix
Last Packager: phoepsilonix
Votes: 9
Popularity: 1.88
First Submitted: 2023-03-14 08:19 (UTC)
Last Updated: 2025-10-15 02:16 (UTC)

Required by (2)

  • mozc (requires ibus-mozc) (optional)
  • mozc-ut (requires ibus-mozc) (optional)

Sources (19)

Pinned Comments

phoepsilonix commented on 2024-08-26 00:02 (UTC) (edited on 2025-09-13 04:30 (UTC) by phoepsilonix)

If you're encountering errors during the build process, try deleting your Bazel cache (located at ~/.cache/bazel by default).

sudo rm -rf ~/.cache/bazel/*

or

makepkg -osC
cd src/mozc/src
bazel clean --expunge
cd ../../..
sudo pacman -Rs fcitx-qt6 fcitx
makepkg -p PKGBUILD

The development of Fcitx has transitioned to Fcitx5, and Fcitx-Mozc is no longer maintained. Please try the following command.

sudo pacman -Rs fcitx5-qt fcitx5
makepkg -p PKGBUILD.fcitx

I use the following site for build verification and build automation.
If you encounter any issues, please also check here. It may be helpful.
If you are looking for pre-built package files, please check the following GitHub site.
https://github.com/phoepsilonix/mozc-arch/releases

Latest Comments

1 2 Next › Last »

fabiscafe commented on 2025-10-15 17:42 (UTC)

@phoepsilonix The latest version seems to work for me, thanks!


Essentially what you should try to support is this clean room variant

# Fetch the build-depedencies
pacman -S devtools base-devel git

# git clone the AUR repo
git clone https://aur.archlinux.org/mozc-with-jp-dict.git

# build the package
# this command will setup a build environment and build it against a clean and up-2-date Arch base system
pkgctl build mozc-with-jp-dict

Because everything else is a users own setup, and it would be hard to support them all, especially if it matters how rust was set up or that bazel could conflict. AUR helpers are not supported, so no pressure to support them on your side 😇

There also is this: https://wiki.archlinux.org/title/Rust_package_guidelines that helps a bit

phoepsilonix commented on 2025-10-15 00:11 (UTC) (edited on 2025-10-15 01:56 (UTC) by phoepsilonix)

@Muflone @WD_Hiroshi @fabiscafe

Thank you for your report. Since the issue hadn't occurred for a long time, my confirmation was delayed. This PKGBUILD (https://github.com/phoepsilonix/mozc-arch/blob/main/archlinux/PKGBUILD.Dict) builds successfully within an ArchLinux container. The AUR should be equivalent to this, but is the problem occurring persistently? By the way, how are you installing Rust? Using rustup? If it's happening persistently, I'll look into it later. Could you give me a little time?

When building within a chroot environment using the pkgctl command from the devtools package, I have also confirmed in this environment that an error occurs during Rust installation preventing the renaming of LLVM-related files. Furthermore, while Rust offers multiple installation methods, within the chroot environment, the environment variables may not be as expected. Since builds succeed within the ArchLinux container on GitHub, this may be an issue specific to installing Rust within the chroot environment. Therefore, I attempted a fix based on the proposed patch from @fabiscafe.
I would be grateful if you could review it.

Muflone commented on 2025-10-12 10:36 (UTC)

@phoepsilonix https://lists.archlinux.org/archives/list/aur-requests@lists.archlinux.org/thread/U6KYLSH3QEXRIU6PLHRDDWRM44E3TCYY

this package doesn't build in a clean chroot. is it for Arch Linux or is broken?

please fix it or the package will be deleted

WD_Hiroshi commented on 2025-10-02 07:21 (UTC)

Hi. This package does not build. It fails with

error: component download failed for llvm-tools-x86_64-unknown-linux-gnu: could not rename downloaded file from '<path>.partial' to '<path>': No such file or directory (os error 2)

link shortend

fabiscafe commented on 2025-09-14 19:48 (UTC)

@phoepsilonix The main issue is that TARGET won't get populated, and I also don't know where cargo/rust home ends up.

I apply the following patch to make it work on my Arch build system.

--- a/PKGBUILD  2025-09-14 21:14:06.037959860 +0200
+++ b/PKGBUILD  2025-09-14 03:58:21.074528414 +0200
@@ -33,7 +33,6 @@
 url="https://github.com/fcitx/mozc"
 license=('Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND NAIST-2003 AND Unicode-3.0 AND LicenseRef-Okinawa-Dictionary')
 makedepends=('qt6-base' 'fcitx5' 'fcitx5-qt' 'bazel' 'git' 'python' 'mold' 'pkg-config' 'libibus' 'rustup')
-options=(!lto)
 source=("git+$url.git#commit=${_mozc_commit}"
         "bcr::git+https://github.com/bazelbuild/bazel-central-registry.git#commit=${_bcr_commit}"
         "git+https://github.com/abseil/abseil-cpp.git#commit=${_abseil_cpp_commit}"
@@ -84,7 +83,20 @@
   printf "%s.%s.%s.%s" "$MAJOR" "$MINOR" "$BUILD_OSS" "$((REVISION+2))"
 }

+# Use debug
+export CARGO_PROFILE_RELEASE_DEBUG=2 CARGO_PROFILE_RELEASE_STRIP=false
+
+# Use LTO
+export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
+
+# Set default rustup toolchain
+export RUSTUP_TOOLCHAIN=stable
+
 prepare() {
+  # Set rust/cargo home to the build source dir
+  export CARGO_HOME="$srcdir/build/cargo-home"
+  export RUSTUP_HOME="$srcdir/build/rustup-home"
+
   cd "$srcdir/mozc" || exit

   git submodule init
@@ -109,13 +121,12 @@
   # disable warning of ANDROID_NDK_HOME.
   sed -e '/register_toolchains("@androidndk\/\/:all")/d' -i MODULE.bazel

-  rustup update stable
   cd "${srcdir}/dict-to-mozc/" || exit
   #sed -e "s|channel *=.*|channel = \"stable\"|" -i rust-toolchain.toml
   #sed -e "/components.*/d" -i rust-toolchain.toml
   # すだちを優先
   msg '1. Build the rust program(dict-to-mozc), it may take some time...'
-  rustup target list --installed | grep $(rustc -vV | sed -e 's|host: ||' -e 's|-gnu||p' -n) | grep -v musl && TARGET=$(rustup target list --installed | grep $(rustc -vV | sed -e 's|host: ||' -e 's|-gnu||p' -n)|grep -v musl|head -n1) || TARGET=$(rustup target list --installed | grep $(rustc -vV | sed -e 's|host: ||' -e 's|-gnu||p' -n)|grep musl|head -n1)
+  TARGET=$(rustc -vV | sed -n 's/host: //p')
   unset RUSTC
   #CC_=$CC
   #unset CC
@@ -152,6 +163,10 @@
 }

 build() {
+  # Set rust/cargo home to the build source dir
+  export CARGO_HOME="$srcdir/build/cargo-home"
+  export RUSTUP_HOME="$srcdir/build/rustup-home"
+
   cd "$srcdir/mozc/src" || exit

   # Fix compatibility with google-glog 0.3.3 (symbol conflict)
@@ -225,7 +240,6 @@
   install -D -m 644 "$srcdir/LICENSE-SudachiDict" "$pkgdir/usr/share/licenses/$pkgname/data/dictionary_oss/"
   install -D -m 644 "$srcdir/LICENSE-MeCab-unidic-Neologd" "$pkgdir/usr/share/licenses/$pkgname/data/dictionary_oss/"
   install -D -m 644 "$srcdir/LICENSE-MeCab-ipadic-Neologd" "$pkgdir/usr/share/licenses/$pkgname/data/dictionary_oss/"
-
 }

 package_fcitx5-mozc-with-jp-dict() {
@@ -288,4 +302,3 @@
   install -Dm644 unix/emacs/mozc.el                     "$pkgdir/usr/share/emacs/site-lisp/emacs-mozc/mozc.el"
 }

-

phoepsilonix commented on 2025-09-13 04:28 (UTC) (edited on 2025-10-15 00:24 (UTC) by phoepsilonix)

@fabiscafe

Sorry for the delayed reply. It seems the download of Rust's llvm-tools isn't working properly. Please try again after waiting a while. Alternatively, reinstalling Rust might resolve the issue.

We've also verified builds on Arch and Manjaro using the link below. The build itself should be possible, so please check it out. https://github.com/phoepsilonix/mozc-arch/releases

fabiscafe commented on 2025-08-17 20:00 (UTC)

Sadly, I'm also unable to build it.

==> 1. Build the rust program(dict-to-mozc), it may take some time...
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2025-08-07, rust version 1.89.0 (29483883e 2025-08-04)
info: component 'cargo' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'clippy' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'rustc' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is up to date
info: downloading component 'llvm-tools'
info: latest update on 2025-08-07, rust version 1.89.0 (29483883e 2025-08-04)
info: component 'cargo' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'clippy' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'rustc' for target 'x86_64-unknown-linux-gnu' is up to date
info: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is up to date
info: downloading component 'llvm-tools'
info: downloading component 'rust-src'
info: installing component 'llvm-tools'
error: component download failed for llvm-tools-x86_64-unknown-linux-gnu: could not rename downloaded file from '/build/.rustup/downloads/bb0ced899fd1ac628f26e375adabc970b415c516ec82fb7cf9ac3c63cb4d0fee.partial' to '/build/.rustup/downloads/bb0ced899fd1ac628f26e375adabc970b415c516ec82fb7cf9ac3c63cb4d0fee': No such file or directory (os error 2)
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.
info: installing component 'rust-src'
error: "--target" takes a target architecture as an argument.

Run `rustup target list` to see possible targets.
error: "--target" takes a target architecture as an argument.

Run `rustup target list` to see possible targets.

@phoepsilonix could you try to verify that it builds in a clean chroot?

git clone https://aur.archlinux.org/mozc-with-jp-dict.git
pkgctl build --repo extra mozc-with-jp-dict

should do that.

phoepsilonix commented on 2025-07-04 08:56 (UTC) (edited on 2025-07-04 09:23 (UTC) by phoepsilonix)

@jaro3

Tweaked. I think dict-to-mozc is now buildable for both gcc and clang. I think it can build on both ArchLinux and ManjaroLinux.

The “error: component download failed” is an error when communication with the rust server fails. In this case, try building again.

Also try deleting bazel's cache, as it may not be able to build due to bazel version upgrades.

If you still cannot build, please let us know the results of the following commands and the build environment.

rustup target list --installed
rustup target list --installed | grep $(rustc -vV | sed -e 's|host: ||' -e 's|-gnu||p' -n) | grep -v musl && TARGET=$(rustup target list --installed | grep $(rustc -vV | sed -e 's|host: ||' -e 's|-gnu||p' -n)|grep -v musl|head -n1) || TARGET=$(rustup target list --installed | grep $(rustc -vV | sed -e 's|host: ||' -e 's|-gnu||p' -n)|grep musl|head -n1)
echo $TARGET

jaro3 commented on 2025-07-03 03:46 (UTC)

Build fails in clean chroot too:


info: downloading component 'llvm-tools'
info: downloading component 'rust-src'
error: component download failed for llvm-tools-x86_64-unknown-linux-gnu: could not rename downloaded file from '/build/.rustup/downloads/16e8d9b4187cc3936feddd9ceccde0157a4a1b2be98ca9c202cda304e0e81853.partial' to '/build/.rustup/downloads/16e8d9b4187cc3936feddd9ceccde0157a4a1b2be98ca9c202cda304e0e81853': No such file or directory (os error 2)
info: installing component 'llvm-tools'
info: installing component 'rust-src'
error: "--target" takes a target architecture as an argument.

Run `rustup target list` to see possible targets.
error: "--target" takes a target architecture as an argument.

Run `rustup target list` to see possible targets.
==> ERROR: A failure occurred in prepare().
    Aborting...

jaro3 commented on 2025-07-03 03:44 (UTC)

Build fails:


warning: mimalloc-rust-sys@1.7.9-source:       |                                       ^~~~~~~~~~~~~~~~~~
error: failed to run custom build command for `mimalloc-rust-sys v1.7.9-source`

Caused by:
  process didn't exit successfully: `/usr/src/tmp/mozc-with-jp-dict/src/dict-to-mozc/target/release/build/mimalloc-rust-sys-d715c5ad95029a71/build-script-build` (exit status: 1)

INFO: Reading 'startup' options from /usr/src/tmp/mozc-with-jp-dict/src/mozc/src/.bazelrc: --windows_enable_symlinks
Server crashed during startup. Now printing /root/.cache/bazel/_bazel_root/7cf5d81357f08e7007592eb7ec47290c/server/jvm.out
Error: LinkageError occurred while loading main class com.google.devtools.build.lib.bazel.Bazel
    java.lang.UnsupportedClassVersionError: com/google/devtools/build/lib/bazel/Bazel has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 55.0
==> ERROR: A failure occurred in build().
    Aborting...