15KB
公開: 更新:

2024/11/09

Can’t compile mozc on Windows with Error:Invalid command line parameter ‘\mozc\src\third_party\qt’.

like this.

PS C:\Users\user-name\Documents\日本語入力\mozc\src> rye run python build_tools/build_qt.py --release --confirm_license
Overriding option 'freetype' with 'no' (was: 'undefined')
Overriding option 'harfbuzz' with 'no' (was: 'undefined')
CMake Error at cmake/QtProcessConfigureArgs.cmake:345 (message):
  Invalid command line parameter '\mozc\src\third_party\qt'.
Call Stack (most recent call first):
  cmake/QtProcessConfigureArgs.cmake:704 (qtConfAddError)


Traceback (most recent call last):
  File "C:\Users\user-name\Documents\日本語入力\mozc\src\build_tools\build_qt.py", line 643, in <module>
    main()
  File "C:\Users\user-name\Documents\日本語入力\mozc\src\build_tools\build_qt.py", line 639, in main
    build_on_windows(args)
  File "C:\Users\user-name\Documents\日本語入力\mozc\src\build_tools\build_qt.py", line 569, in build_on_windows
    exec_command(configure_cmds, cwd=qt_src_dir, env=env, dryrun=args.dryrun)
  File "C:\Users\user-name\Documents\日本語入力\mozc\src\build_tools\build_qt.py", line 538, in exec_command
    subprocess.run(command, shell=False, check=True, cwd=cwd, env=env)
  File "C:\Users\user-name\.rye\py\cpython@3.12.3\Lib\subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Windows\\system32\\cmd.exe', '/C', 'configure.bat', '-opensource', '-c++std', 'c++20', '-silent', '-no-cups', '-no-dbus', '-no-feature-androiddeployqt', '-no-feature-animation', '-no-feature-calendarwidget', '-no-feature-completer', '-no-feature-concatenatetablesproxymodel', '-no-feature-concurrent', '-no-feature-dial', '-no-feature-effects', '-no-feature-fontcombobox', '-no-feature-fontdialog', '-no-feature-identityproxymodel', '-no-feature-image_heuristic_mask', '-no-feature-imageformatplugin', '-no-feature-islamiccivilcalendar', '-no-feature-itemmodeltester', '-no-feature-jalalicalendar', '-no-feature-macdeployqt', '-no-feature-mdiarea', '-no-feature-mimetype', '-no-feature-movie', '-no-feature-network', '-no-feature-poll-exit-on-error', '-no-feature-qmake', '-no-feature-sha3-fast', '-no-feature-sharedmemory', '-no-feature-socks5', '-no-feature-splashscreen', '-no-feature-sql', '-no-feature-sqlmodel', '-no-feature-sspi', '-no-feature-stringlistmodel', '-no-feature-tabletevent', '-no-feature-testlib', '-no-feature-textbrowser', '-no-feature-textmarkdownreader', '-no-feature-textmarkdownwriter', '-no-feature-textodfwriter', '-no-feature-timezone', '-no-feature-topleveldomain', '-no-feature-undoview', '-no-feature-whatsthis', '-no-feature-windeployqt', '-no-feature-wizard', '-no-feature-xml', '-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', '-nomake', 'examples', '-nomake', 'tests', '-force-debug-info', '-intelcet', '-ltcg', '-no-freetype', '-no-harfbuzz', '-platform', 'win32-msvc', '-confirm-license', '-release', '-optimize-size', '-prefix', 'C:\\Users\\user-name\\Documents\\日本語入力\\mozc\\src\\third_party\\qt']' returned non-zero exit status 1.

The path including Japanese characters cause this error. You need to use different directory like `C:\Users\user-name\Documents\japanese-ime\mozc\’ or something.

If your user-name has Japanese characters, you have to change it to build, maybe.