google / mozc

Mozc - a Japanese Input Method Editor designed for multi-platform
Other
2.38k stars 346 forks source link

Build error: The smaller Qt is not enough for Mozc build? #722

Closed siketyan closed 1 year ago

siketyan commented 1 year ago

Description The official build guide for macOS says:

The following configure options build a smaller Qt for Mozc.

./configure -opensource -developer-build -platform macx-clang -release \
-nomake examples -nomake tests -nomake tools \
-no-cups -no-dbus -no-icu -no-opengl \
-no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql \
-no-sql-sqlite -no-sql-sqlite2 -no-sql-tds

I tried this with Qt 5.15.9 and it did not work.

ERROR: /Users/siketyan/.local/src/github.com/google/mozc/src/gui/about_dialog/BUILD.bazel:50:12: no such target '@qt_mac//:bin/uic': target 'bin/uic' not declared in package '' defined by /private/var/tmp/_bazel_siketyan/d8db3a1cfdeab86baed422122839e2eb/external/qt_mac/BUILD.bazel (Tip: use `query "@qt_mac//:*"` to see all the targets in that package) and referenced by '//gui/about_dialog:uic_about_dialog'
ERROR: Analysis of target '//:package' failed; build aborted: 

Probably it is needed to add something to this feature set?

Commit-id 551ac0763924dbd0c1ee1b5fe8281f0ccb0fa206

Build target

  1. macOS build

CI build status

  1. passing

Environment:

Build commands Steps of command lines to reproduce your error.

  1. cd
  2. wget https://download.qt.io/official_releases/qt/5.15/5.15.9/single/qt-everywhere-opensource-src-5.15.9.tar.xz
  3. tar xf qt-everywhere-opensource-src-5.15.9.tar.xz
  4. cd qt
  5. ./configure -opensource -developer-build -platform macx-clang -release \ -nomake examples -nomake tests -nomake tools \ -no-cups -no-dbus -no-icu -no-opengl \ -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql \ -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds
  6. make -j6
  7. cd
  8. git clone https://github.com/google/mozc.git --single-branch --recursive
  9. cd mozc/src
  10. MOZC_QT_PATH=/Users/mozc/myqt bazel build package --config oss_macos -c opt

Error logs

❯ MOZC_QT_PATH=/Users/siketyan/qt-everywhere-src-5.15.9 bazel build package --config oss_macos -c opt
ERROR: /Users/siketyan/.local/src/github.com/google/mozc/src/gui/about_dialog/BUILD.bazel:50:12: no such target '@qt_mac//:bin/uic': target 'bin/uic' not declared in package '' defined by /private/var/tmp/_bazel_siketyan/d8db3a1cfdeab86baed422122839e2eb/external/qt_mac/BUILD.bazel (Tip: use `query "@qt_mac//:*"` to see all the targets in that package) and referenced by '//gui/about_dialog:uic_about_dialog'
ERROR: Analysis of target '//:package' failed; build aborted: 
INFO: Elapsed time: 9.989s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (85 packages loaded, 905 targets configured)
    currently loading: @com_google_absl//absl/algorithm ... (7 packages)
    Fetching repository @local_config_xcode; Building xcode-locator

Additional context N/A

siketyan commented 1 year ago

I changed MOZC_QT_PATH to .../qt-everywhere-src-5.15.9/qtbase and it started working. Perhaps it is docs error or I missed something?

yukawa commented 1 year ago

I changed MOZC_QT_PATH to .../qt-everywhere-src-5.15.9/qtbase and it started working. Perhaps it is docs error or I missed something?

Thank you for spotting this. What you did is actually right. The doc isn't clear on what archive needs to be downloaded.

Actually Mozc requires only qtbase. For your case https://download.qt.io/official_releases/qt/5.15/5.15.9/submodules/qtbase-everywhere-opensource-src-5.15.9.tar.xz should be sufficient.

We are now working on updating the macOS build instruction.

siketyan commented 1 year ago

Thank you for the doc fixes and the binary releases!