pombreda / mozc

Automatically exported from code.google.com/p/mozc
0 stars 0 forks source link

build_mozc.py always generates 32 bit binaries on 64 bit OSX #187

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
After building using the following commands:

  GYP_DEFINES="mac_sdk=10.7 mac_deployment_target=10.7" python build_mozc.py gyp --noqt
  python build_mozc.py build_tools -c Release
  python build_mozc.py build -c Release mac/mac.gyp:GoogleJapaneseInput mac/mac.gyp:gen_launchd_confs

Binaries are successfully generated in out_mac/Release, but each one is an i386 
32 bit binary according to lipo:

  $ lipo -info libsystem_dictionary.a
  Non-fat file: libsystem_dictionary.a is architecture: i386

I've tried specifying that I want x86_64 binaries in gyp/common.gypi:

  'SDKROOT': 'macosx<(mac_sdk)',
  'ARCHS': 'x86_64',

But when I try to rebuild using this modified common.gypi I get the attached 
output. 

Is there a way I can generate 64 bit binaries?

Original issue reported on code.google.com by m...@pierscowburn.com on 8 Apr 2013 at 2:41

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thank you for reporting this issue.

Currently, building Mac Mozc 64 bit binary is not supported.
This is because Mozc renderer is using CarbonAPI.

Original comment by h...@google.com on 10 Apr 2013 at 7:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks for the update. Actually, I'm not worried about the renderer as I just 
need the various libraries to link to. In this case, should I be able to build 
64 bit binaries of just the libraries themselves?

Original comment by m...@pierscowburn.com on 10 Apr 2013 at 9:49

GoogleCodeExporter commented 9 years ago
I created a patch to make converter_main compilable to Mac OS X 64bit binary.
Please try it.

$ patch -p1 -d src < ../OSX_64bit_converter_main.patch
$ cd src
$ python build_mozc.py clean
$ GYP_DEFINES="mac_sdk=10.7 mac_deployment_target=10.7" python build_mozc.py 
gyp --noqt
$ python build_mozc.py build_tools -c Release
$ python build_mozc.py build -c Release 
converter/converter_main.gyp:converter_main
$ lipo -info  out_mac/Release/converter_main
Non-fat file: out_mac/Release/converter_main is architecture: x86_64
$ out_mac/Release/converter_main
startconversion にほんご
{
  seg 0 [segtype=0 key=にほんご
    cand -1 (key=にほんご ckey=にほんご val=にほんご cval=にほんご cost=0 scost=0 wcost=0 lid=2032 rid=2032 attributes=128 consumed_key_size=0 description=ひらがな)
    cand -2 (key=にほんご ckey=にほんご val=ニホンゴ cval=ニホンゴ cost=0 scost=0 wcost=0 lid=2032 rid=2032 attributes=128 consumed_key_size=0 description=[全] カタカナ)
    cand -3 (key=にほんご ckey=にほんご val=にほんご cval=にほんご cost=0 scost=0 wcost=0 lid=2025 rid=2025 attributes=128 consumed_key_size=0 description=ひらがな)
    cand -4 (key=にほんご ckey=にほんご val=にほんご cval=にほんご cost=0 scost=0 wcost=0 lid=2025 rid=2025 attributes=128 consumed_key_size=0 description=ひらがな)
    cand -5 (key=にほんご ckey=にほんご val=にほんご cval=にほんご cost=0 scost=0 wcost=0 lid=2025 rid=2025 attributes=128 consumed_key_size=0 description=ひらがな)
    cand -6 (key=にほんご ckey=にほんご val=にほんご cval=にほんご cost=0 scost=0 wcost=0 lid=2025 rid=2025 attributes=128 consumed_key_size=0 description=ひらがな)
    cand -7 (key=にほんご ckey=にほんご val=にほんご cval=にほんご cost=0 scost=0 wcost=0 lid=2025 rid=2025 attributes=128 consumed_key_size=0 description=ひらがな)
    cand -8 (key=にほんご ckey=にほんご val=にほんご cval=にほんご cost=0 scost=0 wcost=0 lid=2025 rid=2025 attributes=128 consumed_key_size=0 description=ひらがな)
    cand -9 (key=にほんご ckey=にほんご val=にほんご cval=にほんご cost=0 scost=0 wcost=0 lid=2025 rid=2025 attributes=128 consumed_key_size=0 description=ひらがな)
    cand -10 (key=にほんご ckey=にほんご val=にほんご cval=にほんご cost=0 scost=0 wcost=0 lid=2025 rid=2025 attributes=128 consumed_key_size=0 description=ひらがな)
    cand -11 (key=にほんご ckey=にほんご val=ニホンゴ cval=ニホンゴ cost=0 scost=0 wcost=0 lid=2032 rid=2032 attributes=128 consumed_key_size=0 description=[半] カタカナ)
    cand 0 (key=にほんご ckey=にほんご val=日本語 cval=日本語 cost=5092 scost=0 wcost=4141 lid=2032 rid=2032 attributes=129 consumed_key_size=0)
    cand 1 (key=にほんご ckey=にほんご val=ニホンゴ cval=ニホンゴ cost=8705 scost=0 wcost=7754 lid=2032 rid=2032 attributes=128 consumed_key_size=0 description=[全] カタカナ)
    cand 2 (key=にほんご ckey=にほんご val=にほんご cval=にほんご cost=8706 scost=1 wcost=7755 lid=2032 rid=2032 attributes=128 consumed_key_size=0 description=ひらがな)
    cand 3 (key=にほんご ckey=にほんご val=ニホンゴ cval=ニホンゴ cost=8707 scost=2 wcost=7756 lid=2032 rid=2032 attributes=128 consumed_key_size=0 description=[全] カタカナ)
]
}

Original comment by h...@google.com on 10 Apr 2013 at 12:36

Attachments: