Try to build Mozc with Bazel 7.7.1

Introduction

Recently, I've got a chance to try building Mozc (Most famous Japanese input method editor) with Bazel.

As you know, recently newer Bazel related packages were landed into debian/unstable. Then now I'm planning to update Mozc from 2.29.5160.102 to 3.33.6133.

Background story about Mozc and Debian

The upstream of Mozc had released 3.34.6239, but on Debian, we stick to Mozc 2.29.5160.102.

Mozc requires newer Bazel but we only had Bazel 4.2.3 at that time on Debian, so even though the upstream of Mozc switched from GYP to Bazel, we had patched Mozc with GYP based package.

We even did make an effort to restore build options that had been already removed. :-( And needed to migrate from GTK2 renderer to GTK3 renderer.

That is why the version of Mozc is diverged from upstream on Debian.

  • 2.29.5160.102 (Now on Debian)
  • 2.29.5268.102
  • 2.29.5374.102
  • 2.29.5544.102
  • 2.30.5544.102
  • 2.31.5712.102
  • 2.31.5851.102
  • 2.32.5994.102
  • 3.33.6089
  • 3.33.6133 (Target to upgrade for)
  • 3.34.6239

How to switch from GYP to Bazel?

At first, we needed to decide what Mozc version to work with it.

Now latest version of Mozc is 3.34.x, but it requires Bazel 9.x. Please recall that Bazel 7.7.1 was introduced Debian/unstable. And more, newer dependency libraries are required.

You might feel that target version (3.33.6133) is too high from 2.29.5160.102, but if we upgrade to more older Mozc, it means that it requires to backport Mozc to older libabsl compatible codes and so on.

That is why Mozc 3.33.6133 was chosen.

Even once the target version has been decided, you can't let your guard down.

There are many technical tasks to solve.

  • Revisit patch sets to apply
  • Porting uim mozc patch and fix FTBFS
  • Porting fcitx5 mozc patch and fix FTBFS
  • Fix src/third_party vendoring
  • Switch from GYP to Bazel build systems
  • ...

At least, it will likely require several rounds of testing in the Debian experimental.

Conclusion

Currently, gbp buildpackge has succeeded finally on local machine, but need to tidy and cleanup stuffs.

I didn't know packaging with Bazel best practice yet, to remove many third party vendor/ bundles, I've found that it requires pile of patch to eliminate them.

In the current version of Debian, as a one of build system, further work — such as support from debhelper - will be needed.

I'll file working progress on #1085173

My Free Software Activities in June 2026

6月のハイライト

6月はdebian-mirror.sakura.ne.jp停止するのでmirror teamにフィードバックしたのが 印象に残っている。数日くらいでpingはご法度。なお、結果としてはdebian-mirror.sakura.jpが ftp.jp.debian.orgから削除されただけじゃなくて、ftp.jp.debian.orgとdeb.debian.orgが一緒になった。 他のミラーの状況がよろしくなかったらしいのであわせて整理されたようだ。 deb.debian.orgが不調だからといって、ftp.jp.debian.orgを指定する意味はもうなくなった。 (以前、debian-installerをWiFiブリッジで起動したときに疎通できなくなる問題を踏んだとき、ftp.jp.debian.org を指定すると回避できたりしたけど、その手法は使えなくなったことになる)

6月の活動記録

My Free Software Activities in May 2026

5月のハイライト

5月は、base64のパッケージをDebianに持っていったり、Groongaをautotoolsではなくて、 cmakeでビルドする方式に切り替えたりした。

あとはひさしぶりにmentors.d.nにアップロードされていたhwatchのスポンサーをするなどした。

5月の活動記録

My Free Software Activities in April 2026

4月のハイライト

4月はDebianプロジェクトリーダーの選挙があったこともあり、そのDebianの選挙の投票結果が どうあつかわれるかという点をDebian勉強会で発表した。 現実問題たいていこのひとだよねという候補者がいるので、勝敗はあっさりつくのだが、 いつか"こんなこともあろうかと"というのが発動することがあるのだろうかというのは興味深い。

mozcのGTK3パッチを投入できたのは成果と言っていいかな。(Ubuntuからもらってきただけ)

4月の活動記録

My Free Software Activities in March 2026

3月のハイライト

3月はmozcのFTBFS関係にフィードバックしたり、morisawaフォントのFTBFSにフィードバックしたりした。

mozcがGTK2に依存している問題については、forkyまでに修正できればよいと考えていたが、 Ubuntu 26.04ではアウトということで除外される危機があったのが騒ぎになっていたのが印象に残っている。

誰かがメンテナンスしているのが当たり前ではないというのは普遍的な価値観ではないのかもしれない。

3月の活動記録

My Free Software Activities in Feb 2026

2月のハイライト

2月は、パッケージの定期的なメンテナンスをしたくらいで、それほど活発に活動はしていなかった。 とはいえ、これまで地道に進めてきたFluentd の公式サイトをHerokuから移転したりといった成果があった。 Herokuが事実上のメンテナンスモードになることが先月発表されたので、結果としては早めに切り替えが 完了したのは大きい。

2月の活動記録

  • 2/5
  • 2/9
    • groonga: 16.0.0+dfsg-1をアップロードした
  • 2/14
    • gr-framework: fonts-stixがttfも同梱してくれるようになったので、gr-frameworkで再びSTIXTwoMathのサポートを再開した。(fonts-stixにも働きかけをしたのがよかった)
  • 2/21
    • deskflow: 1.26.0+dfsg-1をアップロードした
  • 2/22

My Free Software Activities in Jan 2026

1月のハイライト

1月は、既存パッケージのスポンサーをしたりした。 印象に残っているのが、gr-frameworkで利用できるフォントに関して、 fonts-stixが1.xから2.xに刷新されるにあたって、現在のgr-frameworkでは 扱えないことがわかったのが印象的だった。

1月の活動記録