Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when use build.sh #88

Open
liyuhannnnn opened this issue Aug 26, 2020 · 4 comments
Open

Error when use build.sh #88

liyuhannnnn opened this issue Aug 26, 2020 · 4 comments

Comments

@liyuhannnnn
Copy link

liyuhannnnn commented Aug 26, 2020

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.

@tpoechtrager
Copy link
Owner

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

@liyuhannnnn
Copy link
Author

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.

@liyuhannnnn
Copy link
Author

liyuhannnnn commented Aug 27, 2020

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++?

@tpoechtrager
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants