pristineio / webrtc-build-scripts

A set of build scripts useful for building WebRTC libraries for Android and iOS.
BSD 3-Clause "New" or "Revised" License
1.13k stars 447 forks source link

Building for armv7 instead of arm64 #140

Open jngd opened 9 years ago

jngd commented 9 years ago

I'm building WebRTC for iOS. To do that, I'm using the following bash script:

# Set flags to compile in arm64
export GYP_GENERATORS="ninja"
export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=1 libjingle_objc=1 OS=ios target_arch=arm64"
export GYP_GENERATOR_FLAGS="output_dir=out_ios_arm64"
export GYP_CROSSCOMPILE=1

# Generate metadata for compile
gclient runhooks

# Compile webRTC in Release and verbose mode
ninja -v -C src/out_ios_arm64/Release-iphoneos AppRTCDemo

In the same machine and the same dir, I have compiled for armv7 and now when I try to build with the code above, the library is compiled for armv7. Maybe I have some metadata info in my dir that I'm not removing or something but I understand that if I set target_arch=arm64 in my GYP_DEFINES I should see my library compiled for this arch. Any idea what could be happening?

P.D: I need to build for both (armv7 and arm64) in order to generate with lipo an universal lib.

zevarito commented 9 years ago

Did you run webrtc/build/gyp_webrtc after set ENV variables and before compile?

2015-11-05 13:30 GMT-02:00 jngd notifications@github.com:

I'm building WebRTC for iOS. To do that, I'm using the following bash script:

Set flags to compile in arm64export GYP_GENERATORS="ninja"export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=1 libjingle_objc=1 OS=ios target_arch=arm64"export GYP_GENERATOR_FLAGS="output_dir=out_ios_arm64"export GYP_CROSSCOMPILE=1

Generate metadata for compile

gclient runhooks

Compile webRTC in Release and verbose mode

ninja -v -C src/out_ios_arm64/Release-iphoneos AppRTCDemo

In the same machine and the same dir, I have compiled for armv7 and now when I try to build with the code above, the library is compiled for armv7. Maybe I have some metadata info in my dir that I'm not removing or something but I understand that if I set target_arch=arm64 in my GYP_DEFINES I should see my library compiled for this arch. Any idea what could be happening?

P.D: I need to build for both (armv7 and arm64) in order to generate with lipo an universal lib.

— Reply to this email directly or view it on GitHub https://github.com/pristineio/webrtc-build-scripts/issues/140.

Alvaro

jngd commented 9 years ago

@zevarito No, is that neccesary?

jngd commented 9 years ago

@zevarito I tried that, but not working

zevarito commented 9 years ago

I followed this [0] without problem, but it isn't webrtc-build-scripts.

[0] http://www.webrtc.org/native-code/ios

2015-11-06 10:52 GMT-02:00 jngd notifications@github.com:

@zevarito https://github.com/zevarito I tried that, but not working

— Reply to this email directly or view it on GitHub https://github.com/pristineio/webrtc-build-scripts/issues/140#issuecomment-154402591 .

Alvaro

jngd commented 9 years ago

@zevarito Me too the first time that I have build, but the following times I get this error always. So strange ...

liwuking commented 8 years ago

@jngd are you success ,I met with you the same question