Santhu / mozc

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

BuildinDocker fails when building for Android #269

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I followed instruction (https://code.google.com/p/mozc/wiki/BuildInDocker) to 
created an Ubuntu14.04 container and tried the following command in the 
container:

$ python build_mozc.py gyp --target_platform=Android

Then, I faced the following error:

gyp: Call to 
'/home/mozc_builder/work/android-ndk-r10c/build/tools/make-standalone-toolchain.
sh "--toolchain=arm-linux-androideabi-4.9" "--stl=stlport" 
"--install-dir=/home/mozc_builder/work/mozc/src/out_android/mozc_build_tools/ndk
-standalone-toolchain/arm" "--platform=android-14"' returned exit status 1.
Traceback (most recent call last):
  File "build_mozc.py", line 1478, in <module>
    main()
  File "build_mozc.py", line 1474, in main
    procedure[1](cmd_opts, cmd_args, original_directory_name)
  File "build_mozc.py", line 958, in GypMain
    RunOrDie(gyp_command + gyp_options)
  File "/home/mozc_builder/work/mozc/src/build_tools/util.py", line 99, in RunOrDie
    '==========']))
build_tools.util.RunOrDieError:

I give some more informations:

1. I manually called the command gyp tried to call but failed and it does work 
on command line.
2. targeting Linux (python build_mozc.py gyp) does work as well.

Could anyone help?

Original issue reported on code.google.com by integra...@gmail.com on 9 Jan 2015 at 1:10

GoogleCodeExporter commented 9 years ago
Can you recreate docker container to see something changes?

> gyp: Call to 
'/home/mozc_builder/work/android-ndk-r10c/build/tools/make-standalone-toolchain.
sh "--toolchain=arm-linux-androideabi-4.9" "--stl=stlport" 
"--install-dir=/home/mozc_builder/work/mozc/src/out_android/mozc_build_tools/ndk
-standalone-toolchain/arm" "--platform=android-14"' returned exit status 1.

This error message is concerning, because we have already switched to Android 
NDK r10d from Android NDK r10c in r467, and I made sure that Dockerfile was 
updated to download NDK r10d rather than r10c.  When did you create the 
container?  Seems like your container is still pointing Android NDK r10c.  
Basically you need to update the container itself every time when Dockerfile is 
updated.

https://code.google.com/p/mozc/source/list?path=/trunk/src/docker/ubuntu12.04/Do
ckerfile
https://code.google.com/p/mozc/source/list?path=/trunk/src/docker/ubuntu14.04/Do
ckerfile

Original comment by yukawa@google.com on 10 Jan 2015 at 7:51

GoogleCodeExporter commented 9 years ago
Sorry, I used older version...
Today I tried again using the newest version (r480) but still have same problem.

gyp: Call to 
'/home/mozc_builder/work/android-ndk-r10d/build/tools/make-standalone-toolchain.
sh "--toolchain=arm-linux-androideabi-4.9" "--stl=stlport" 
"--install-dir=/home/mozc_builder/work/mozc/src/out_android/mozc_build_tools/ndk
-standalone-toolchain/arm" "--platform=android-14"' returned exit status 1.
Traceback (most recent call last):
  File "build_mozc.py", line 1478, in <module>
    main()
  File "build_mozc.py", line 1474, in main
    procedure[1](cmd_opts, cmd_args, original_directory_name)
  File "build_mozc.py", line 958, in GypMain
    RunOrDie(gyp_command + gyp_options)
  File "/home/mozc_builder/work/mozc/src/build_tools/util.py", line 99, in RunOrDie
    '==========']))
build_tools.util.RunOrDieError:

Original comment by integra...@gmail.com on 10 Jan 2015 at 10:34

GoogleCodeExporter commented 9 years ago
Yep, now I can reproduce the build failure. Sorry for the breakage. It's a 
recent regression caused by r477.  One more bad news is that seems that even 
reverting r477, seems that the build is still broken in Ubuntu 12.04 
environment.  I confirmed that we can build Mozc for Android as follows.

# Set up container with Ubuntu 14.04.
svn export https://mozc.googlecode.com/svn/trunk/src/docker/ubuntu14.04 
mozc_in_docker
cd mozc_in_docker
sudo docker build --rm -t $USER/mozc_ubuntu14.04 .
sudo docker run --interactive --tty --rm $USER/mozc_ubuntu14.04

# Build Mozc for Android after reverting r477
svn merge --accept mine-full -c -477 http://mozc.googlecode.com/svn/trunk/src
python build_mozc.py gyp --target_platform=Android
python build_mozc.py build -c Release android/android.gyp:apk

Again, sorry for the breakage.  I'll revert r477 shortly.

Original comment by yukawa@google.com on 10 Jan 2015 at 12:45

GoogleCodeExporter commented 9 years ago
Thank you for the quick response.
Now I can build Mozc for Android following your instruction.

Original comment by integra...@gmail.com on 11 Jan 2015 at 3:59

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r481.

Original comment by yukawa@google.com on 17 Jan 2015 at 8:53