2015-05-17

i686環境でmozcがコンパイル出来ない

自作したmozcのXBPSパッケージがi686の環境だとエラーで作成できないことに気づいた。
 xbps-srcが出力するエラーを見るとmozcのbuild_mozc.pyでビルドする前に設定するところで止まってしまう。

ずっとVoid Linuxは64bit環境で使っていたので気づかなかった。

Linux Mint 17.1 32bit にインストールしたvoid-packagesで実行するとエラーが出る。

INFO: Generating version definition file...
INFO: Version string is 2.17.2077.102
INFO: Running: /usr/bin/python /builddir/mozc-2.17/src/build_tools/ensure_gyp_module_path.py --expected=/builddir/mozc-2.17/src/third_party/gyp/pylib/gyp
INFO: Build tool: ninja
INFO: Running: pkg-config --exists ibus-1.0 >= 1.4.1
INFO: Building GYP command line...
INFO: Running: pkg-config --exists QtCore >= 4.0 QtCore < 5.0 QtGui >= 4.0 QtGui < 5.0
INFO: Running GYP...
INFO: Running: /usr/bin/python /builddir/mozc-2.17/src/third_party/gyp/gyp_main.py --depth=. --include=./gyp/common.gypi -D abs_depth=/builddir/mozc-2.17/src -D additional_third_party_dir=/builddir/mozc-2.17/src/third_party -D python_executable=/usr/bin/python ./base/base.gyp ./base/base_test.gyp ./client/client.gyp ./client/client_test.gyp ./composer/composer.gyp ./config/config.gyp ./config/config_test.gyp ./converter/converter.gyp ./converter/converter_base.gyp ./converter/converter_main.gyp ./converter/converter_test.gyp ./data/test/session/scenario/scenario.gyp ./data/test/session/scenario/usage_stats/usage_stats.gyp ./data_manager/chromeos/chromeos_data_manager.gyp ./data_manager/chromeos/chromeos_data_manager_base.gyp ./data_manager/chromeos/chromeos_data_manager_test.gyp ./data_manager/data_manager.gyp ./data_manager/data_manager_test.gyp ./data_manager/oss/oss_data_manager.gyp ./data_manager/oss/oss_data_manager_base.gyp ./data_manager/oss/oss_data_manager_test.gyp ./data_manager/packed/packed_data_manager.gyp ./data_manager/packed/packed_data_manager_base.gyp ./data_manager/testing/mock_data_manager.gyp ./data_manager/testing/mock_data_manager_base.gyp ./data_manager/testing/mock_data_manager_test.gyp ./dictionary/dictionary.gyp ./dictionary/dictionary_base.gyp ./dictionary/dictionary_test.gyp ./dictionary/file/dictionary_file.gyp ./dictionary/file/dictionary_file_test.gyp ./dictionary/system/system_dictionary.gyp ./dictionary/system/system_dictionary_test.gyp ./engine/engine.gyp ./gui/gui.gyp ./gyp/tests.gyp ./handwriting/handwriting.gyp ./handwriting/handwriting_test.gyp ./handwriting/zinnia.gyp ./ipc/ipc.gyp ./mac/mac.gyp ./net/jsoncpp.gyp ./net/net.gyp ./net/net_test.gyp ./prediction/prediction.gyp ./prediction/prediction_base.gyp ./prediction/prediction_test.gyp ./protobuf/protobuf.gyp ./renderer/renderer.gyp ./rewriter/calculator/calculator.gyp ./rewriter/rewriter.gyp ./rewriter/rewriter_base.gyp ./rewriter/rewriter_test.gyp ./server/server.gyp ./session/session.gyp ./session/session_base.gyp ./session/session_test.gyp ./storage/storage.gyp ./storage/storage_test.gyp ./testing/testing.gyp ./transliteration/transliteration.gyp ./transliteration/transliteration_test.gyp ./unix/emacs/emacs.gyp ./unix/ibus/ibus.gyp ./usage_stats/usage_stats.gyp ./usage_stats/usage_stats_base.gyp ./usage_stats/usage_stats_test.gyp -D branding=Mozc -D use_qt=YES -D qt_dir= -D use_wix=NO -D android_home=None -D android_arch=arm -D android_stl=libcxx -D android_compiler=gcc -D android_ndk_home=None -D android_application_id=org.mozc.android.inputmethod.japanese -D build_base=out_linux -D build_short_base=out_linux -D warn_as_error=0 -D mac_dir=<(DEPTH)/../mac -D channel_dev=1 -D enable_cloud_handwriting=0 -D enable_http_client=0 -D enable_mode_indicator=0 -D target_platform=Linux -D use_dynamically_linked_qt=0 -D use_zinnia=YES -D use_libibus=1 -D dictionary=desktop -D use_separate_collocation_data=0 -D use_separate_connection_data=0 -D use_separate_dictionary=0 -D use_1byte_cost_for_connection_data=0 -D use_packed_dictionary=0 -D pkg_config_command=pkg-config --generator-output=. -G output_dir=out_linux
Traceback (most recent call last):
  File "/builddir/mozc-2.17/src/third_party/gyp/gyp_main.py", line 18, in
    sys.exit(gyp.script_main())
  File "/builddir/mozc-2.17/src/third_party/gyp/pylib/gyp/__init__.py", line 532, in script_main
    return main(sys.argv[1:])
  File "/builddir/mozc-2.17/src/third_party/gyp/pylib/gyp/__init__.py", line 525, in main
    return gyp_main(args)
  File "/builddir/mozc-2.17/src/third_party/gyp/pylib/gyp/__init__.py", line 501, in gyp_main
    params, options.check, options.circular_check)
  File "/builddir/mozc-2.17/src/third_party/gyp/pylib/gyp/__init__.py", line 129, in Load
    params['parallel'], params['root_targets'])
  File "/builddir/mozc-2.17/src/third_party/gyp/pylib/gyp/input.py", line 2730, in Load
    check, generator_input_info)
  File "/builddir/mozc-2.17/src/third_party/gyp/pylib/gyp/input.py", line 596, in LoadTargetBuildFilesParallel
    parallel_state.pool = multiprocessing.Pool(multiprocessing.cpu_count())
  File "/usr/lib/python2.7/multiprocessing/__init__.py", line 232, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 138, in __init__
    self._setup_queues()
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 234, in _setup_queues
    self._inqueue = SimpleQueue()
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 352, in __init__
    self._rlock = Lock()
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1)
  File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__
    sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 13] Permission denied
