Lambdanative can compile for OSX but not iOS - 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.

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.

iOS firebase Mach-O Linker Error without cocapods

I'm trying to import Firebase into my iOS app. I followed this tutorial for doing this manually with Objective-C (as opposed to using CocoaPods).
http://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/
When I try to build my project, I get the following errors:
"Apple Mach-O Linker Error"
"Linker command failed with exit code 1 (use -v to see invocation)"
I'm familiar with the Linux CLI (less so with Macs), but I don't understand how to apply the -v flag to XCode's build process to get more info.
I've been Googling this for the last 3 hours, but every answer I find seems to be directed at users who weren't using an XCode workspace with CocoaPods.
I don't have CocoaPods installed, so I don't think this is my issue. Despite that I have converted my project and properly imported it into an XCode workspace, this still didn't solve my problem.
My app is a Swift project, and I have imported the modulemap, firebase.h, and googleServices.plist files.
I've also made my Header and Library search paths recursive for the entire project folder in an attempt to fix this.
Here's my project navigation. Although at this point I suspect it's some kind of build setting that isn't correct.
Some selected answers I've tried to apply without success:
Apple Mach -O Linker command failed
In Xcode how do I create a new workspace and add 1 project to it so that I can see the project and its files?
Framework not found GoogleToolboxForMac
Adding system header search path to Xcode
https://github.com/firebase/firebase-ios-sdk/issues/258
Apple Mach-O Linker & Ditto Error - Xcode 8
https://github.com/invertase/react-native-firebase/issues/198
https://forum.ionicframework.com/t/ios-xcode-8-apple-mach-o-linker-ld-error-group-in-xcode/89903
Upgrading to xcode 9.2 fixes this. It appears to be an issue with earlier versions not properly handling linking.
Which is misleading b/c the firebase documentation indicates it's compatible with xcode 8. But I think that's assuming you use cocoapods. If you don't, and instead try to link the obj-c frameworks you need xcode 9+
Once I knew how to examine the more verbose linking error, googling for x86_64 led me to some helpful answers.
This and other answers helped me investigate upgrading.
ld: framework not found Stripe for architecture x86_64

Apple Mach-O Linker Error When Building Starter Code

I am using Xcode 8.2.1, Swift 3, and IOS 10.2 (for iphone simulator). I am trying to follow this tutorial https://www.raywenderlich.com/139322/firebase-tutorial-getting-started-2
I have not gotten to the Firebase stuff. Right now I am just trying to build and compile the starter code (should run fine). When I do this, however, I get the following error:
ld: library not found for -lPods-Grocr
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do I fix this? PS. I have done a pod install successfully.
When I first began working with Firebase I encountered many issues like this and for a while wondered if scrapping the whole Application and restarting was the best option. In the end the fix was simply, getting rid of the modules inside my app and uninstalling the pods then going back through the process of installing them. Sometimes a file will be place in the wrong directory so when the app goes to build it is looking for something that cannot be found and it fails. Good luck let me know if you have any more questions or issues.

cant compile pjsip for iOS because of fatal error

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.

Compiling Qt for iOS (UIKit lighthouse) part 2

I'm trying to compile Qt for the iOS simulator, as explained in this article.
At first I ran into this problem but after it (kinda) solved itself I had some more.
First I kept getting this error after executing the first command, which is supposed to build qmake (../qt/configure ... etc etc):
The OpenGL ES 2.0 functionality test failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in /Qt/qt/mkspecs/qpa/macx-iphonesimulator-g++.
Since I knew that I had the 4.3 SDK, I delved into it some more, analyzed the configure script, and after some tracing I saw that the Makefile generated by qmake, required g++-4.2 (which I didn't have), so I just ln -s g++ g++-4.2 and ln -s gcc gcc-4.2 in /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/.
I'm not sure if the aforementioned steps matter, that's why I'm writing about them. Anyway, with that, the configure step was successful. Now I ran make. After some successfully compiled files I got this:
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/WebServicesCore.framework/Headers/WebServicesCore.h:15,
from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37,
from ../../include/QtCore/private/../../../../qt/src/corelib/kernel/qcore_mac_p.h:83,
from ../../include/QtCore/private/qcore_mac_p.h:1,
from /Qt/qt/src/corelib/tools/qlocale_mac.mm:49:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/WebServicesCore.framework/Headers/WSMethodInvocation.h:759:
error: 'CFXMLTreeRef' has not been declared
The same error appears several more times, from several different lines of WebServicesCore.h. So, basically, here's where I'm stuck now.
Any help? Again?...
Edit: Absolutely, 100% the same thing happens when I configure and try to make Qt for the device (as opposed to the simulator)
Additional info:
gcc --version : i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
iOS SDK: I have both 4.3 and 5
OS X version: 10.7.2
Xcode version (if it matters): 4.2.1
Didn't you forget to add -nomake tools and other -nomake ... to your configure ?
Try poking this guys: http://labs.qt.nokia.com/2011/08/09/update-on-uikit-lighthouse-platform/

Resources