build of MobileVLC for iOS fails - iphone

I'm trying to compile VLC player for iOS.
I've cloned git from repo, a tried to run "buildMobileVLC.sh" (using this wiki documentation)
$ git clone git://git.videolan.org/MobileVLC.git
$ cd MobileVLC
$ ./buildMobileVLC.sh
But as the result I have in terminal next:
SDKROOT not specified, assuming /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
*** /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk does not exist, please install required SDK, or set SDKROOT manually. ***
Even this
./buildMobileVLC.sh -k iphoneos5.0
can't help to solve the problem
P.S. When I try:
./buildMobileVLC.sh -h
It says
-k Specify which sdk to use (see 'xcodebuild -showsdks', current: iphoneos5.0)
What am I doing wrong? And should I install iPhone SDK 5.1, if "yes", then how?
UPD:
I changed
SDK_VERSION=5.0
in file "build.sh" in /Users//MobileVLC/ImportedSources/vlc/extras/package/ios
The error disappeared but the new error in Terminal is:
./libavutil/arm/asm.S:180:cannot use register index with PC-relative addressing -- `ldr r4,[pc,r4]'
./libavutil/arm/asm.S:180:cannot use register index with PC-relative addressing -- `ldr lr,[pc,lr]'
clang: error: assembler command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libavcodec/arm/ac3dsp_armv6.o] Error 1
make: *** [.ffmpeg] Error 2

Yes you should install the iOS SDK, you can get it by installing Xcode from the Appstore.
Error is telling you that the SDK can not be found, after you install Xcode the SDK will be installed.
With the new Xcode the SDK is in the Xcode bundle, /Applications/Xcode.app/Contents/Developer
As suggest you could set the SDKROOT to this path if it can't find the SDK.
It appears that the mobile build for VLC is broken: http://forum.videolan.org/viewtopic.php?f=12&t=103322

Related

Xcode 9.2: linker command failed with exit code 1 (use -v to see invocation)

I installed Cocoapods. I used GoogleMaps. When I build workspace on my device i get this error: Error
I also tried all this instructions: Linker command failed with exit code 1 after installing CocoaPods and firebase pod
P.S. Building on simulator works
Probably you've already check if you've open the .xcworkspace created in your project folder.(NOT .xcodeproj)
If still doesn't work try
Go to Project Settings.
Go to Build Settings.
Change BUILD ACTIVE
ARCHITECTURE ONLY to NO.

Running Swift build in Terminal leading to "Platform Path" errors

I recently reformatted my Mac. Today I tried building a swift executable via Terminal to start a server-side swift project. Here are the commands I've used:
swift package init --type executable
swift build
Upon running swift build, I got the following errors:
xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
I'm running Xcode 8.3.1.
Thanks in advance!
Try fixing the SDK path (yours appears incorrect):
$ xcrun --show-sdk-path --sdk macosx
You might have this result:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
Switch the default SDK location by invoking:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
If that doesn't work then take a look inside the (normal) SDK path:
$ ls -lat /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
You should see the SDK's within that directory; if not you'll need to download them.
Select a version of Xcode which can run the swift build command by running, for instance:
sudo xcode-select -switch /Applications/Xcode-8.3.3.app
Where Xcode-8.3.3 is the name of your Xcode application

Command Line Tool - Error - xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH

I am getting this error while building the SwiftJSON framework to the Some Xcode project through Carthage Dependency Manager.
Sivaramaiahs-Mac-mini:GZipDemoApp vsoftMacmini5$ carthage update
--platform iOS
*** Fetching GzipSwift
*** Fetching SwiftyJSON
*** Checking out GzipSwift at "3.1.1"
*** Downloading SwiftyJSON.framework binary at "3.1.3"
*** xcodebuild output can be found in /var/folders/7m/y0r2mdhn0f16zz1nlt34ypzr0000gn/T/carthage-xcodebuild.apLXCc.log
A shell task (/usr/bin/xcrun xcodebuild -project
/Users/vsoftMacmini5/Desktop/GZipDemoApp/Carthage/Checkouts/GzipSwift/Gzip.xcodeproj
CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES -list)
failed with exit code 72:
xcrun: error: unable to find utility "xcodebuild", not a developer
tool or in PATH
I solved that problem by setting the Command Line Tools in Xcode. Go to:
Xcode > Preferences > Locations
And select the command line tool from the dropdown. If you have only one version of Xcode installed, there should be only one option. If you have several versions of Xcode, then you must choose the one you need.
Update (added image for reference)
The simplest fix is from CLI:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
(this should be path to your Xcode.app)
By the way this can happen even if you have only one version of Xcode . It happens when you instal homebrew before the first Xcode installation (which makes sense because you may want to install Xcode through mas install 497799835 and mas needs homebrew).
Following command worked for me
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

