Compile VLCKit on Mac OS 10.11.6 - vlc

I'm trying to compile VLCKit on Mac OS 10.11 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 8.0 and finally run "Build Everything".
But build failed with thoses issues :
'checking for C/C++ restrict keyword... __restrict
checking whether xcrun clang++ supports C++11 features by default... no
checking whether xcrun clang++ supports C++11 features with -std=c++11... no
checking whether xcrun clang++ supports C++11 features with -std=c++0x... no
configure: error: *** A compiler with support for C++11 language features is required.
Command /bin/sh failed with exit code 1
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution configure build/VLCKit.build/Debug/Run\ VLC\ configure.build/Script-63FFDBCD0D2AE2AE0092FC96.sh
(1 failure)
make: *** [build/Debug/VLCKit.framework] Error 65'

I had the same issue, but I was able to get passed these checks by adding std=c++11 -stdlib=libc++ to the CXX flags exported in Configure.sh, so that section looks like this:
if test $arch = "x86_64"; then
export CFLAGS="-m64 -arch x86_64 $optim"
export CXXFLAGS="-m64 -arch x86_64 -std=c++11 -stdlib=libc++ $optim"
export OBJCFLAGS="-m64 -arch x86_64 $optim"
export CPPFLAGS="-m64 -arch x86_64 $optim"
this_args="--build=x86_64-apple-darwin15 --with-contrib=$VLC_SRC_DIR/contrib/x86_64-apple-darwin15 $this_args"
export PKG_CONFIG_PATH=$VLC_SRC_DIR/contrib/x86_64-apple-darwin11/lib/pkgconfig
fi
Hope that helps!

Related

React Native Failed to build iOS project. We ran “xcodebuild” command but it exited with error code 65. The problem is with all projects

I am getting following Error when try to run any project with React-native run-ios:
I have already tried all solutions from this and many more but nothing works.
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening proj.xcworkspace. Run CLI with --verbose flag for more details.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace proj.xcworkspace -configuration Debug -scheme proj -destination id=13B67855-76F9-4755-A1A5-7B5AEBC6D1C5
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Prepare build
warning: The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Workspace Settings.
=== BUILD TARGET glog OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
Libtool /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/glog/libglog.a normal x86_64
cd /Users/user/Work/weber/mobile-app/proj-mobile/ios/Pods
export IPHONEOS_DEPLOYMENT_TARGET=10.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/user/Library/Android/sdk/tools:/Users/user/Library/Android/sdk/platform-tools"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -D -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/glog -filelist /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Pods.build/Debug-iphonesimulator/glog.build/Objects-normal/x86_64/glog.LinkFileList -o /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/glog/libglog.a
=== BUILD TARGET DoubleConversion OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
Libtool /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/DoubleConversion/libDoubleConversion.a normal x86_64
cd /Users/user/Work/weber/mobile-app/proj-mobile/ios/Pods
export IPHONEOS_DEPLOYMENT_TARGET=10.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/user/Library/Android/sdk/tools:/Users/user/Library/Android/sdk/platform-tools"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -D -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/DoubleConversion -filelist /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Pods.build/Debug-iphonesimulator/DoubleConversion.build/Objects-normal/x86_64/DoubleConversion.LinkFileList -o /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/DoubleConversion/libDoubleConversion.a
=== BUILD AGGREGATE TARGET boost-for-react-native OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET React-Core-AccessibilityResources OF PROJECT Pods WITH CONFIGURATION Debug ===
Check dependencies
ProcessInfoPlistFile /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/React-Core/AccessibilityResources.bundle/Info.plist Target\ Support\ Files/React-Core/ResourceBundle-AccessibilityResources-React-Core-Info.plist
cd /Users/user/Work/weber/mobile-app/proj-mobile/ios/Pods
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/user/Library/Android/sdk/tools:/Users/user/Library/Android/sdk/platform-tools"
builtin-infoPlistUtility /Users/user/Work/weber/mobile-app/proj-mobile/ios/Pods/Target\ Support\ Files/React-Core/ResourceBundle-AccessibilityResources-React-Core-Info.plist -expandbuildsettings -format binary -platform iphonesimulator -o /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Debug-iphonesimulator/React-Core/AccessibilityResources.bundle/Info.plist
ProcessProductPackaging "" /Users/user/Work/weber/mobile-app/proj-mobile/ios/build/Pods.build/Debug-iphonesimulator/React-Core-AccessibilityResources.build/AccessibilityResources.bundle-Simulated.xcent
cd /Users/user/Work/weber/mobile-app/proj-mobile/ios/Pods
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/user/Library/Android/sdk/tools:/Users/user/Library/Android/sdk/platform-tools"
I had different looking errors and also similar to yours given here, every time due to
'Prepare build failed, legacy build etc etc'.
I simply changed the build system to new one from legacy one and all projects ran smoothly. Try it out and let me know if it works for you too.
The setting path is : Xcode->file -> workspace settings -> build systems

React-native: iOS wont install - libtool error

I test my app using react-native run-ios in the simulator, however today I just get a random error and have no clue on how to approach it since I com from web dev and have no clue on how to setup projects in xCode (well I have some idea but I don't want to further break the project)
This is the error I am getting:
libtool /Users/waltermonecke/Code_Projects/reactNative/lisdo/ios/build/Build/Products/Debug-iphonesimulator/libTPSStripe.a normal x86_64
cd /Users/waltermonecke/Code_Projects/reactNative/lisdo/node_modules/tipsi-stripe/ios
export IPHONEOS_DEPLOYMENT_TARGET=10.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/ImageMagick/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -L/Users/waltermonecke/Code_Projects/reactNative/lisdo/ios/build/Build/Products/Debug-iphonesimulator -filelist /Users/waltermonecke/Code_Projects/reactNative/lisdo/ios/build/Build/Intermediates/TPSStripe.build/Debug-iphonesimulator/TPSStripe.build/Objects-normal/x86_64/TPSStripe.LinkFileList -lRCTPushNotification -weak_framework Stripe -framework PassKit -o /Users/waltermonecke/Code_Projects/reactNative/lisdo/ios/build/Build/Products/Debug-iphonesimulator/libTPSStripe.a
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lRCTPushNotification
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lRCTPushNotification is not an object file (not allowed in a library)
** BUILD FAILED **
The following commands produced analyzer issues:
Analyze /Users/waltermonecke/Code_Projects/reactNative/lisdo/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
Analyze /Users/waltermonecke/Code_Projects/reactNative/lisdo/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
(2 commands with analyzer issues)
The following build commands failed:
Libtool /Users/waltermonecke/Code_Projects/reactNative/lisdo/ios/build/Build/Products/Debug-iphonesimulator/libTPSStripe.a normal x86_64
(1 failure)
I guess this is the relevant part can't locate file for: -lRCTPushNotification, but I dont know how to properly remove the reference to that package.
Any help is welcome!

How to build Botan for iOS arm64

Im trying to build Botan-1.10.12 for iOS (arch arm64) with Xcode 7.3.1.
I tried to follow the guidelines on Botan's website: https://github.com/randombit/botan/blob/master/doc/manual/building.rst#for-ios-using-xcode
With some changes, I managed to build for armv7 doing the following:
./configure.py --prefix="armv7" --cpu=armv7 --with-zlib --cc=clang --cc-bin="clang++ -arch armv7"
sudo xcrun --sdk iphoneos make install
But when I try to do the same for arm64:
./configure.py --prefix="arm64" --cpu=arm64 --with-zlib --cc=clang --cc-bin="clang++ -arch arm64"
I get the following error:
ERROR: Unknown or unidentifiable processor "arm64"
And I get the same error if I try to change arm64 to armv8-a like the guidelines suggest:
ERROR: Unknown or unidentifiable processor "armv8-a"
I alse tried with --cpu=arm:
configure.py --prefix="arm64" --cpu=arm --with-zlib --cc=clang --cc-bin="clang++ -arch arm64"
and that works for the configure step, but then when I run sudo xcrun --sdk iphoneos make install, I get the following error:
In file included from src/asn1/asn1_alt.cpp:16:
In file included from build/include/botan/loadstor.h:13:
build/include/botan/bswap.h:58:11: error: unknown register name 'r3' in asm
: "r3", "cc");
^
1 error generated.
make: *** [build/lib/asn1_asn1_alt.o] Error 1
Im not that familiar with building stuff for iOS. How can I build Botan for arm64 iOS?
Thanks!

How can I cross-compile GCC to produce libgfortran for iOS devices (arm, armv7)?

