wutingcindy / gyp

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

Build flavor Android from OSX #287

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Checkout webrtc/sync repo
1. source build/android/envsetup.sh
2. gclient runhooks
3. make

What is the expected output? What do you see instead?

Should build just fine ideally, but it doesn't. Because this configuration of 
setting flavor to android defaults to a mix of android specific binaries, and 
linux tools like flock, it fails on OSX. It not that hard to get running and 
have built, but need some help finalizing a patch from someone who's more 
familiar with the code.

What version of the product are you using? On what operating system?
gyp@1416

Please provide any additional information below.

I'm attaching a rough patch. This falls short of the final patch in that it has 
unimplemented features.
1) I can't figure out how best to copy mac-tool to gyp-mac-tool in my build 
directories and it isn't working.
2) ar and ld commands aren't using the correct ones included in the ndk 
toolchain. As a workaround, I can add it to path and everything builds fine.

Original issue reported on code.google.com by luke.we...@gmail.com on 19 Jul 2012 at 12:57

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I've sovled point 2 on this one.

anyone know how I can solve copying over gyp-mac-tool.

Original comment by luke.we...@gmail.com on 19 Jul 2012 at 5:10

GoogleCodeExporter commented 9 years ago
I've added allowing the override of AR, RANLIB, LD binaries if defined like 
this in a gyp

         ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
         ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g++)'],
         ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
+        ['AR', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} 
${ANDROID_TOOLCHAIN}/*-ar)'],
+        ['LD', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} 
${ANDROID_TOOLCHAIN}/*-ld)'],
+        ['RANLIB', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} 
${ANDROID_TOOLCHAIN}/*-ranlib)'],

Original comment by luke.we...@gmail.com on 19 Jul 2012 at 6:22

Attachments:

GoogleCodeExporter commented 9 years ago
Okay, this seems to work.

Original comment by luke.we...@gmail.com on 20 Jul 2012 at 9:11

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
https://chromiumcodereview.appspot.com/10807048 - Changeset needed to make the 
build actually support a mac compile.

Original comment by luke.we...@gmail.com on 20 Jul 2012 at 11:04

GoogleCodeExporter commented 9 years ago
 On webrtc trunk, this now builds for android on osx.

.....
LINK(target) out/Release/metrics_unittests
  LINK(target) out/Release/metrics_unittests: Finished
  CXX(target) out/Release/obj.target/test_support_unittests/src/test/testsupport/fileutils_unittest.o
  CXX(target) out/Release/obj.target/test_support_unittests/src/test/testsupport/frame_reader_unittest.o
  CXX(target) out/Release/obj.target/test_support_unittests/src/test/testsupport/frame_writer_unittest.o
  CXX(target) out/Release/obj.target/test_support_unittests/src/test/testsupport/packet_reader_unittest.o
  LINK(target) out/Release/test_support_unittests
  LINK(target) out/Release/test_support_unittests: Finished
  CXX(target) out/Release/obj.target/rgba_to_i420_converter/src/test/testsupport/converter/converter.o
  CXX(target) out/Release/obj.target/rgba_to_i420_converter/src/test/testsupport/converter/rgba_to_i420_converter.o
  LINK(target) out/Release/rgba_to_i420_converter
  LINK(target) out/Release/rgba_to_i420_converter: Finished
  CXX(target) out/Release/obj.target/audio_e2e_harness/tools/e2e_quality/audio/audio_e2e_harness.o
  LINK(target) out/Release/audio_e2e_harness
  LINK(target) out/Release/audio_e2e_harness: Finished
  TOUCH out/Release/obj.target/All.stamp

Original comment by luke.we...@gmail.com on 20 Jul 2012 at 12:36

GoogleCodeExporter commented 9 years ago
Gyp change here. The stuff for ninja isn't complete, but only the changes to 
make are needed to make this work for compiling webrtc on mac. Know chrome 
needs ninja, but don't have the time learn and rewrite it, but this gets you at 
least closer on one particular project.

https://chromiumcodereview.appspot.com/10795044

Original comment by luke.we...@gmail.com on 16 Nov 2012 at 10:10