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

Make fails when attempting to compile for various Apple & iOS targets #42084

Closed
AdamCampbell opened this issue May 18, 2017 · 6 comments
Closed
Labels
C-bug Category: This is a bug. O-ios Operating system: iOS T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@AdamCampbell
Copy link

AdamCampbell commented May 18, 2017

I am trying to follow this guide
It's a little outdated but I have checked out repo in order to manually compile for these targets.

I have run:

configure --target=armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,aarch64-apple-ios,x86_64-apple-ios --prefix=$HOME/rustc-ios
make -j8 && make install

However I think the ordering in the makefile is wrong as it tries to run an install.sh that does not exist.

rust-compile-log.txt
Log of failed installation is attached with the main issue being:

Install std stage2 (armv7-apple-ios)
sh: /Users/adam/Development/rust/build/build/tmp/dist/rust-std-1.19.0-dev-armv7-apple-ios/install.sh: No such file or directory
@AdamCampbell AdamCampbell changed the title Build fails when attempting to compile for various Apple & iOS targets Make fails when attempting to compile for various Apple & iOS targets May 18, 2017
@kennytm
Copy link
Member

kennytm commented May 18, 2017

rustbuild refers to the install.sh thing in https://github.com/rust-lang/rust/blob/0ed1ec9f9e/src/bootstrap/install.rs#L92.


[Not about the bug] Nowadays you don't need to build a cross-compiler from source yourself. rustup is enough to setup everything for iOS (and Android) development. The whole "Installing Rust with multirust" should be replaced by "Install rustup."

curl https://sh.rustup.rs -sSf | sh

and the whole "Building a Cross Compiler" should be replaced by

rustup target add aarch64-apple-ios 
rustup target add armv7-apple-ios 
rustup target add armv7s-apple-ios 
rustup target add x86_64-apple-ios 
rustup target add i386-apple-ios

then go on from "Hello, World: Building the Rust Library" (but ignore the multirust override ios step).

cc @jgallagher

@steveklabnik steveklabnik added A-build T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 18, 2017
@AdamCampbell
Copy link
Author

Oh awesome thanks @kennytm that should make things much easier.
May as well leave this issue open for now, don't know if this compilation log represents a compiler error or user error now since so much has changed.

@Mark-Simulacrum Mark-Simulacrum added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. and removed A-build labels Jul 27, 2017
@Mark-Simulacrum Mark-Simulacrum added this to the impl period milestone Sep 15, 2017
@aturon aturon removed this from the impl period milestone Sep 15, 2017
@piaojin
Copy link

piaojin commented May 24, 2018

@kennytm

curl https://sh.rustup.rs -sSf | sh
and the whole "Building a Cross Compiler" should be replaced by

rustup target add aarch64-apple-ios 
rustup target add armv7-apple-ios 
rustup target add armv7s-apple-ios 
rustup target add x86_64-apple-ios 
rustup target add i386-apple-ios

work for me, thanks!

@ppamorim
Copy link

ppamorim commented Apr 29, 2020

I am getting component 'rust-std' for target 'i386-apple-ios' is unavailable for download for channel stable when running the commands above, only the target aarch64-apple-ios and rustup target add x86_64-apple-ios work.

@kennytm
Copy link
Member

kennytm commented Apr 29, 2020

@ppamorim All 32-bit Apple targets have been removed since 1.42.0. You could just leave those targets out. See https://blog.rust-lang.org/2020/01/03/reducing-support-for-32-bit-apple-targets.html for details.

@madsmtm
Copy link
Contributor

madsmtm commented Aug 21, 2024

Triage: There is nothing to be done here, so I suggest that we close this issue, and direct questions to the users forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-ios Operating system: iOS T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

10 participants