tpoechtrager / cctools-port

Apple cctools port for Linux and *BSD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when use build.sh

liyuhannnnn opened this issue · comments

commented

Hello, i am trying to use cctools-port in linux for getting an arm64-apple-darwin11-clang. I got something wrong when using build.sh cctools-port/usage_examples/ios_toolchain.
My environment:

  1. Ubuntu 18.04 with vmware.
  2. clang-6.0 (download with sudo apt-get install clang) :
    $ clang --version
    clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    Target: x86_64-pc-linux-gnu
    Thread model: posix
    InstalledDir: /usr/bin
  3. iPhone sdk: iPhoneos13.2.sdk.tar.gz(download from https://github.com/okanon/iPhoneOS.sdk)
    I think the package has included sdk and include/c++/v1 completely.

Now i try to use build.sh to get a toolchain and use ./build.sh ./iPhoneos13.2.sdk.tar.gz arm64. And i met some problem.
First, it tell me that :

cleaning up ...

*** extracting SDK ***

extracting iPhoneOS13.2.sdk.tar.gz ...
gzip: iPhoneOS13.2.sdk.tar.gz: No such file or directory
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

So i use gzip -dc iPhoneOS13.2.sdk.tar.gz | tar xf - by myself, and it can work(I don't know why). and then my pwd have the unzip folder(iPhoneOS13.2.sdk) and then i comment extract $1 and rerun the build.sh with the top command but i tell me that :

cleaning up ...

*** extracting SDK ***

SDK should contain libSystem{.dylib,.tbd}

I look at the build.sh but i just see that the build.sh creats /bin and /SDK in /target and i didn't see where the build.sh adds two files(.dylib,.tbd) in /SDK. So could you give me some idea about my problem? Thank you very much.

You must specify the full path to the SDK i.e. /home/xyz/iPhoneOS13.2.sdk.tar.gz.

commented

This step is fine, and then it tells me that :

cleaning up ...

*** extracting SDK ***

SDK should contain libSystem{.dylib,.tbd}

It has created the target folder and the sub-folders /bin and /SDK, but it doesn't have the two files.

commented

I got you. It's ok now! And i just have one more question. I see someone use the command like IPHONEOS_DEPLOYMENT_TARGET=5.0 usage_examples/ios_toolchain/build.sh ~/iPhoneOS10.0.sdk.tar.gz arm64. It writes IPHONEOS_DEPLOYMENT_TARGET=5.0 but use iPhoneOS10.0.sdk.tar.gz, i just wonder what IPHONEOS_DEPLOYMENT_TARGET=5.0 means? Maybe it means the lowest version of IPHONEOS for our production arm-apple-darwin11-clang/clang++? And if i don't write it before ./build.sh, for example, i use iphoneos13.2.sdk.tar.gz, what is the lowest version of IPHONEOS for my production arm-apple-darwin11-clang/clang++?

The default value for -miphoneos-version-min= or IPHONEOS_DEPLOYMENT_TARGET is 4.2. I haven't changed it in ages. Setting it before build.sh has no effect.

You must specify it while compiling.

arm-apple-darwin11-clang test.c -miphoneos-version-min=10

or

export IPHONEOS_DEPLOYMENT_TARGET=10
arm-apple-darwin11-clang test.c