pjsip build for iOS 5, won't make - iphone

I retrieved the latest build from the SVN trunk on Friday and attempted to build following the directions on the getting started wiki.
make dep seems to execute without any problems, but make fails on Samples.mak. It appears there are no rules to make any of the samples when the platform is "arm-apple-darwin9".
If I open the Xcode project at this point, libavcodec and all it's related libraries are missing as well as LibSDL. There's not mention of a requirement to install SDL and ffmpeg beforehand, so not sure what to do there.

Please add some framework is required for run pjsip and also checked config_site.h this file available or not if not found then add this file. some code also may to write in config_site.h file .

Related

pjsip iPhone missing libraries

I am working on pjsip for voice chat on iPhone. The steps I have completed from the instructions are:
changed config_site.h as given.
successfully ran
$ cd /path/to/your/pjsip/dir
$ ./configure-iphone
$ make dep && make clean && make
opened ipjsua.xcodeproj to build but some libraries are missing (highlighted in red). The project therefore does not build and I'm unable to proceed further.
How should I build project?
Delete the missing libraries, locate this libraries in your build directory and then add them again to your project.
I could sort out the problem,
it wasnt big problem actually.
my project is not configured to run on simulator,so here are so many linking errors(these red colored librarys required to support pjsip on simulator).
i set my target as my ipad instead of simulator and made build.
it just worked!

SQLCipher runs successfully with simulator but doesnt build

