Comments (21)
SDK
$ git clone https://github.com/LubosD/darling-dmg.git
$ cd darling-dmg
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=RELEASE
$ make -j ...
$ cd ../..
$ mkdir xcode
$ ./darling-dmg/build/darling-dmg </path/to>/Xcode_6.4.dmg xcode
[...]
Everything looks OK, disk mounted
$ cd xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
$ ll
total 1
drwxrwxr-t 1 root root 0 Jun 20 13:43 iPhoneOS.sdk/
lrwxr-xr-x 1 root root 12 Jun 23 00:05 iPhoneOS8.4.sdk -> iPhoneOS.sdk/ # 8.4 is a symlink
$ mktemp -d
/tmp/tmp.lF1Lf5wspl
$ mkdir /tmp/tmp.lF1Lf5wspl/iPhoneOS8.4.sdk
$ cp -r iPhoneOS.sdk/* /tmp/tmp.lF1Lf5wspl/iPhoneOS8.4.sdk # do not copy the symlink
$ cp -r ../../../../Toolchains/XcodeDefault.xctoolchain/usr/include/c++/* /tmp/tmp.lF1Lf5wspl/iPhoneOS8.4.sdk/usr/include/c++
$ cd /tmp/tmp.lF1Lf5wspl
$ tar -cf - * | xz -9 -c - > iPhoneOS8.4.sdk.tar.xz
TOOLCHAIN
$ git clone https://github.com/tpoechtrager/cctools-port.git
$ cd cctools-port/usage_examples/ios_toolchain
$ ./build.sh </path/to>/iPhoneOS8.4.sdk.tar.xz armv7 # arm64 is untested
$ cat ~/tmp/test.cpp
#include <iostream>
int main() {
std::cout << "Hello World" << std::endl;
return 0;
}
$ arm-apple-darwin11-clang++ -stdlib=libc++ ~/tmp/test.cpp
$ file a.out
a.out: Mach-O arm_v7 executable
$ arm-apple-darwin11-otool -L a.out
a.out:
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 235.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1214.5.1)
Hope this helps
from osxcross.
So far Godot builds nicely with it, and it's a pretty complex codebase.
from osxcross.
I also thought about creating a wiki for OSXCross, but I haven't started one yet, it's all a lot of work as a one-man project maintainer...
Any help would be more than welcome!
a Wiki page of success stories.
Better not because of: #4
from osxcross.
Hey reduz, is there a tutorial on how to use osxcross with godot?
from osxcross.
it just works, install it as the page describes and then use the
environment var OSXCROSS_ROOT to wherever you did the osxcross git checkout
On Mon, Sep 7, 2015 at 12:48 PM, PurpleOrangeGames <[email protected]
wrote:
Hey reduz, is there a tutorial on how to use osxcross with godot?
—
Reply to this email directly or view it on GitHub
#45 (comment)
.
from osxcross.
We didn't have much success with iOS though, not quite sure I understand
how to do it.. so help is appreciated.
On Mon, Sep 7, 2015 at 12:51 PM, Juan Linietsky [email protected] wrote:
it just works, install it as the page describes and then use the
environment var OSXCROSS_ROOT to wherever you did the osxcross git checkoutOn Mon, Sep 7, 2015 at 12:48 PM, PurpleOrangeGames <
[email protected]> wrote:Hey reduz, is there a tutorial on how to use osxcross with godot?
—
Reply to this email directly or view it on GitHub
#45 (comment)
.
from osxcross.
That's an amazing response @tpoechtrager. Thank you very much for the detailed instructions :)
from osxcross.
Hey @tpoechtrager, I really like your work! It's saved me loads of time :)
Just thought I'd post this snippet for anyone who might have lost their symlinks in the SDK:
SDK=~/deps/SDK/MacOSX10.9.sdk
FRAMEWORKS=`find ${SDK} -name "*.framework" -type d`
for FRAMEWORK in $FRAMEWORKS; do
if [ -d "${FRAMEWORK}/Headers" ]; then
[ -d "${FRAMEWORK}/Versions/A/Headers" ] && ln -s ${FRAMEWORK}/Versions/A/Headers/* ${FRAMEWORK}/Headers/ 2> /dev/null
[ -d "${FRAMEWORK}/Versions/B/Headers" ] && ln -s ${FRAMEWORK}/Versions/B/Headers/* ${FRAMEWORK}/Headers/ 2> /dev/null
[ -d "${FRAMEWORK}/Versions/C/Headers" ] && ln -s ${FRAMEWORK}/Versions/C/Headers/* ${FRAMEWORK}/Headers/ 2> /dev/null
fi
if [ -d "${FRAMEWORK}/Frameworks" ]; then
[ -d "${FRAMEWORK}/Versions/A/Frameworks" ] && ln -s ${FRAMEWORK}/Versions/A/Frameworks/* ${FRAMEWORK}/Frameworks/ 2> /dev/null
[ -d "${FRAMEWORK}/Versions/B/Frameworks" ] && ln -s ${FRAMEWORK}/Versions/B/Frameworks/* ${FRAMEWORK}/Frameworks/ 2> /dev/null
[ -d "${FRAMEWORK}/Versions/C/Frameworks" ] && ln -s ${FRAMEWORK}/Versions/C/Frameworks/* ${FRAMEWORK}/Frameworks/ 2> /dev/null
fi
done
from osxcross.
I finally got Qt 5.5 with qtwebkit to compile :)
Thanks so much for all the effort @tpoechtrager
It's nice being able to compile for linux, windows and osx from a single ubuntu machine :)
We are probably moving over to travis-ci, but it was a really fun challenge getting all our dependencies to compile for mac from linux :P
from osxcross.
@sdcdev @rynomster Glad to hear that! :-)
from osxcross.
Thank you @tpoechtrager for the iOS explanation, it works like a charm!
Here is how we are cross building our apps with toolchains made with osxcross and cctools-port. Maybe you find useful which lines we are using. We are building static libraries such SDL2, libicu, expat, freetype, etc. Those prefixed with a "+" are the script commands:
OS X:
https://ci.easyrpg.org/job/osx-toolchain/lastSuccessfulBuild/consoleFull
https://ci.easyrpg.org/job/liblcf-osx/lastSuccessfulBuild/consoleFull
https://ci.easyrpg.org/job/player-osx/lastSuccessfulBuild/consoleFull
iOS:
https://ci.easyrpg.org/job/ios-toolchain/lastSuccessfulBuild/consoleFull
https://ci.easyrpg.org/job/liblcf-ios/lastSuccessfulBuild/consoleFull
https://ci.easyrpg.org/job/player-ios/lastSuccessfulBuild/consoleFull
Just a note for building latest SDL2 for iOS: you need to enable ARC (by passing -fobjc-arc
, check the ios-toolchain link above) and clang will need to find an additional library (/usr/lib/llvm-3.5/lib/arc/libarclite_iphoneos.a
in our debian host case) for the compiler test, which can be found in one of SDK folder. When the build fails with "cannot create executables", check the file SDL2 config.log
to see which is the right path missing in your distro. This file is available when unpacking the SDK in Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a
. If you are using an older Xcode version, there is some related reference about this.
Hope this helps
from osxcross.
Hi there. I was glad to com across this thread, and across your work tpoechtrager ;-) I think that I may find some help so I ask my question here : I cross build llvm+clang for iOS8.4 (arm64) successfully, see here :
(i'm using XCode 7 to which I re-added the 8.4 sdk) for the whole story and now I have a linking "problem" --> I don't have any linker... ;-) So I naturally started to look for methods to build binutils for iOS8.4 (arm64), without much success, and came across your cctools port. I would like to build cctools for iOS8.4 (arm64), how could I do it ?
Thx in advance,
MEF
PS : sorry for this way of contacting you, btw... (did not have any other)
from osxcross.
@MisesEnForce I answered your questions on StackOverflow.
- https://stackoverflow.com/questions/32808144/how-to-cross-compile-clang-llvm-3-7-0-for-ios8-x-on-ipad-mini-3
- https://stackoverflow.com/questions/33198629/almost-naked-ios8-4-how-to-get-a-linker
from osxcross.
@tpoechtrager Excellent work!
from osxcross.
@rynomster, can you tell me how you built Qt 5.5?
from osxcross.
@fxfactorial: Thanks!
from osxcross.
@Wohlstand if you need ssl support, you'll need to first compile openssl. If you need to compile qtwebkit you need flex and icu, and to compile icu.
I made a custom spec called macx-clang-linux. I've automated the process using gitian on lxc, you can checkout https://github.com/shadowproject/shadow/blob/master/contrib/gitian-descriptors/qt-osx.yml
If you need help understanding it, let me know. Sorry about the late reply, I only saw my mail now.
from osxcross.
I took this, built on it, and wrapped it up in nixpkgs !
Now all you need to do is:
nix-env -i clang ios-cross-compile
(some instructions will come up for the SDK, which of course I can't resdistribute)
and you'll have the compiler installed.
from osxcross.
Thanks so much for this! It worked like a charm for my needs.
from osxcross.
I have been looking for this solution for some time and glad it was brought to my attention. Xsaitekpanels (github.com/sparker256/xsaitekpanels) is now using osxcross so I can build the complete multiplatform package on my Ubuntu 16.04 LTS machine.
Thank you Bill
from osxcross.
@rynomster did you enabled macOS builds on Linux for travis? Are there any issues regarding Apple SDK's license agreement?
from osxcross.
Related Issues (20)
- gen_sdk_package_tools_dmg.sh non-zero exit code: 1 with Xcode 14 HOT 1
- ./build_clang.sh - fails in build_stage2
- Cannot execute binary file on Apple M1 HOT 10
- warning: cannot find clang intrinsic headers; please report this issue to the OSXCross project HOT 2
- Can't build osxcross under WSL
- OSXCROSS_HOST is used instead of OSXCROSS_TARGET in the CMake toolchain file HOT 1
- static build
- osx how to fix ./gen_sdk_package.sh: line 55: $2: ambiguous redirect tar: Write error HOT 1
- macports GTK4 HOT 1
- build_clang.sh cannot find source tarballs and fails HOT 4
- gcc and __API_AVAILABLE
- ranlib can't rename file => fixed HOT 1
- unable to use LTO with static library HOT 1
- No 32 bit binaries being built HOT 2
- Arm64e (more a question than an issue) HOT 1
- Your manual isn't clear... HOT 2
- Minor Documentation Edit -- Tarball doc misses a few packages HOT 1
- Not an issue: osxcross can also be used to cross-compile to macOS using Visual Studio and WSL
- Allow building MacPorts packages.
- gen_sdk_package error in xcode14 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osxcross.