cant compile pjsip for iOS because of fatal error - ios

I try to improve an App using an old version of pjsip. Since in this version the loudspeaker won't work anymore, I wanted to update pjsip.
Since I found no tutorial how to simply update the pjsip you are using I tried to download and compile the newest version.
But the compiling allways stopps with this exception:
pjmedia-audiodev/errno.c23:13: fatal error: 'portaudio.h' file not found
What could cause this problem?
I was following this guide:
https://trac.pjsip.org/repos/wiki/Getting-Started/iPhone
What made me also a bit curious is that in the file "config_site.h" already were alot of defines. Do I still need them while the guid says it should have thoose two lines:
#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>
When I am ready with compiling, would I be able to simply overwrite the files the app I'm working on useses with the files I just compiled?
Thank you for any help.

Seems that the Portaudio is not installed on your system.
You can get it from Macports or Homebrew with the following commands:
sudo port install portaudio
or
sudo brew install portaudio
About your second question for the defines in the "config_site.h" file, it's depend of the application it self, usually the mentioned settings are enough but is also possible that for your case additional parameters are needed, like enabling video or additional codecs etc.

Related

Unable to cross compile iOS programs on linux

I know that someone already asked this question but it isn`t up to date anymore. Most of the links are dead and the commands are not relevant anymore.
I have read these
Compile IOS program from linux commandline
How to cross-compile clang/llvm for iOS?
For example, I have been trying to compile silversearcher-ag for my iPhone 6 (jailbroken). This is the project link https://github.com/ggreer/the_silver_searcher.
I am targeting iOS 12.4.
These are the commands that I`ve tried
./configure CC=/home/growtopiajaw/Desktop/cctools-port-master/usage_examples/ios_toolchain/target/bin/arm-apple-darwin11-clang CXX=/home/growtopiajaw/Desktop/cctools-port-master/usage_examples/ios_toolchain/target/bin/arm-apple-darwin11-clang++ --host=arm-apple-darwin11
make
I am using cctools-port to cross compile the project. My compiled cctools toolchain is located under /home/growtopiajaw/Desktop/cctools-port-master/usage_examples/ios_toolchain/target and below is how the toolchain`s directory structure looks like
This is my configure log: https://del.dog/nugibonury
This is my make log:
CC src/ignore.o
In file included from src/ignore.c:11:
./src/options.h:7:10: fatal error: 'pcre.h' file not found
#include <pcre.h>
^~~~~~~~
1 error generated.
make: *** [Makefile:494: src/ignore.o] Error 1
This is my GitHub repository containing the cross compile toolchain
https://github.com/GrowtopiaJaw/arm-apple-darwin11
Apple does not ship PCRE. You need to get the headers and dylib/tbd files manually.
If you're using checkra1n or unc0ver, then the deb on the APT repo contains headers as well, so you could just use that.
If you plan to package this into an APT/dpkg file, make sure to add pcre as a dependency.

Lambdanative can compile for OSX but not iOS

I'm running Sierra with XCode 8.3 including command line tools. I can use Gambit to compile to OSX native code. I can use lambdanative to compile the test Calculator app to OSX but when I try to configure and then compile for iOS I get the following error in verbose mode:
checking whether the C compiler works... no
configure: error: in `/Users/querist/.lambdanative/tmp_install/gambc-v4_7_9':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: failed with exit code 77
There is no config.log to read. I've done a search for it and there is not one related to this project.
Any ideas? I really like the idea of being able to develop iOS apps in Scheme.
Thanks.
I realize this may be too late, but in case somebody else stumbles upon this, I though I'd try to explain.
config.log is placed in the library output directory, not your working folder. You can look for it by running find ~/Library/ -name 'config.log'.
In my case, config.log revealed the problem is that it can't find some version of a crt library. This problem is addressed here.
I edited my ./SETUP file from my lamdbanative working directory folder, so that IOSVERSION went from the 5.1.1 default to 6.0. That solved the problem for me.

No sound using sdl2_mixer from Homebrew