Traceback (most recent call last):
  File "src/build_mozc.py", line 1454, in
    main()
  File "src/build_mozc.py", line 1450, in main
    procedure[1](cmd_opts, cmd_args, original_directory_name)
  File "src/build_mozc.py", line 953, in GypMain
    RunOrDie(gyp_command + gyp_options)
  File "/builddir/mozc-2.17/src/build_tools/util.py", line 99, in RunOrDie
    '==========']))
build_tools.util.RunOrDieError:
==========
 ERROR: /usr/bin/python /builddir/mozc-2.17/src/third_party/gyp/gyp_main.py --depth=. --include=./gyp/common.gypi -D abs_depth=/builddir/mozc-2.17/src -D additional_third_party_dir=/builddir/mozc-2.17/src/third_party -D python_executable=/usr/bin/python ./base/base.gyp ./base/base_test.gyp ./client/client.gyp ./client/client_test.gyp ./composer/composer.gyp ./config/config.gyp ./config/config_test.gyp ./converter/converter.gyp ./converter/converter_base.gyp ./converter/converter_main.gyp ./converter/converter_test.gyp ./data/test/session/scenario/scenario.gyp ./data/test/session/scenario/usage_stats/usage_stats.gyp ./data_manager/chromeos/chromeos_data_manager.gyp ./data_manager/chromeos/chromeos_data_manager_base.gyp ./data_manager/chromeos/chromeos_data_manager_test.gyp ./data_manager/data_manager.gyp ./data_manager/data_manager_test.gyp ./data_manager/oss/oss_data_manager.gyp ./data_manager/oss/oss_data_manager_base.gyp ./data_manager/oss/oss_data_manager_test.gyp ./data_manager/packed/packed_data_manager.gyp ./data_manager/packed/packed_data_manager_base.gyp ./data_manager/testing/mock_data_manager.gyp ./data_manager/testing/mock_data_manager_base.gyp ./data_manager/testing/mock_data_manager_test.gyp ./dictionary/dictionary.gyp ./dictionary/dictionary_base.gyp ./dictionary/dictionary_test.gyp ./dictionary/file/dictionary_file.gyp ./dictionary/file/dictionary_file_test.gyp ./dictionary/system/system_dictionary.gyp ./dictionary/system/system_dictionary_test.gyp ./engine/engine.gyp ./gui/gui.gyp ./gyp/tests.gyp ./handwriting/handwriting.gyp ./handwriting/handwriting_test.gyp ./handwriting/zinnia.gyp ./ipc/ipc.gyp ./mac/mac.gyp ./net/jsoncpp.gyp ./net/net.gyp ./net/net_test.gyp ./prediction/prediction.gyp ./prediction/prediction_base.gyp ./prediction/prediction_test.gyp ./protobuf/protobuf.gyp ./renderer/renderer.gyp ./rewriter/calculator/calculator.gyp ./rewriter/rewriter.gyp ./rewriter/rewriter_base.gyp ./rewriter/rewriter_test.gyp ./server/server.gyp ./session/session.gyp ./session/session_base.gyp ./session/session_test.gyp ./storage/storage.gyp ./storage/storage_test.gyp ./testing/testing.gyp ./transliteration/transliteration.gyp ./transliteration/transliteration_test.gyp ./unix/emacs/emacs.gyp ./unix/ibus/ibus.gyp ./usage_stats/usage_stats.gyp ./usage_stats/usage_stats_base.gyp ./usage_stats/usage_stats_test.gyp -D branding=Mozc -D use_qt=YES -D qt_dir= -D use_wix=NO -D android_home=None -D android_arch=arm -D android_stl=libcxx -D android_compiler=gcc -D android_ndk_home=None -D android_application_id=org.mozc.android.inputmethod.japanese -D build_base=out_linux -D build_short_base=out_linux -D warn_as_error=0 -D mac_dir=<(DEPTH)/../mac -D channel_dev=1 -D enable_cloud_handwriting=0 -D enable_http_client=0 -D enable_mode_indicator=0 -D target_platform=Linux -D use_dynamically_linked_qt=0 -D use_zinnia=YES -D use_libibus=1 -D dictionary=desktop -D use_separate_collocation_data=0 -D use_separate_connection_data=0 -D use_separate_dictionary=0 -D use_1byte_cost_for_connection_data=0 -D use_packed_dictionary=0 -D pkg_config_command=pkg-config --generator-output=. -G output_dir=out_linux
==========

=> ERROR: mozc-2.17_1: failed to run post_configure() at line 53.


と、こんな感じで止まってしまう。
エラーに書かれているtemplateファイルのpost_configure() 53行目を見るとGYP_DEFINESの設定だけど、何が悪いのかさっぱりわからない。
Tracebackの部分を見ながらそれぞれのファイルを観てもPythonそこまで詳しくないのでわからず。


gypのオプションを観ても関係ありそうなオプション無いし。

mozcのバージョンを1.xまで落としても同じエラーが出るし。

VMware Player上にvoid i686環境作って試してみるかなぁ。でも結局認識されるCPUはXeonだからどうなるかわからないけど。

0 件のコメント:

コメントを投稿