SQLCipher runs successfully with simulator but doesnt build with device; instead I get the following errors:
cp: libssl.a: No such file or directory
and
sqlite3.c:91838: internal compiler error: in find_src_set_src, at var-tracking.c:1922
I have followed the entire procedure given at SQLCIPHER website. And it runs successfully on simulator but when i change it to iOSDevice the above errors appears.
Kindly help me asap
Please make sure you are using the official 2.0 release from this repository, https://github.com/sqlcipher/sqlcipher, It addresses an issue building for armv6.
Open openssl.xcodeproj and follow instructions form this site:
http://programmer-in-paradise.blogspot.com/2011/07/how-to-build-openssl-in-xcode.html
You need to setup a new target then bring libssl.a in your project.
If you still have problems:
As XCode 4.3(2) complains in release and test on device (not in simulator) about arm 6, better is to compile your own openssl libraries [see http://www.x2on.de/2010/07/13/tutorial-iphone-app-with-compiled-openssl-1-0-0a-library/]. You just need to adjust some paths [like /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs, if you're familiar with scripting]. I managed to build libs for last version of OpenSSL [2012 openssl-1.0.1c], then include in my project and able to build release and archive for distribution, with encrypted db.

Code coverage on iOS Using Xcode 4.2 on Lion

I'm trying to produce gcd a files from an iOS Xcode 4.2 (4D199) project called CocoaTouchHax on Lion and I'm having incredible trouble. I followed the steps here and I went as far as trying to build llvm/clang from source following steps here. However I continue to get this error:
Library not loaded: #executable_path/../lib/libprofile_rt.dylib
Where am I going wrong? I've tried to use the install_name_tool to fix the executable path to no avail. Am I over analyzing something? Am I missing something simple? I put this in as a "Run Script" phase prior to linking to ensure I've updated the #executable path and I use tool to examine the file after and the name is updated:
install_name_tool -id #executable_path/Users/cliff/dev/CocoaTouchHax/build/CocoaTouchHax/Build/Products/Debug-iphonesimulator/lib/libprofile_rt.dylib build/CocoaTouchHax/Build/Products/Debug-iphonesimulator/lib/libprofile_rt.dylib
What am I doing wrong? Help!
Update
Merely adding lib profile_rt.dylib crashes my test run immediately giving the following error when anything is run:
#executable_path/../lib/libprofile_rt.dylib
So I am certain that something needs to happen or something needs to be done to the lib profile_rt.dylib prior to execution.
Another Update I tried creating a sum link to
/Developer/usr/lib
under /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/Developer/usr
Which I believe is part of the base the path forming the current working directory when test runs. (Assuming it runs from the bin folder there.) This would, in theory, complete the relative lookup path of ../lib/libprofile_rt.dylib from that base path but it didn't work. I've tried running the install_name_tool command prior to copying the dylib in place but I still get this error:
Library not loaded: #executable_path/../lib/libprofile_rt.dylib
I don't know what I'm doing wrong. I somehow did manage to get test coverage files to emit using some combination of the above but I was not paying close enough attention and cannot reproduce the occurance. I know this can work, I just need a little more help figuring out how.
Update: In Xcode 4.3.2 (4E2002), just switch on Generate Test Coverage Files and Instrument Program Flow, the build system will link libprofile_rt for you. Xcode 4.3, and later, is a standard Mac app and the /Developer folder is gone. So, skip steps 5-7 below. You will also have to create a class file to workaround a bug in Apple's unix implementation as described here. You'll want it in the project under test.
For Xcode 4.2 (4C199) in Snow Leopard:
Create a project, say MyProduct. Check Include Unit Tests.
Once Xcode does its thing and loads the new project, you should have two targets, MyProduct and MyProductTests. Duplicate the MyProduct target.
Select the MyProduct copy target.
Go to Build Settings. Under Code Generation turn on Generate Test Coverage Files and Instrument Program Flow.
Go to Build Phases. Expand Link Binary With Libraries. Click the +. Click Add Other.... Browse to /Developer/usr/lib. Choose libprofile_rt.dylib.
Select the MyProductTests target.
Repeat steps 4 and 5 for that target.
Go to Build Settings again. Find Bundle Loader under Linking. Change the path to the MyProduct copy app. Something like $(BUILT_PRODUCTS_DIR)/MyProduct copy.app/MyProduct copy.
Change your schemes so that the tests run under the MyProduct copy scheme and not MyProduct. If you're compiling clang on your own, you can figure out the details here.
That should work. Step 8 took me hours to figure out, it's the key. If you only see gcda files in the test build directory, that's the likely issue.
On Lion you can symlink the dylib into /usr/lib to avoid that error
sudo ln -s /Developer/usr/lib/libprofile_rt.dylib /usr/lib/libprofile_rt.dylib
I cant guarantee that that wont bust something the future however. Remember that you have done it.
Create a new configuration called "Coverage" (or whatever).
In the Coverage config variant you have created go to Build Settings and...
Add -fprofile-arcs and -ftest-coverage to Other C Flags
Switch on Generate Test Coverage Files
Switch on Instrument Program Flow
In Other Linker flags add -lprofile_rt
The reason to do it this way with a config is that you can keep your normal build untouched. Also only works on Simulator. So dont try running this on device.
And from http://mattrajca.com/post/8749868513/llvm-code-coverage-and-xcode-4
Finally, open up the Intermediates/$TARGET.build/$CONFIG/$TARGET.build/Objects-normal/$ARCH subfolder. Inside, you’ll find the aforementioned gcda and gcov files
You can open that folder with CoverStory.
Note that coverage is not cumulative (unlike Coverity) so each run starts afresh. There might be a way to change that.

Core-plot configuration error

I am trying to use core-plot and I followed the instruction from the following project page to use it.
http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications, which is
You can install the SDK with a standard Mac installer package, or by hand. Here is how you install by hand.
Copy the CorePlotSDK directory to ~/Library/SDKs/
Add to your project's .PCH file:
#import < CorePlot/CorePlot.h >
Open Project -> Edit Project Settings and for All Configurations:
3a. Add to Additional SDKS:
$HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk
3b. Add to Other Linker Flags:
-ObjC -all_load -lCorePlot
Add the QuartzCore framework to the project.
Add a CPGraph to your application.
I went with the SDK install options: I installed it with Mac installer Package, it got installed in the following location /Library/SDKs/iphoneos.sdk and /Library/SDKs/iphonesimulator.sdk
Then i did step 2 as mentioned.
For 3a i added /Library/SDKs/iphonesimulator.sdk
Then i did 3b and then 4.
After that I tried to do a build and see how does it works and i get the following errors:
:1:0 :1:1: warning: "__IPHONE_OS_VERSION_MIN_REQUIRED" redefined
:1:0 :1:1: warning: this is the location of the previous definition
/var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: syntax error before '^' token
/var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250:0 /var/folders/+r/+rBG+BziF1OqK12XNyw1ak+++TM/-Caches-/com.apple.Xcode.502/CompositeSDKs/iphonesimulator-iPhoneSimulator4.1-cztutytisanvsqaptkdkpoyyctln/System/Library/Frameworks/UIKit.framework/Headers/UIView.h:250: error: 'type name' declared as function returning a function
This appears 20 times. and it points all to UIView.h
There are same question in the stackoverflow and people suggested to change the compiler to 4.2 and for lot of people it worked, but for me the compiler was always set to 4.2 and still I get the same error.
On 3a if do /Library/SDKs/iphoneos.sdk
I get the following error
error: Composite SDK failed: The base SDK uses platform 'iphonesimulator', but an additional SDK uses platform 'iphoneos'. All SDKs must use the same platform (PLATFORM_NAME).
Please help
Finally, I have figured out the solution for this error:
Thanks to the developer on core-plot project and sebastien.leduc a google code user for their help.
I am using CorePlotInstaller_0.2.2.zip, and one important steps that is missing on the installation guide is you have to use LLVM GCC 4.2 and not GCC 4.2.
The other important steps which was little confused me was 3a.
Add to Additional SDKS: $HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk
Here you have to literally add the above line, I was changing the ${PLATFORM_NAME} with iphoneos or iphonesimulator, but no we don't have to do that.
One last thing if you don't find the sdk on the following path $HOME/Library/SDKs/CorePlotSDK
Check out /Library/SDKs/CorePlotSDK.
I hope this will help people, it took me about a week to figure out with the help of all the people who came forward to help.
I just posted a new version of the Core Plot installer that should resolve this issue. You can download it from http://code.google.com/p/core-plot/downloads/list.
You can choose to install Core Plot for all users or just your account. If you install for all users, change the Additional SDKs path from $HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk to /Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk.
I integrated core-plot into my application yesterday so it's fresh on my mind. I tried installing the SDK the same way you are and hit the same error. Comments in the google-group recommended NOT going this route, so I went back and installed the source code.
I ended up using the tutorial HERE for the basic steps and sample code. The code doesn't work anymore, but all the broken parts are answered in the comments (including a complete reposting of the code which works on the latest version).
Some stumbling points were that the "-ObjC" and "-all_load" flags were both needed, and when I added the header path the "search recursively" option wasn't checked off. Both these questions and many more are answered in the comments.

How to build and install yajl-objc on iOS

Hey I am trying to get http://github.com/gabriel/yajl-objc to work on iOS. It says to "Add the YAJLIOS.framework to your project" but I am not sure how I can get/build YAJLIOS.framework
Thanks!
-Ray
Although this is an old question, I came across the issue today updating a client's old project. The YAJL-objC project requires you to run a makefile command in order to compile the .framework file needed for installation.
To create the framework, checkout the latest from github, and then open Terminal. Change your directory to: yajl-objc\Project-iOS
Next, type the command make and run it. This will execute the compiling for you and create a new framework file here: yajl-objc\Project-iOS\Framework\YAJLiOS.framework
You can then drag that framework into the project you wish to use it in. Good luck!
I should have looked harder, but there is simply a download under the github download link that includes the framework.