My friend has asked me to test a program for them which uses sdl2_mixer for sound. I am using OS X 10.11.
I installed sdl2_mixer from Homebrew, but when I run the program, there is no sound.
We have tried .mp3, and .ogg files, but to no avail.
This warning is displayed, but I don't know if it is connected to the issue:
This application, or a library it uses, is using the deprecated Carbon
Component Manager for hosting Audio Units. Support for this will be
removed in a future release. Also, this makes the host incompatible with
version 3 audio units. Please transition to the API's in AudioComponent.h.
Edit:
Apparently this doesn't work anymore. See Mike's comment below.
After much searching, I tried reinstalling sdl2_mixer with optional compile options enabled in Homebrew.
First, I removed the original install of sdl2_mixer with
brew remove sdl2_mixer
Then I ran
brew --info sdl2_mixer
to find out what compile options I could enable.
Finally, I reinstalled sdl2_mixer with
brew install sdl2_mixer --with-flac --with-fluid-synth --with-libmikmod \
--with-libmodplug --with-libvorbis --with-smpeg2
Not all of these compile options will be necessary in every case. You could experiment by enabling just one at a time until you find the one that works in your case.
(I'm pretty sure the depreciation warning mentioned in the question is not relevant to the successful or unsuccessful playback of sound, because the warning still displays even when sound playback is working.)

Gstreamer 1.0 ios sdk installer failed to install

This is my first time trying with Gstreamer for ios , I went with the tutorial and installed the SDK with the link provided by the tutorial:
http://docs.gstreamer.com/display/GstSDK/Installing+for+iOS+development
The installation works fine, but after I start trying the tutorial example projects, there couple of compiling errors compiling about missing gst/video/videooverlay.h . Then I looked into the header folder under the installed GStreamer header folder, there is no filed called video/videooverlay.h
Then I search online, found this information:
Gstreamer for iOS provided is out of date. I used the freedesktop packages
from https://github.com/braincorp/gstreamer_ios_tutorial
Then I downloaded another installation pkg for GStreamer
Then while I was trying to install the later version, the installer give me error saying:
you cannot install GStreamer 1.0 (Development Files) in this location.
Then I thought I might need to uninstall the previous version, but I couldn't finder a standard uninstallation option from the installer, then I searched online, find one post suggest remove the GStreamer folder under ~/Library/Developer
I have removed the installed folder, so I don't have any header files, but the new installer still gives the same error
I have been trying to figure this out for sometime, couldn't find useful info on line , I really appreicate any clue and help you might have!
Thanks!!
Jing
Answering my own question here..
not sure what's the issue, after restarting my mac, and run the installer couple of times with the same error, it suddenly worked ....... i am not sure what's the matter here, hope gstreamer team can improve the stability of the installer in the future.
At work we are currently trying to get the IOS tutorials from the streamer 1.0 sdk to run.
1) Compilation: Same thing: we managed to bootstrap (cerbero ... bootstrap) and compile (cerebra ... package streamer-sdk) using the official cerebero git repository.
But:
a) We had to mock around with the /cerbero/cerbero/enums.py file:
Add in the collection of supported old IOS (6.0, 6.1, 7.0, etc...) the one corresponding to our Xcode version : IOS 8.4
b) We had to customize the /cerbero/config/ios.config and iOS-universal.config files to get them to use the right architecture in our case: arm7v or arm7 instead of X64_86 or x86
c) We removed the not found is_asm() function from the x264 plugin's recipe file in the /cerbero/recipes.
For a reason we ignore, for all other platforms but IOS, the recipes check on the architecture available using:
if self.config.target_arch == Architecture.xxx:
of iOS is was using that missing function: is_asm(self.config.target_arch)
We replaced it by:
if self.config.target_arch == Architecture.ARMv7:
Compiling an iOS app using streamer:
So far it is a failure. we bumped into the same missing overlay.h header file. We couldn't find it anywhere.
DIFFERENCE between gstreamer.com (the sdk provider) and the official streamer website (free desktop.gsteamer.org):
We found out that gstreamer.com is clearly a commercial goal company that is making available the sdk, that people struggle on with for IOS (tested and working fine on linux) and the official website is providing the gstreamer library only without an sdk.
So this is what we are trying to use instead as of today.
Versions infos:
sdk (from gstreamer.com): current cerbero git master branch: git clone git://anongit.freedesktop.org/gstreamer-sdk/cerbero
official gstreamer library:
http://gstreamer.freedesktop.org/data/pkg/ios/1.5.2/

Updating a dylib to reference correct versions of other dylibs (Homebrew)

I'm trying to build a program that uses QT and OpenCV. It compiles correctly, but when I run the application I get:
Starting /Users/Me/MyApp/Contents/MacOS/Foo...
dyld: Library not loaded: /usr/local/lib/libavformat.54.29.104.dylib
Referenced from: /usr/local/lib/libopencv_highgui.2.4.3.dylib
Reason: image not found
The program has unexpectedly finished.
/Users/Me/MyApp/Contents/MacOS/Foo exited with code 0
I've had a look in my /usr/local/lib, the files are properly linked there, the issue is that libav is now at a higher version and opencv doesn't reflect this (e.g. looking at the opencv dylib in a hex editor I see that it wants what it says above, but what's actually in my lib folder is e.g. version 54.59.106. I've tried runnning brew update/upgrade and relinking everything, but no luck.
I can make a quick fix by copying the offending dylibs and renaming them to older versions. This does cause the program to open correctly, but it's a bit of a hack.
Obviously I could probably fix this with a reinstall of the relevant libraries, but that takes precious time.. from this thread it seems like the only option, but I don't know if that's been fixed yet: https://github.com/mxcl/homebrew/issues/11832
Seems like the only way to fix this was to run:
brew rm ffmpeg && brew install ffmpeg
brew rm opencv && brew install opencv
Probably didn't need to repour ffmpeg, but I didn't see any harm in it. Turns out this happens sometimes when a package updates to a major new version and the other package hasn't also been updated yet.

Resources