Coder Social home page Coder Social logo

Success Stories? about osxcross HOT 21 OPEN

tpoechtrager avatar tpoechtrager commented on June 24, 2024
Success Stories?

from osxcross.

Comments (21)

tpoechtrager avatar tpoechtrager commented on June 24, 2024 2

@reduz:

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.

reduz avatar reduz commented on June 24, 2024 1

So far Godot builds nicely with it, and it's a pretty complex codebase.

from osxcross.

tpoechtrager avatar tpoechtrager commented on June 24, 2024

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.

purpleorangegames avatar purpleorangegames commented on June 24, 2024

Hey reduz, is there a tutorial on how to use osxcross with godot?

from osxcross.

reduz avatar reduz commented on June 24, 2024

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.

reduz avatar reduz commented on June 24, 2024

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 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.

aidansteele avatar aidansteele commented on June 24, 2024

That's an amazing response @tpoechtrager. Thank you very much for the detailed instructions :)

from osxcross.

 avatar commented on June 24, 2024

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.

rynomster avatar rynomster commented on June 24, 2024

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.

tpoechtrager avatar tpoechtrager commented on June 24, 2024

@sdcdev @rynomster Glad to hear that! :-)

from osxcross.

fdelapena avatar fdelapena commented on June 24, 2024

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

iOS result demo video

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.

MisesEnForce avatar MisesEnForce commented on June 24, 2024

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 :

http://stackoverflow.com/questions/32808144/how-to-cross-compile-clang-llvm-3-7-0-for-ios8-x-on-ipad-mini-3

(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.

tpoechtrager avatar tpoechtrager commented on June 24, 2024

@MisesEnForce I answered your questions on StackOverflow.

from osxcross.

fxfactorial avatar fxfactorial commented on June 24, 2024

@tpoechtrager Excellent work!

from osxcross.

Wohlstand avatar Wohlstand commented on June 24, 2024

@rynomster, can you tell me how you built Qt 5.5?

from osxcross.

tpoechtrager avatar tpoechtrager commented on June 24, 2024

@fxfactorial: Thanks!

from osxcross.

rynomster avatar rynomster commented on June 24, 2024

@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.

fxfactorial avatar fxfactorial commented on June 24, 2024

@tpoechtrager

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.

cprevallet avatar cprevallet commented on June 24, 2024

@tpoechtrager

Thanks so much for this! It worked like a charm for my needs.

from osxcross.

sparker256 avatar sparker256 commented on June 24, 2024

@tpoechtrager

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.

rraallvv avatar rraallvv commented on June 24, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.