I need to compile Fortran-77 subroutines to be accessible on iOS. I am using GCC with the DragonEgg plugin, so I can use gfortran with the LLVM backend. I followed this answer but I am stuck when it comes to build libgfortran for armv7, armv7s and arm64.
Can I build libgfortran alone or is it always necessary to compile the GCC suite completely?
What is the correct way of producing this library for a different target? Is it possible to use GCC for this step or do I need LLVM for the arm*-targets?
Building GCC with arm-targets using GCC I get these errors:
./configure --prefix=/tmp/out --host=arm-apple-darwin --enable-languages=fortran
make
…
make[2]: arm-apple-darwin-ar: No such file or directory
make[2]: *** [libiberty.a] Error 1
make[1]: *** [all-libiberty] Error 2
Building GCC with arm-targets using LLVM I have problems with configure:
export CC="$(xcrun -sdk iphoneos -find clang)"
export CPP="$CC -E"
export CFLAGS="-arch armv7 -arch armv7s -arch arm64 -isysroot $(xcrun --sdk iphoneos --show-sdk-path) -miphoneos-version-min=9.2"
export AR=$(xcrun -sdk iphoneos -find ar)
export RANLIB=$(xcrun -sdk iphoneos -find ranlib)
export CPPFLAGS="-arch armv7 -arch armv7s -arch arm64 -isysroot $(xcrun --sdk iphoneos --show-sdk-path) -miphoneos-version-min=9.2"
export LDFLAGS="-arch armv7 -arch armv7s -arch arm64 -isysroot $(xcrun --sdk iphoneos --show-sdk-path)"
./configure --prefix=/tmp/out --enable-languages=fortran --host=arm-apple-darwin --disable-shared
…
checking how to run the C preprocessor... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -E
configure: error: in `/Users/timo/temp/gcc-4.8.5-build/fixincludes':
configure: error: C preprocessor "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -E" fails sanity check
See `config.log' for more details.
make[1]: *** [configure-fixincludes] Error 1
The configure script states that
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
What is meant by If a cross compiler is detected? How do I define the target platform correctly?
LLVM uses -arch armv7 etc. as target definition. What is nedded when using GCC?
You are trying to build cross-gcc libraries without cross binutils. Here is a good manual for building cross-gcc for arm, you can follow it.
What is meant by If a cross compiler is detected? How do I define the
target platform correctly?
When configuring you should also set --target=arm-apple-darwin. (In my own experience I did not set --host at all)
make[2]: arm-apple-darwin-ar: No such file or directory
Before building arm cross-compiler target libraries you should build binutils for this target.
Can't say anything about llvm.
So just try to make all steps in the link above.

dsymutil missing compiling GNU bash on iOS

I'm trying to compile GNU bash 4.3.30 on (and for) my iPad 2, iOS 8.4 using Clang, ld64, cctools, GNU make and the iOS 8.1 SDK. When processing bashversion, Clang is "unable to execute dsymutil", and reports that it "doesn't exist", exiting with error 1.
$ make
(...)
"/usr/bin/ld" -demangle -dynamic -arch armv7 -iphoneos_version_min 5.0.0 -syslibroot /var/mobile/iPhoneOS8.1.sdk -o bashversion -lcrt1.3.1.o -L./lib/termcap /var/tmp/bashversion-814fa1.o buildversion.o -lSystem
"dsymutil" -o bashversion.dSYM bashversion
clang: error: unable to execute command: Executable "dsymutil" doesn't exist!
clang: error: dsymutil command failed with exit code 1 (use -v to see invocation)
make: *** [bashversion] Error 1
$ echo $CC
clang --sysroot /var/mobile/iPhoneOS8.1.sdk -v
$ clang --version
clang version 3.5.0 (trunk)
Target: armv7-apple-darwin-14.0.0
Thread model: posix
$ ld -v
#(#)PROGRAM:ld PROJECT:ld64-
configured to support archs: i386 x86_64 armv4t armv5 armv6 armv7 armv7f armv7k armv8 arm64 arm64v8
$ which dsymutil
$ dsymutil
-sh: dsymutil: command not found
$ find / -name dsymutil
$
Apparently, my iPad has no dsymutil. So, where can I find one? Does it come with Xcode? Or is there any way to compile GNU bash 4.3.30 without it?
Dsymutil is a closed source tool, and is not available for iOS.
But that's not much of a problem, just create a symlink to /bin/true,
i.e.
ln -s /bin/true /usr/bin/dsymutil

Resources