I am getting the following after building from he command line using xcodebuild, any ideas what might be wrong?
** BUILD FAILED **
The following build commands failed:
CompileC build/PackageDemo.build/Release-iphoneos/PackageDemo.build/Objects-normal/armv6/AppDelegate.o PackageDemo/AppDelegate.m normal armv6 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/PackageDemo.build/Release-iphoneos/PackageDemo.build/Objects-normal/armv6/main.o PackageDemo/main.m normal armv6 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/PackageDemo.build/Release-iphoneos/PackageDemo.build/Objects-normal/armv7/main.o PackageDemo/main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/PackageDemo.build/Release-iphoneos/PackageDemo.build/Objects-normal/armv7/AppDelegate.o PackageDemo/AppDelegate.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
Ld build/PackageDemo.build/Release-iphoneos/PackageDemo.build/Objects-normal/armv6/PackageDemo normal armv6
Ld build/PackageDemo.build/Release-iphoneos/PackageDemo.build/Objects-normal/armv7/PackageDemo normal armv7
CreateUniversalBinary build/Release-iphoneos/PackageDemo.app/PackageDemo normal "armv6 armv7"
GenerateDSYMFile build/Release-iphoneos/PackageDemo.app.dSYM build/Release-iphoneos/PackageDemo.app/PackageDemo
(8 failures)
Related
I'm trying to create a Xamarin iOS binding for this Objective C library SPSlideTabController.
I have created a static library and am now in the process of creating a fat binary. I have the Makefile set up correctly and saved in the same folder as my static library. Not inside the static library folder though. Then I run the make command in the terminal.
Each time I have tried, only one file is generated libSPSlideTabController-i386.a then I get 4 build errors:
** BUILD FAILED **
The following build commands failed:
CompileC build/SPSlideTabBarController.build/Release-iphoneos/SPSlideTabBarController.build/Objects-normal/armv7/SPAppearance.o SPSlideTabBarController/Appearance/SPAppearance.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/SPSlideTabBarController.build/Release-iphoneos/SPSlideTabBarController.build/Objects-normal/armv7/SPSlideTabBarItem.o SPSlideTabBarController/SPSlideTabBar/SPSlideTabBarItem.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/SPSlideTabBarController.build/Release-iphoneos/SPSlideTabBarController.build/Objects-normal/armv7/SPSlideTabBar.o SPSlideTabBarController/SPSlideTabBar/SPSlideTabBar.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/SPSlideTabBarController.build/Release-iphoneos/SPSlideTabBarController.build/Objects-normal/armv7/SPSlideTabBarController.o SPSlideTabBarController/SPSlideTabBarController.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(4 failures)
make: *** [libSPSlideTabBarController-armv7.a] Error 65
The ---armv7.a and the ---SDK.a files are not generated.
What am I doing wrong?
Here's my Makefile
XBUILD=/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
PROJECT_ROOT=./SPSlideTabBarController
PROJECT=$(PROJECT_ROOT)/SPSlideTabBarController.xcodeproj
TARGET=SPSlideTabBarController
all: lib$(TARGET).a
lib$(TARGET)-i386.a:
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphonesimulator
-configuration Release clean build
-mv $(PROJECT_ROOT)/build/Release-iphonesimulator/lib$(TARGET).a $#
lib$(TARGET)-armv7.a:
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch
armv7 -configuration Release clean build
-mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $#
lib$(TARGET)-arm64.a:
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch
arm64 -configuration Release clean build
-mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $#
lib$(TARGET).a: lib$(TARGET)-i386.a lib$(TARGET)-armv7.a
lib$(TARGET)-
arm64.a
xcrun -sdk iphoneos lipo -create -output $# $^
clean:
-rm -f *.a *.dll
It's better that you share your MAKE file.
I normally open the code in XCode then add a runscript using my GIST here
You could follow this guide for more details.
Going to develop an iOS VoIP app as my final project, but not finding a proper SDK to be used for making app to work like Skype/ Viber, for Voice and Video Call.
Or suggest me another FREE library.
I working on this from the previous 2 months...
Thanks.
EDIT:
When I perform 'lipo' command this occurs:
iMac-2:lib mac$ lipo -arch libpj-arm64-apple-darwin_ios.a -arch libpj-armv7-apple-darwin_ios.a -arch libpj-armv7s-apple-darwin_ios.a -arch libpj-x86_64-apple-darwin16.0.0.a -create -output libpjlib.a
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: unknown architecture specification flag: libpj-arm64-apple-darwin_ios.a in specifying input file -arch libpj-arm64-apple-darwin_ios.a -arch
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: known architecture flags are: any little big ppc64 x86_64 x86_64h arm64 ppc970-64 ppc i386 m68k hppa sparc m88k i860 veo arm ppc601 ppc603 ppc603e ppc603ev ppc604 ppc604e ppc750 ppc7400 ppc7450 ppc970 i486 i486SX pentium i586 pentpro i686 pentIIm3 pentIIm5 pentium4 m68030 m68040 hppa7100LC veo1 veo2 veo3 veo4 armv4t armv5 xscale armv6 armv6m armv7 armv7f armv7s armv7k armv7m armv7em arm64v8
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo [input_file] ... [-arch <arch_type> input_file] ... [-info] [-detailed_info] [-output output_file] [-create] [-arch_blank <arch_type>] [-thin <arch_type>] [-remove <arch_type>] ... [-extract <arch_type>] ... [-extract_family <arch_type>] ... [-verify_arch <arch_type> ...] [-replace <arch_type> <file_name>] ...
If you got errors in library means, Either you have not properly configure the PJSIP project in Your system (or) you missed any library that you want to add in your xcode project.
If you want to run project in simulator or iphone?
There is two different configuration for pjsip project. For iphone and simulator, configuring project is different.
For properly configure your PJSIP Project in your system, follow this below link.
Source : https://trac.pjsip.org/repos/wiki/Getting-Started/iPhone
Please post the error message completely in your xcode, to solve the problem.
You missed architecture name
was:
lipo -arch libpj-arm64-apple-darwin_ios.a -arch libpj-armv7-apple-darwin_ios.a ...
Need:
lipo -arch arm64 libpj-arm64-apple-darwin_ios.a -arch armv7 libpj-armv7-apple-darwin_ios.a ...
For each -arch you need set name and than lib name
I am trying to Fetch Videos from YouTube Channel on Cocoa Application. For that First added GData Framework to my project, and import #import "GData/GData.h". Then their is no error . But if i am importing #import "GData/GDataServiceGoogleYouTube.h"
and write some code related to GDataServiceGoogleYouTube
GDataServiceGoogleYouTube *service=[[GDataServiceGoogleYouTube alloc]init];
getting Compiler eror:
Ld /Users/Rasheed/Library/Developer/Xcode/DerivedData/YouTube-ddawzlgkbmkdqsalghaobsospjth/Build/Products/Debug/YouTube.app/Contents/MacOS/YouTube normal x86_64
cd /Users/Rasheed/Desktop/MULTIPLESOCKET/YouTube
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/clang -arch x86_64 -isysroot
/Developer/SDKs/MacOSX10.6.sdk -L/Users/Rasheed/Library/Developer/Xcode/DerivedData/YouTube-ddawzlgkbmkdqsalghaobsospjth/Build/Products/Debug
-F/Users/Rasheed/Library/Developer/Xcode/DerivedData/YouTube-ddawzlgkbmkdqsalghaobsospjth/Build/Products/Debug -filelist
/Users/Rasheed/Library/Developer/Xcode/DerivedData/YouTube-ddawzlgkbmkdqsalghaobsospjth
/Build/Intermediates/YouTube.build/Debug/YouTube.build/Objects-normal/x86_64/YouTube.LinkFileList -mmacosx-version-min=10.6 -ObjC
-lxml2 -all_load -framework Cocoa -o /Users/Rasheed/Library/Developer/Xcode/DerivedData/YouTube-ddawzlgkbmkdqsalghaobsospjth/Build
/Products/Debug/YouTube.app/Contents/MacOS/YouTube
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_GDataServiceGoogleYouTube", referenced from:
objc-class-ref in YouTubeAppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can i Fix This error?
If you built a GData static library, make sure the library is listed in the “Link Binary With Libraries” section under the “Build Phases” tab for your target.
If you dragged all of the GData source files into your project, make sure they are all listed in the “Compile Sources” section under the “Build Phases” tab for your target.
You might find this blog post helpful: http://hoishing.wordpress.com/2011/08/23/gdata-objective-c-client-setup-in-xcode-4/
i have downoaded the wunder radio project, i have copy the MMS project in my workspace.
if i try to use mms_connect Xcode4 give me this error:
Ld
/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator/test1.app/test1
normal i386
cd /Users/Alex/Source/test1
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH
"/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2
-arch i386 -isysroot
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk
-L/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator
-F/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator
-filelist
/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Intermediates/test1.build/Debug-iphonesimulator/test1.build/Objects-normal/i386/test1.LinkFileList
-mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -lz.1
-framework UIKit -framework Foundation -framework CoreGraphics -o
/Users/Alex/Library/Developer/Xcode/DerivedData/test1-gevnovbiecnctxguaabsznvdybxa/Build/Products/Debug-iphonesimulator/test1.app/test1
Undefined symbols for architecture i386: "_mms_connect", referenced
from:
-[test1AppDelegate application:didFinishLaunchingWithOptions:]
in test1AppDelegate.o ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
have any idea to resolve it?
It looks like the linker is failing to link to libmms because it is of the wrong architecture. The project you are building appears to be for the iPhone simulator. Since the simulator runs on your computer it's architecture is i386 (or perhaps x86_64 depending upon the machine you are using). So basically you are compiling using i386 but when the linker tried to link to libmms it did not find that libmms had been compiled using the same architecture.
Since iOS devices use armv6 or armv7 architectures and the simulator uses i386, it can be quite difficult to switch back and forth between building for the actual device or building for the simulator since any external static libraries need to be built for all 3 architectures.
You'll likely need to rebuild libmms using the i386 architecture.
I am trying build the static libraries for Graphviz to include them in in an iOS app, but I can't get it to work. Here's what I have done so far, using graphviz 2.28.0], Xcode 4.1, OSX 10.7 and I am targeting the iOS simulator.
I found Glen Low's configure instructions, and with some informed guesswork updated these to:
./configure --build=i486-apple-darwin --host=arm-apple-darwin9 --disable-dependency-tracking --enable-shared=no --enable-static=yes --enable-ltdl-install=no --enable-ltdl=no --enable-swig=no --enable-tcl=no --with-codegens=no --with-fontconfig=no --with-freetype2=no --with-ipsepcola=yes --with-libgd=no --with-quartz=yes --with-visio=yes --with-x=no --with-cgraph=no CC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2" CPP="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -E" CXX="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2" CXXCPP="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -E" OBJC="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2" LD="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld" CPPFLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -miphoneos-version-min=4.0" CXXCPPFLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -miphoneos-version-min=4.0"
This works, but then the "make" runs for a while and errors out with:
Making all in gvpr
CCLD mkdefs
ld: warning: ignoring file mkdefs.o, file was built for armv6 which is not the architecture being linked (i386)
ld: warning: ignoring file /usr/local/lib/libSystem.dylib, missing required architecture i386 in file
ld: warning: symbol dyld_stub_binder not found, normally in libSystem.dylib
Undefined symbols for architecture i386:
"_exit", referenced from:
start in crt1.10.6.o
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[3]: *** [mkdefs] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I don't quite understand all the architecture specifications, so any help to get this to work is most welcome.
Problem is imo that mkdefs is executed during the build process itself after it was created. So if you build for armv6 or armv7 the file can't be executed on the command line of Mac OS X. My workaround was to build a mkdefs for architecture i386 (which is needed for the iPhone simulator too) and copy it in the lib/gvpr directory after getting this error. Make sure that the file could not be overwritten and restart the build.
I got this working. The build script fails at the end when it tried to make an executable since it's compiled for i386 instead of x86 or x86_64 but all the libraries build just fine.
# For iPhoneOS
export DEV_iOS=/Developer/Platforms/iPhoneOS.platform/Developer
export SDK_iOS=${DEV_iOS}/SDKs/iPhoneOS5.0.sdk
export COMPILER_iOS=${DEV_iOS}/usr/bin
export CC=${COMPILER_iOS}/gcc
export CXX=${COMPILER_iOS}/g++
export LDFLAGS="-arch armv7 -pipe -Os -gdwarf-2 -no-cpp-precomp -mthumb -isysroot ${SDK_iOS}"
export CFLAGS=${LDFLAGS}
export CXXFLAGS=${LDFLAGS}
export LD=${COMPILER_iOS}/ld
export CPP=${COMPILER_iOS}/llvm-cpp-4.2
export AR=${COMPILER_iOS}/ar
export AS=${COMPILER_iOS}/as
export NM=${COMPILER_iOS}/nm
export CXXCPP=${COMPILER_iOS}/llvm-cpp-4.2
export RANLIB=${COMPILER_iOS}/ranlib
./configure --host=arm-apple-darwin11 --disable-dependency-tracking --enable-shared=no --enable-static=yes --enable-ltdl-install=no --enable-ltdl=no --enable-swig=no --enable-tcl=no --with-codegens=no --with-fontconfig=no --with-freetype2=no --with-ipsepcola=yes --with-libgd=no --with-quartz=yes --with-visio=yes --with-x=no --with-cgraph=no
It appears that the linker is trying to link to the system libraries installed on your Mac. Those libraries are all going to be compiled for i386 or x86_64 which isn't going to work when compiling libraries for iPhone. You'll need to reconfigure the linker to link against the libraries that come in the iPhone SDK.
It should also be noted that you will probably have to compile the library twice - once as armv6 and again as armv7. iPhone 3G and some of the older iPod Touches use the armv6 architecture, while newer iPhones use the armv7 architecture. After you've compiled the libraries under both architectures you can use lipo (type "man lipo" in your Terminal for more info) to create a single static library with both architectures in it. If you are going to develop your app using the iPhone/iPad simulator, then I also suggest compiling once as i386 so that you can use your library with the simulator. Again, lipo can create a single static library with all 3 architectures in it.
Now the GraphViz website appears to be unreachable at the moment, so I could not download the library and run the configure script like you did, but I suspect that before you run "make" you should make the following changes to the makefile that is produced by the configure script. Depending on which version of the iOS SDK you are targeting and what version of gcc you have on your machine you may have to tweak some of the changes below so they are appropriate for your environment. The instructions below will build for armv6. You'll need to change the settings to build for armv7 once you are ready to tackle that architecture.
Find CC= cc and change it to:
CC= /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2
Find -arch i386 in CFLAG and change it to:
-arch armv6
Find CFLAG and add to the BEGINNING!!:
-isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk
Find SHARED_LDFLAGS=-arch i386 -dynamiclib and change it to:
SHARED_LDFLAGS=-arch armv6 -dynamiclib