skufog / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

ios build fails #308

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
[41/153] LINK compare, POSTBUILDS
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ 
-Wl,-search_paths_first -miphoneos-version-min=6.0 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
/SDKs/iPhoneOS6.0.sdk -arch armv7 -L. -o compare obj/util/compare.compare.o 
libyuv.a  
Undefined symbols for architecture armv7:
  "_SumSquareError_NEON", referenced from:
      _ComputeSumSquareError in libyuv.a(libyuv.compare.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

also the libyuv.gtp produces 2 static libraries, not one.

Original issue reported on code.google.com by fbarch...@chromium.org on 15 Jan 2014 at 3:08

GoogleCodeExporter commented 9 years ago
fixed in r973 - link error.  still builds 2 libs and does not merge them.

Original comment by fbarch...@chromium.org on 15 Jan 2014 at 3:17

GoogleCodeExporter commented 9 years ago
I think the fix (r973) breaks i386. When building the webrtc library 
(AppRTCDemo) from trunk (r5487) for the iOS simulator:

[565/2103] LIBTOOL-STATIC libyuv_neon.a, POSTBUILDS
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: warning for library: libyuv_neon.a the table of contents is 
empty (no object file members in the library define global symbols)

[2102/2103] LINK AppRTCDemo.app/AppRTCDemo, POSTBUILDS
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang -framework 
Foundation -framework UIKit -framework IOKit -framework Security -framework 
SystemConfiguration -framework AVFoundation -framework CoreMedia -framework 
CoreVideo -framework OpenGLES -framework QuartzCore -Wl,-search_paths_first 
-Wl,-ObjC -mios-simulator-version-min=6.0 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/De
veloper/SDKs/iPhoneSimulator7.0.sdk -arch i386 -L. -o AppRTCDemo.app/AppRTCDemo 
obj/talk/examples/ios/AppRTCDemo/AppRTCDemo.APPRTCAppClient.o 
obj/talk/examples/ios/AppRTCDemo/AppRTCDemo.APPRTCAppDelegate.o 
obj/talk/examples/ios/AppRTCDemo/AppRTCDemo.APPRTCViewController.o 
obj/talk/examples/ios/AppRTCDemo/AppRTCDemo.GAEChannelClient.o 
obj/talk/examples/ios/AppRTCDemo/AppRTCDemo.main.o libcrssl.a libcrnspr.a 
libcrnss.a libjingle_peerconnection_objc.a libnss_static.a libsqlite_regexp.a 
libicui18n.a libicuuc.a libicudata.a libcrnssckbi.a libjingle_peerconnection.a 
libjingle.a libexpat.a libjsoncpp.a libjingle_media.a libyuv.a libyuv_neon.a 
libvideo_capture_module.a libwebrtc_utility.a libaudio_coding_module.a libCNG.a 
libcommon_audio.a libsystem_wrappers.a libcommon_audio_sse2.a libG711.a 
libG722.a libiLBC.a libiSAC.a libiSACFix.a libPCM16B.a libNetEq.a 
libwebrtc_opus.a libopus.a libacm2.a libNetEq4.a libmedia_file.a 
libwebrtc_video_coding.a libwebrtc_i420.a libcommon_video.a 
libvideo_coding_utility.a libwebrtc_vp8.a libvpx.a libvpx_asm_offsets_vp8.a 
libvpx_intrinsics_mmx.a libvpx_intrinsics_sse2.a libvpx_intrinsics_ssse3.a 
libvideo_render_module.a libvideo_engine_core.a librtp_rtcp.a libpaced_sender.a 
libremote_bitrate_estimator.a librbe_components.a libbitrate_controller.a 
libvideo_processing.a libvideo_processing_sse2.a libvoice_engine.a 
libaudio_conference_mixer.a libaudio_processing.a libaudio_processing_sse2.a 
libaudio_device.a libjingle_sound.a libjingle_p2p.a libsrtp.a  
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/De
veloper/SDKs/iPhoneSimulator7.0.sdk/usr/lib/libsqlite3.dylib -framework 
Foundation -lstdc++ -framework AudioToolbox -framework CoreAudio
Undefined symbols for architecture i386:
  "_ABGRToUVRow_NEON", referenced from:
      _ABGRToUVRow_Any_NEON in libyuv.a(libyuv.row_any.o)
[..]

It works fine when either building for device (armv7) or when reverting r973.

Original comment by matthias...@gmail.com on 4 Feb 2014 at 9:02

GoogleCodeExporter commented 9 years ago
Was r972
       ['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', {

Now r973
           ['OS == "ios" or (target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1))', {

so that if target is ios, it'll build the NEON code.

Original comment by fbarch...@google.com on 5 Feb 2014 at 1:10

GoogleCodeExporter commented 9 years ago
target_arch is normally "armv7" for ios, but in future it could be armv8, and 
in past (iphone3g) was "armv6".
the simulator is "ia32".

Original comment by fbarch...@google.com on 5 Feb 2014 at 7:12

GoogleCodeExporter commented 9 years ago
So, would the following be acceptable?

       ['(OS == "ios" and target_arch != "ia32") or (target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1))', {

This works for me (both, ia32 and armv7).

Original comment by matthias...@gmail.com on 5 Feb 2014 at 8:07

GoogleCodeExporter commented 9 years ago
what if target_arch == "x64" in future?

target_arch == "armv7" or (target_arch == "arm" and arm_version >= 7) ... ?

apparently arm_neon == 1 will be on even for armv6 and we should ignore it.

Original comment by fbarch...@google.com on 5 Feb 2014 at 9:58

GoogleCodeExporter commented 9 years ago
This is the current proposal

('target_arch == "armv7" or 'target_arch == "armv8" or (target_arch == "arm" 
and arm_version >= 7)) and (arm_neon == 1 or arm_neon_optional == 1)

Original comment by fbarch...@google.com on 5 Feb 2014 at 10:16

GoogleCodeExporter commented 9 years ago
fixed in r979
'(target_arch == "armv7" or target_arch == "armv8" or (target_arch == "arm" and 
arm_version >= 7)) and (arm_neon == 1 or arm_neon_optional == 1)'

Original comment by fbarch...@google.com on 6 Feb 2014 at 12:28