Reputation: 11625
I'm trying to build MobileVLC on OS X Lion, against iOS SDK 5.0. So far, no dice.
Followed the given instructions, however, build stops and fails here: [info] Building contrib for iOS in '/Users/shamil/Documents/MobileVLC/ImportedSources/vlc/contrib-builddir-ios-i686-apple-darwin10
Current log: ./buildMobileVLC.sh -s [info] Preparing build dirs [info] Building [info] Building vlc [info] Building libvlc for the iOS [info] Using i386 with SDK version 4.2 [info] Building contrib for iOS in '/Users/shamil/Documents/MobileVLC/ImportedSources/vlc/contrib-builddir-ios-i686-apple-darwin10'
The error is given as follows:
make[1]: *** [.ffmpeg] Error 1
make: *** [using-src] Error 2
/ImportedSources/vlc/contrib-builddir-ios-arm-apple-darwin10/build-src/ffmpeg/config.log tells me:
ld: warning: directory not found for option 'L/Users/shamil/Documents/MobileVLC/ImportedSources/vlc/contrib-ios-arm-apple-darwin10/lib'
ld: warning: directory not found for option '-L/Users/shamil/Documents/MobileVLC/ImportedSources/vlc/contrib-ios-arm-apple-darwin10/lib'
**ld: in /usr/lib/system/libcache.dylib, missing required architecture armv7 in file for architecture armv7**
collect2: ld returned 1 exit status
C compiler test failed.
I've bolded the one which I think is causing it to fail. Now - how do I fix THIS error?
Upvotes: 2
Views: 2939
Reputation: 5825
This got it to work for me:
./configure --extra-ldflags=-L/Applications/Xcode.app/Contents//Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/system --enable-cross-compile --arch=arm --target-os=darwin --cc='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc -arch armv7' --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk --cpu=cortex-a8 --enable-pic --extra-ldflags='-arch armv7'
Upvotes: 1
Reputation: 410
Add "-L$(SDKROOT)/usr/lib/system" to LDFLAGS variable.
Where SDKROOT is the directory that points to the latest iOS.
e.g: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
Upvotes: 1