Compile VLCKit on Mac OS 10.9 - compilation

I'm trying to compile VLCKit on Mac OS 10.9 following this wiki : https://wiki.videolan.org/VLCKit/
I have clone git://git.videolan.org/vlc-bindings/VLCKit.git
then open VLCKit.xcodeproj in Xcode 5.1
and finally run "Build Everything".
But build failed with thoses issues :
Run VLC configure
PhaseScriptExecution bootstrap /Users/myname/Library/Developer/Xcode/DerivedData/VLCKit- bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Run\ VLC\ configure.build/Script-631A90420D5A007D0014A2CE.sh
cd /Users/myname/Documents/PhcDev/VLCKit
/bin/sh -c \"/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit- bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Run\ VLC\ configure.build/Script-631A90420D5A007D0014A2CE.sh\"
/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Run VLC configure.build/Script-631A90420D5A007D0014A2CE.sh: line 16: ./bootstrap: No such file or directory
Setup VLC contribs
PhaseScriptExecution make /Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup\ VLC\ contribs.build/Script-633BD6E30D2ADF030012A314.sh
cd /Users/myname/Documents/PhcDev/VLCKit
/bin/sh -c \"/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup\ VLC\ contribs.build/Script-633BD6E30D2ADF030012A314.sh\"
Building tools
/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup VLC contribs.build/Script-633BD6E30D2ADF030012A314.sh: line 10: cd: /Users/myname/Documents/PhcDev/VLCKit/vlc-unstable/extras/tools: No such file or directory
/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup VLC contribs.build/Script-633BD6E30D2ADF030012A314.sh: line 11: ./bootstrap: No such file or directory
xcodebuild -project VLCKit.xcodeproj -target "Build Everything"
make: *** [build/Debug/VLCKit.framework] Interrupt: 2
Building a set of contribs for x86_64...
/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit-bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup VLC contribs.build/Script-633BD6E30D2ADF030012A314.sh: line 20: cd: /Users/myname/Documents/PhcDev/VLCKit/vlc-unstable/contrib: No such file or directory
Making contribs for x86_64
/Users/myname/Library/Developer/Xcode/DerivedData/VLCKit- bktcaifqrsqwbodqlfdqgsmkkdeb/Build/Intermediates/VLCKit.build/Debug/Setup VLC contribs.build/Script-633BD6E30D2ADF030012A314.sh: line 32: ../bootstrap: No such file or directory
make: *** No rule to make target `prebuilt'. Stop.
Did I miss something ? Can someone help please ?

I finally solved my issues by myself.
Here's what I had to do to make it compile successfully :
Clone project
git clone git://git.videolan.org/vlc-bindings/VLCKit.git
Modify xcode project
open VLCKit.xcodeproj
In Project VLCKit change OS X Deployement Target to “10.9”
In Build Settings change Architectures to “64-bit Intel (x86_64)“
Find and replace NS_DESIGNATED_INITIALIZER (available in xcode 6) by __attribute((objc_designated_initializer))
Close xcode and go back to the terminal
Change compiler
export CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
export CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
export OBJC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
Cleanup
rm -fr ./vlc-unstable/contrib/x86_64-apple-darwin10
Build Release
xcodebuild -project VLCKit.xcodeproj -verbose -target "Fetch libvlc"
xcodebuild -project VLCKit.xcodeproj -verbose -target "Setup VLC contribs" -configuration Release
export PATH=$PWD/vlc-unstable/extras/tools/build/bin:$PATH
cd vlc-unstable
./bootstrap
cd ..
xcodebuild -project VLCKit.xcodeproj -verbose -target "Run VLC configure" -configuration Release
xcodebuild -project VLCKit.xcodeproj -verbose -target "Make VLC" -configuration Release
xcodebuild -project VLCKit.xcodeproj -verbose -target "Build just VLCKit" -configuration Release
cd ./build/Release/
Hope this can help.

Related

How to build a package from console for xcode 13.4.1

I can successfully build a swift package using the Xcode GUI.
This is the package: https://github.com/boken-engine/boken-engine
But I cannot build the same package using the command line.
The command I'm using is:
/Applications/Xcode_13.3.1.app/Contents/Developer/usr/bin/xcodebuild build-for-testing -scheme BokenEngine-Package -target BokenEngine -destination "platform=iOS Simulator,name=iPhone 11"
ANd this is the error:
error: compiling for iOS 13.0, but module 'PathKit' has a minimum deployment target of iOS 15.4: /Users/runner/Library/Developer/Xcode/DerivedData/BokenEngine-gieaxcburvtafogtnwrmvsvhzwac/Build/Products/Debug-iphonesimulator/PathKit.framework/Modules/PathKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
import PathKit
^
More info about this issue: https://github.com/boken-engine/boken-engine/issues/139
More info about the error: https://github.com/boken-engine/boken-engine/runs/6970145883?check_suite_focus=true#step:5:281

react-native 0.059 on xcode 13 build error on ios

I have an existing project but I got a new macbook with m1.
When running ios I got an error.
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find instruments 2> /dev/null' failed with exit code 17664: (null) (errno=Invalid argument)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
error Command failed: xcrun instruments -s
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find instruments 2> /dev/null' failed with exit code 17664: (null) (errno=Invalid argument)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
I found that instrument was deprecated on xcode 13.
Is there any work around for this one?
Thank you

Getting `ld: directory not found for option` build error after installing cocoa pod

I installed a new cocoa pod (LaunchDarkly) for my Xcode project, but I'm getting the following error in my CI server when trying to build the project:
⚠️ ld: directory not found for option '-F/Users/runner/Library/Developer/Xcode/DerivedData/ProjectName-hlaqakonueydmsgzoxgekwjpjyds/Build/Products/Debug-iphonesimulator/LDSwiftEventSource'
⚠️ ld: directory not found for option '-F/Users/runner/Library/Developer/Xcode/DerivedData/ProjectName-hlaqakonueydmsgzoxgekwjpjyds/Build/Products/Debug-iphonesimulator/LaunchDarkly'
❌ ld: framework not found LDSwiftEventSource
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do I fix this?
I realized the issue was that I was still building the .xcodeproj file as shown below:
xcodebuild build-for-testing
-project ProjectName.xcodeproj
-scheme ProjectName
-destination 'platform=iOS Simulator,name=iPhone 12,OS=latest'
-testPlan UnitTests
| xcpretty
But since I was now using cocoa pods in my project, I needed to use the .xcworkspace file to build it:
xcodebuild build-for-testing
-workspace ProjectName.xcworkspace
-scheme ProjectName
-destination 'platform=iOS Simulator,name=iPhone 12,OS=latest'
-testPlan UnitTests
| xcpretty

carthage build failed for realm-cocoa - Task failed with exit code 65:

I know this question has been asked before, but none of the solutions provided out there worked for me.
I've cloned nextcloud-ios app, where dependancies are managed with carthage. When I try to build the realm-cocoa dependancy with carthage build realm-cocoa --platform ios --no-use-binaries --cache-builds I got build failed message:
*** No cache found for realm-cocoa, building with all downstream dependencies
*** xcodebuild output can be found in /var/folders/60/rmt9jlwd01l3h3srvjnx7r7w0000gn/T/carthage-xcodebuild.u6zLJP.log
*** Building scheme "Realm" in Realm.xcworkspace
*** Building scheme "RealmSwift" in Realm.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/manishkungwani/repos/brilcloud-ios/Carthage/Checkouts/realm-cocoa/Carthage/Realm.xcworkspace -scheme RealmSwift -configuration Release -derivedDataPath /Users/manishkungwani/Library/Caches/org.carthage.CarthageKit/DerivedData/10.3_10G8/realm-cocoa/v3.13.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/60/rmt9jlwd01l3h3srvjnx7r7w0000gn/T/realm-cocoa SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/manishkungwani/repos/brilcloud-ios/Carthage/Checkouts/realm-cocoa)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/60/rmt9jlwd01l3h3srvjnx7r7w0000gn/T/carthage-xcodebuild.u6zLJP.log
I've two version of xcode on my system: 11.4 and 10.3, and tried every possible solutions like this, tried switching command line tools to xcode 10.3, but no luck. Please help.

Xcode command line build and archive error

I am trying to build and archive project to create .ipa via commandline using below command
$ xcodebuild archive -project test.xcodeproj -scheme "Test" -archivePath /build
but it gives below error
** ARCHIVE FAILED **
The following build commands failed:
Ld /Users/user1/Library/Developer/Xcode/DerivedData/test-gymccixkvyhthdhhxixgplbqdrhk/Build/Intermediates/ArchiveIntermediates/Test/IntermediateBuildFilesPath/test.build/Release-iphoneos/Test.build/Objects-normal/arm64/Test normal arm64
Ld /Users/user1/Library/Developer/Xcode/DerivedData/test-gymccixkvyhthdhhxixgplbqdrhk/Build/Intermediates/ArchiveIntermediates/Test/IntermediateBuildFilesPath/test.build/Release-iphoneos/Test.build/Objects-normal/armv7/Test normal armv7
Am I missing something?
We need more information. I suspect however, that /build is not a writeable directory.
For good example of how to build with scripts see this project:
https://github.com/calabash/ios-smoke-test-app/blob/master/CalSmokeApp/Makefile

Resources