swift build doesn't work

I'm trying to run Kitura project on XCode. I tried to follow instructions on this page ([https://github.com/IBM-Swift/Kitura/wiki/Building-your-Kitura-application-on-XCode]), however I failed with step 3 – run swift build -X. I get this error:
error: unable to invoke subcommand: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build (No such file or directory)
Looks like I have latest toolchain installed (see the screenshot below).
I also have both XCode 7.3.1 and XCode 8 beta. What would you suggest to solve that problem?
As Daniel mentioned above, Kitura right now requires use of the June 6 drop of the Swift Development toolchain. This toolchain can only be used with Xcode v7.3.1. The toolchain format changed between Xcode 7.x and newer Xcode 8 beta. When using the Xcode 8 beta with the new June 20 toolchain, there's another step that you need to do before you can run swift build from the command line.
From the command line, enter the following command:
$ sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer/
This command is necessary to inform Xcode where to find the required binaries and frameworks.
To switch it back, just use the same command but point it at non-beta version of Xcode:
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/
Using these commands will eliminate the error <unknown>:0: error: Swift does not support the SDK 'MacOSX10.11.sdk' error: exit(1): that you ran into.
The Xcode 8 beta will be required to be used for all future Swift.org toolchains unless otherwise specified.
As of this writing, Kitura only compiles with the 06-06 Swift Development toolchain so make sure you have that installed.
In addition the wiki was out of date, the generate Xcode project command got renamed to swift package generate-xcodeproj. I updated the wiki to reflect this change.
Try:
export PATH=/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:"${PATH}"

Ionic emulate Ios fails to run The session does not open my app

Ionic emulate ios failed on Mac OS Yosemite. Their have some cases were the ios device emulated, but shortly after the terminal console shoots up the error message below.
** BUILD SUCCEEDED **
No target specified for emulator. Deploying to iPhone-6 simulator
An error was encountered processing the command (code=146):
Invalid device state
An error was encountered processing the command (code=146):
Exception encountered connecting to CoreSimulatorBridge: Unable to connect to CoreSimulatorBridge
ENOENT, no such file or directory '/Users/yay/Library/Logs/CoreSimulator/2CAA2C39-7F22-4AF2-BBDE-86609188F37C/system.log'
Error code 1 for command: ios-sim with args: launch,/Users/yay/code/myApp/platforms/ios/build/emulator/myApp.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users/yay/code/myApp/platforms/ios/cordova/console.log,--stdout,/Users/yay/code/myApp/platforms/ios/cordova/console.log,--exit
Error: /Users/yay/code/myApp/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
The issue is because you used sudo to create and/or build the project.
Just input these commands (without the $ of course):
1) Remove with sudo
$ sudo ionic platform remove ios
2) Add iOS back without sudo
$ ionic platform add ios
3) Run iOS emulator
$ ionic emulate ios
Source: https://github.com/driftyco/ionic/issues/4052 (rajkotecha's comment)
Do NOT use sudo when creating or building the project.
Please see https://github.com/driftyco/ionic/issues/4052
I've encountered this issue before, and I believe you messed up with your permission. However, I managed to solve it by reinstall everything from scratch (NOT reformat OS). I suggest you may try to remove all your Xcode, ionic, cordova, and ios-sim content and reinstall again.
Delete your Xcode from your Mac OS.
Remove everything inside:
/usr/local/bin
/usr/local/include
/usr/local/lib/dtrace
/usr/local/share/man/man1
/usr/local/share/systemtap/tapset/
Delete the folder:
/usr/local/lib/node_modules
Once you done the instruction above, kindly use your spotlight to search for keywords such as node, cordova, ionic, etc... to see whether it is still exist or not. Please also ensure yourApp within your Users/username folder is deleted.
You may also try to use your terminal input:
npm -v
cordova -v
ionic -v
It will shows nothing/not found if you've deleted everything completely.
Now you can download and install Xcode from App Store, and wait for Xcode is fully installed in your Mac, then proceed to here to start again your ionic project.
Lastly, once you begin to create an ionic project, by right you no need to use any sudo commands anymore in creating or building this project.
Example:
ionic build ios
Instead of:
sudo ionic build ios
It should be working unless you are not the root user.
Happy coding and have a nice day! :D