Page 1 of 2

Request: Git

PostPosted: Tue Mar 29, 2016 3:52 pm
by minicoin
PS: is it okay to post every separate issue into its own topic? I hope it is.

I'd like to see Git in the iosbinpack. Yes, I know, I know, I'm asking for a lot. But bear with me - saurik's version has been stuck on 1.x for years, and only recently updated to 2.x.

Or, perhaps I only need a recent version of OpenSSL -- since Git cloning only works when you set git config --global http.sslVerify false. (It's in issue with GitHub's CA)

Re: Request: Git

PostPosted: Wed Apr 13, 2016 2:18 pm
by morpheus
Ah... I might get to git, but first I'd have to get the compiler working. IMMHO, no sense in getting a source control if you can't compile the source. And compiling llvm is a $%#$%$#% pain. Working on it, but don't hold your breath.

Re: Request: Git

PostPosted: Thu Apr 14, 2016 7:52 pm
by minicoin
Ah, well have you seen the iOS Toolchain on BigBoss? http://cydia.saurik.com/package/org.coo ... toolchain/

I've tried compiling Git on device, but it fails to find headers for IOKit.

The iOS Toolchain comes with ldid, LLVM, Clang, and Darwin CC Tools - so it should be possible to compile stuff with it. Just haven't figured out how. Maybe you could take a look?

Edit: I asked saurik and he updated Git to 2.8 on his repo. I do not need Git anymore, but I would still like to see if I can compile each version on my own time.

Re: Request: Git

PostPosted: Thu Apr 14, 2016 9:07 pm
by Siguza
Well the Cydia page of the iOS Toolchain specifically says "SDK not included".
Libraries and headers (including Frameworks) are missing entirely.
The libraries and frameworks are all in the dyld cache (/System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm*) and can be extracted (one at a time) with jtool -e.
As far as I know, the only way to get the headers, though, is by copying them from the official SDK.

@J:
There wouldn't happen to be any option in jtool to extract all files from a dyld cache (similar to otaa -e '*'), or list all file names contained therein?

Re: Request: Git

PostPosted: Thu Apr 14, 2016 9:10 pm
by minicoin
Siguza, I have no problem getting iPhone SDKs, but how does one use them? How can I tell clang to build for the iPhoneOS9.2.sdk, for example?

I have asked https://twitter.com/coolstarorg for help, but he seems to be busy or not caring to answer my question. I know CoolStar is familiar with building on device as he told me he has done it before.

Re: Request: Git

PostPosted: Thu Apr 14, 2016 10:05 pm
by Siguza
Do you have a specific thing that isn't working?
Because building against SDK x.y.z would simply mean copying the libraries and headers from that SDK version to the device and using
Code: Select all
clang -I/var/wherever/sdk.x.y.z/include -L/var/wherever/sdk.x.y.z/lib -miphoneos-version-min=x.y.z ...

Re: Request: Git

PostPosted: Fri Apr 15, 2016 2:29 pm
by morpheus
Siguza: jtool -e 'all' :-) I should standardize my command line arguments. From next version of jtool also '*' will be supported. And I'll credit you with that :-)

minicoin: you can also use the gcc-iphone scripts from the site, which are wrappers over this.

As for the existing toolchain - it's gcc, not clang, and really obsolete. AFAICR, it's also 32-bit only.

Re: Request: Git

PostPosted: Fri Apr 15, 2016 8:05 pm
by Siguza
J, I think you're confusing the "iPhone 2.0 Toolchain" (which has been defunct since iOS 5 or so) with the "iOS Toolchain".
The latter states "this metapackage installs LLVM+Clang, ld64, CC Tools, GNU Make, and ldid in one go", and those tools work beautifully for me on 8.4 arm64 (after copying headers and libs, ofc). :)

I also think I found another bug in jtool (when extracting from shared cache to a folder you have no write permission):
Code: Select all
Extracting /usr/lib/libSystem.dylib at 0x12e8c000 into dyld_shared_cache_arm64.libSystem.dylib
Unable to create file.. Trying /tmp/tmp//usr/lib/libSystem.dylib: No such file or directory

Re: Request: Git

PostPosted: Fri Apr 15, 2016 11:11 pm
by morpheus
I stand corrected, then; I wasn't aware someone made the full toolchain for 64-bit; I managed to get LD64 working, but abandoned it shortly after. I'll give it a try.

(and fix that jtool bug :-)

Re: Request: Git

PostPosted: Wed Apr 20, 2016 2:19 pm
by minicoin
Hi J,

I've managed to grab LLVM+Clang, Make, and a lot of other development utilities. I have the source code for Git, but every time I make it, it complains about libintl.h missing. Do you know where I can find this header? It seems like it comes from gettext, but saurik's gettext lacks any headers.

(still, note: I am compiling on device, so I don't have access to Homebrew or MacPorts)