This is the first part towards removing the dependency on Docker from
our build instructions for Linux desktop and Android (#1181).
This commit makes it clear that you can build 'libmozc.so' on both Linux
and macOS by the same Bazel command with actually demonstrating it in
.github/workflows/android.yaml
that 'libmozc.so' can be built on both Linux and macOS GitHub Actions
runners.
With above our 'Dockerfile' can stop setting up Android NDK since
'build_mozc_in_docker.md' does not mention Android any more.
This commit is only about the build instructions of 'libmozc.so' for
Android. There must be no difference in the final artifacts.
PiperOrigin-RevId: 729468755
Android NDK r28 is released with 16 KiB page size compatibility option
enabled by default [1].
Let's update our Dockerfile to make it clear that libmozc.so is
compatible with 16 KiB page size.
[1]: https://github.com/android/ndk/releases/tag/r28
PiperOrigin-RevId: 725115333
This commit aims to simplify how Android NDK is set up in Dockerfile
without changing any final artifact.
With this commit Android NDK will be directly downloaded then deployed
just by unzipping the archive. As a result we no longer need to install
openjdk-17-jdk package just to run Android SDK setup.
This commit also makes it clear that the build environment for Android
requires Android NDK only. Android SDK and ANDROID_HOME environment
variable are not necessary.
There must be no difference in the final artifact.
PiperOrigin-RevId: 717365459
As Mozc is not compatible with Bazel 8.0 yet, let's
* pin Bazel version to Bazel 7.4.1 in GitHub Actions.
* clarify that Bazel 8.0 is not supported in the build instructions.
PiperOrigin-RevId: 698388242
bazelisk [1] is a wrapper around bazel that allows you to use different
versions of bazel without having to install them all. This is useful
for testing different versions of bazel or for using a specific version
of bazel that is not available in the default repository.
Let's update Dockerfile to use bazelisk instead of bazel. This will
allow us to avoid a tricky question on which version of bazel should be
installed in the Docker container by checking in '.bazeliskrc' into the
repository.
Note that switching to recent versions of bazel is also necessary due to
our migration to bzlmod (#1002). Probably bazel 7.3 or later is
currently required to build Mozc with bazel.
[1]: https://github.com/bazelbuild/bazelisk
#codehealth
PiperOrigin-RevId: 680750168
Somehow gcc and g++ should have been explicitly installed since my
previous commit [1], which aimed to switch from clang/libc++ to
GCC/libstdc++
[1]: aba090da42
#codehealth
PiperOrigin-RevId: 680749115
As the initial step towards #924, this commit introduces a Dockerfile
for Ubuntu 24.04 so that developers can build Mozc binaries for
Ubuntu 24.04 and Android.
#codelealth
PiperOrigin-RevId: 630801826
This is a follow up to my previous commit [1], which aimed to build
'libmozc.so' for relevant architectures.
Although in the above commit I believe I followed exactly the same step
explained in the Bazel document [2], it seems that artifact files are
not ready to run on the actual Android devices. Perhaps it might be
because the above approach is for those who want to build native
libraries for Android without building an APK, which is somewhat
not-a-major use case and may not be well maintained. This is why I
ended up building a temporary fat APK only to extract native libraries
from it.
Basically what this commit does are:
1. Build a fat APK, which depends on 'mozcjni' cc_library target.
2. Extract native libraries from the APK and zip it as native_libs.zip
The temporary APK used here is completely empty and used only for
building purpose.
The 'package' meta target is updated to point to the native library
build target, which is 'android/jni:native_libs'.
bazel build --config oss_android package
ls bazel-bin/android/jni/native_libs.zip
'.bazelrc' is also updated because Android build starts using the
following options instead.
* --android_crosstool_top=@androidndk//:toolchain
* --fat_apk_cpu=armeabi-v7a,arm64-v8a,x86,x86_64
Dockerfile is also updated because now Android build requires not only
Android NDK but also Android SDK.
This commit only affects Android build target. Other build target
should continue to success without installing Android SDK/NDK.
Closes#840.
[1]: 5a6e457b72
[2]: https://bazel.build/docs/android-ndk#cclibrary-android
[3]: https://bazel.build/docs/android-ndk
PiperOrigin-RevId: 578420951
In most Linux distributions, system-provided Qt6 libraries are supposed to be
built with libstdc++ rather than libc++. This means that mozc_tool also need to
link to libstdc++ to avoid ABI mismatch unless we build Qt6 from the source code
like we do so in macOS and Windows builds. For now, let's assume GCC and
libstdc++ in Linux CI.
Closes#803.
#codehealth
PiperOrigin-RevId: 563670356
With this commit, Linux build starts linking to Qt6.
Here are things needed to use Qt6 in Ubuntu 22.04.
* Qt6 uses 'libexec' rather than 'bin' to host tools like 'uic'.
* Qt6 requires 'libgl-dev' in Ubuntu 22.04.
* Ubuntu 22.04 uses Qt 6.2.4, where you cannot use pkg-config for Qt6
due to QTBUG-86080 [1]. This commit works around it by injecting
files like Qt6Core.pc files with 'PKG_CONFIG_PATH' environment
variable.
[1]: https://bugreports.qt.io/browse/QTBUG-86080
PiperOrigin-RevId: 558016590
This follows up to bb52df2437.
With this commit we use Ubuntu 22.04 as the reference build environment
for Mozc for Linux and Android.
This commit also updates NDK version from 'r21b' to 'r25c' as otherwise
Android build fails.
Also the default Clang version in Ubuntu 22.04 is '14' thus we do not
need to explicitly set them in 'CC' and 'CXX'.
This is also a preparation of Qt6 migration (#775), as Ubuntu 20.04 does
not have Qt6 in their official repository.
Closes#763.
PiperOrigin-RevId: 552728127
This commits delete src/renderer/unix, which is has also been known as
"Mozc GTK renderer". By removing this we can make it clear that GTK+2
(e.g. `libgtk2.0-dev`) is not necessary to build Mozc in Linux.
#codehealth
Closes#781.
PiperOrigin-RevId: 551780822
selection_monitor.cc has been a fallback for features built on top of
surrounding text APIs to continue working even when
IbusEngineWrapper::GetSurroundingText() doesn't return correct
anchor_pos.
The way how selection_monitor.cc worked around was to keep monitoring
clipboards via by X11 APIs. However I believe it's time to remove this
workaround. My rationales are:
* Having a runtime dependency on xcb from ibus_mozc is getting more
and more questionable, especially when the industry is heading to
Wayland. There was actually an issue in Ubuntu 21.10 [1] because of
this dependency.
* If an IME API doesn't work well, ideally such an issue should be
addressed in the right component, rather than trying to work around
it in each IME.
[1]: https://bugs.launchpad.net/ubuntu/+source/mozc/+bug/1946969
#codehealth
PiperOrigin-RevId: 551164079
NOTE: these changes require updating gyp submodule in mozc github repo.
See https://github.com/dextero/mozc/actions for results of a test CI run.
* Set GYP_MSVS_DISABLE_PATH_NORMALIZATION environment variable in
build_mozc.py. Removing path normalization that was breaking Windows build
was a breaking change that didn't get accepted in upstream. Instead, setting
that environment variable makes gyp skip the normalization.
* Remove instructions to apply gyp.patch from Windows build instructions.
PiperOrigin-RevId: 440133963
Ubuntu Manpage: apt - command-line interface
SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS
https://manpages.ubuntu.com/manpages/focal/en/man8/apt.8.html#script%20usage%20and%20differences%20from%20other%20apt%20tools
> The apt(8) commandline is designed as an end-user tool and it may
> change behavior between versions. While it tries not to break backward
> compatibility this is not guaranteed either if a change seems
> beneficial for interactive use.
>
> All features of apt(8) are available in dedicated APT tools like
> apt-get(8) and apt-cache(8) as well. apt(8) just changes the default
> value of some options (see apt.conf(5) and specifically the Binary
> scope). So you should prefer using these commands (potentially with
> some additional options enabled) in your scripts as they keep backward
> compatibility as much as possible.
This CL am amends a typo in the copyright year in the file header of
docker/fedora23/Dockerfile, which was introduced in my previous
CL [1].
[1]: f5ddd0e06f
Pepper 45 SDK is going to be deprecated. We have to switch to a newer
version.
No user visible change is intended.
BUG=
TEST=compile
REF_BUG=
REF_CL=
REF_TIME=2016-10-02T23:56:17-07:00
REF_TIME_RAW=1475477777 -0700
This is a follow-up CL to f76c304164,
with which we started using Qt5 by default for Linux desktop build.
BUG=#327
TEST=
REF_BUG=
REF_CL=
REF_TIME=
REF_TIME_RAW=
This CL completely removes --android_compiler option since we now only
support Clang toolchain for Android target binaries. GCC toolchain
bundled in Android NDK is going to be deprecated shortly [1].
This Cl also adds following build targets on Travis-CI.
- Android (arm64)
- Android (x86)
- Android (x86_64)
- Android (mips)
- Android (mips64)
Closes#273.
[1]: fb83ea8bf7
BUG=#273
TEST=compile
REF_BUG=
REF_CL=131555947,133352265,134314373
REF_TIME=2016-08-28T22:29:30-07:00
REF_TIME_RAW=1472448570 -0700
The 3GB memory limit enforced to Travis CI container-based environment
is too small to build Mozc for Android. To avoid Out-Of-Memory errors,
this CL lets Travis CI use Ubuntu 14.04 Trusty VM instead.
This CL also updates Ubuntu 14.04 Dockerfile to keep those two build
environments as similar as possible.
BUG=
TEST=
REF_BUG=
REF_CL=
REF_TIME=2016-03-03T02:14:00-08:00
REF_TIME_RAW=1457000040 -0800
In Mozc repository, it's only master branch where we basically do not
change existing commit histories and commit hashes unless we
exceptionally have to do that. Since any other branches are basically
used for development purpose, it is not recommended to check them out
unless needed. Hence this CL updates documents and Dockerfile for
developers to not check them out accidentally.
Since Fedora 21 will soon enter End Of Life (EOL) status on
December 1st, 2015, this CL updates Dockerfile for Fedora to use
Fedora 23 instead of Fedora 21.
Note that Android build support is intentionally dropped from
this Dockerfile due to the lack of due to the lack of OpenJDK 1.7
support in Fedora 23.
Note also that this Dockerfile is provided just for the reference.
Ensuring that Mozc can be built on Fedora 23 is beyond our goal
at the moment.
BUG=
TEST=compile and unittest in Docker 1.9.1 running on Ubuntu 14.04.3
REF_BUG=
REF_CL=
Pepper 40 SDK is no longer downloadable from Peppre SDK tool.
We have to switch to newer version right now.
No user visible change is intended.
BUG=
TEST=compile
REF_BUG=
REF_CL=
Currently meta information regarding how to set up build environment
for Mozc and how to build Mozc actually is described in files at the
top level directory (e.g., README.md and appveyor.yml) and documents
under doc/ directory. One exception of this directory structure is
docker files under src/docker/ directory.
Probably extracting this kind of meta source code out from src/
directory would make sense from the viewpoint of directory structure
management.