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

Apple iOS support #18154

Open
larsbergstrom opened this issue Aug 19, 2017 · 20 comments
Open

Apple iOS support #18154

larsbergstrom opened this issue Aug 19, 2017 · 20 comments
Labels

Comments

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Aug 19, 2017

This is a meta-issue for adding support for compiling Servo to target iOS. To work on this, just clone Servo as normal but build with: ./mach build -d --target aarch64-apple-ios

Add -j 1 to turn this into more of a linear process.

Next tasks:

  • Fix sandboxing/gaol build break by running in a single process and open issue in gaol to consider iOS sandboxing later.
@larsbergstrom
Copy link
Contributor Author

@larsbergstrom larsbergstrom commented Aug 19, 2017

@JJayet
Copy link
Contributor

@JJayet JJayet commented Aug 21, 2017

I'm interested in this if it's a good first PR :)

@jdm
Copy link
Member

@jdm jdm commented Aug 21, 2017

@JJayet It's not clear what work will be required. If you want to give it a try, you are welcome to!

@JJayet
Copy link
Contributor

@JJayet JJayet commented Aug 21, 2017

@jdm I'm actually looking at the problem right now.
I've tried to replicate the Windows configuration since it seems to not use Gaol as well.

[target.'cfg(not(target_os = "windows"))'.dependencies]
[target.'cfg(not(target = "aarch64-apple-ios"))'.dependencies]

or

[target.'cfg(not(target_os = "windows"))'.dependencies]
[target.'cfg(not(target_arch = "aarch64-apple-ios"))'.dependencies]

doesn't seem to work (in servo/Cargo.toml and `constellation/Cargo.toml) as it still tries to compile the library.

Any idea ?

@jdm
Copy link
Member

@jdm jdm commented Aug 22, 2017

You need to modify the existing cfg to use cfg(not(or(..., ...))) instead of adding a separate target.

@JJayet
Copy link
Contributor

@JJayet JJayet commented Aug 22, 2017

@jdm so... this seems to do the trick :

[target.'cfg(all(not(target_os = "windows"), not(target_arch = "aarch64")))'.dependencies]
(don't know if target_arch = "aarch64"is not too broad though, nut nothing else seems to work)

Thanks for the help :)

I'm know facing multiple errors from other packages (expat-sys, servo-freetype-sys, fontsan, heartbeats-simple-sys, mozjs_sys).

I will try to find out why.

@larsbergstrom
Copy link
Contributor Author

@larsbergstrom larsbergstrom commented Aug 22, 2017

@JJayet Nice work!

Does this work with:

[target.'cfg(all(not(target_os = "window"), not(target_os = "ios")))'.dependencies]`

? If so, that would be ideal.

If it works and gets to the next set of errors, please feel free to open a PR with just that change! Then we can edit this issue to have errors from the other packages and handle them in separate PRs. It's fine for this to take 50 PRs to incrementally land the whole support!

@JJayet
Copy link
Contributor

@JJayet JJayet commented Aug 22, 2017

@larsbergstrom Yes indeed it works!
I tried before but due to me not understanding cfg, it was not working properly.

You're right, I'll try to PR with just that.
Thanks :)

@larsbergstrom
Copy link
Contributor Author

@larsbergstrom larsbergstrom commented Aug 22, 2017

@JJayet Thank you for joining in to work on this bug when I hadn't even properly tagged it!

@JJayet JJayet mentioned this issue Aug 22, 2017
3 of 4 tasks complete
bors-servo added a commit that referenced this issue Aug 23, 2017
First step toward iOS Support

This mostly prevents Gaol/sandboxing to be used during compilation.
There are a number of issues with : `expat-sys`, `servo-freetype-sys`, `fontsan`, `heartbeats-simple-sys`, `mozjs_sys`.

Also modified `components/script/dom/navigatorinfo.rs` in order to add iOS.

```rust
#[cfg(target_os = "ios")]
pub fn Platform() -> DOMString {
    DOMString::from("iOS")
}
```

See here for more informations : #18154

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes partially work on #18154

- [X] These changes do not require tests because it deals with the compile toolchain

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18189)
<!-- Reviewable:end -->
@JJayet
Copy link
Contributor

@JJayet JJayet commented Aug 23, 2017

@larsbergstrom @jdm As I'm working on getting each part to compile, I stumble upon the (lack of) User Agent.

Right now, I've added this :

UserAgent::iOS => {
    "Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X; rv:55.0) Servo/1.0 Firefox/55.0"
}

There are two things that bother me :

It may be nitpicking though.

Would the above UA be satisfying for now ?

@jdm
Copy link
Member

@jdm jdm commented Aug 23, 2017

That seems fine as an initial sensible UA.

@JJayet JJayet mentioned this issue Aug 23, 2017
3 of 4 tasks complete
bors-servo added a commit that referenced this issue Aug 23, 2017
Add initial iOS User-Agent

This commit adds an initial iOS User-Agent as discussed here : #18154 (comment)

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes (continues to) fix #18154.

<!-- Either: -->
- [X] These changes do not require tests because too little is done

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18205)
<!-- Reviewable:end -->
@atouchet
Copy link
Contributor

@atouchet atouchet commented Aug 23, 2017

Was this supposed to be closed?

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Aug 23, 2017
…support); r=larsbergstrom

This mostly prevents Gaol/sandboxing to be used during compilation.
There are a number of issues with : `expat-sys`, `servo-freetype-sys`, `fontsan`, `heartbeats-simple-sys`, `mozjs_sys`.

Also modified `components/script/dom/navigatorinfo.rs` in order to add iOS.

```rust
#[cfg(target_os = "ios")]
pub fn Platform() -> DOMString {
    DOMString::from("iOS")
}
```

See here for more informations : servo/servo#18154

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes partially work on #18154

- [X] These changes do not require tests because it deals with the compile toolchain

Source-Repo: https://github.com/servo/servo
Source-Revision: e61a043a567f2d8766b9bbecb88b3a9bfb7808d8

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : a2c0b7ec260e7fb45156d5d278abcd0a6b701e4c
@jdm jdm reopened this Aug 23, 2017
weilonge pushed a commit to weilonge/gecko that referenced this issue Aug 24, 2017
…support); r=larsbergstrom

This mostly prevents Gaol/sandboxing to be used during compilation.
There are a number of issues with : `expat-sys`, `servo-freetype-sys`, `fontsan`, `heartbeats-simple-sys`, `mozjs_sys`.

Also modified `components/script/dom/navigatorinfo.rs` in order to add iOS.

```rust
#[cfg(target_os = "ios")]
pub fn Platform() -> DOMString {
    DOMString::from("iOS")
}
```

See here for more informations : servo/servo#18154

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes partially work on #18154

- [X] These changes do not require tests because it deals with the compile toolchain

Source-Repo: https://github.com/servo/servo
Source-Revision: e61a043a567f2d8766b9bbecb88b3a9bfb7808d8
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Aug 24, 2017
…port); r=jdm

This commit adds an initial iOS User-Agent as discussed here : servo/servo#18154 (comment)

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes (continues to) fix #18154.

<!-- Either: -->
- [X] These changes do not require tests because too little is done

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: bde7135a3be80f8d8a4d15719394eddc97934392

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 1c1f59395f06c51c3a16716a4f9afeec8165e10a
xeonchen pushed a commit to xeonchen/gecko-cinnabar that referenced this issue Aug 24, 2017
…port); r=jdm

This commit adds an initial iOS User-Agent as discussed here : servo/servo#18154 (comment)

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes (continues to) fix #18154.

<!-- Either: -->
- [X] These changes do not require tests because too little is done

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: bde7135a3be80f8d8a4d15719394eddc97934392
aethanyc pushed a commit to aethanyc/gecko-dev that referenced this issue Aug 25, 2017
…port); r=jdm

This commit adds an initial iOS User-Agent as discussed here : servo/servo#18154 (comment)

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes (continues to) fix #18154.

<!-- Either: -->
- [X] These changes do not require tests because too little is done

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: bde7135a3be80f8d8a4d15719394eddc97934392
aethanyc pushed a commit to aethanyc/gecko-dev that referenced this issue Aug 25, 2017
…support); r=larsbergstrom

This mostly prevents Gaol/sandboxing to be used during compilation.
There are a number of issues with : `expat-sys`, `servo-freetype-sys`, `fontsan`, `heartbeats-simple-sys`, `mozjs_sys`.

Also modified `components/script/dom/navigatorinfo.rs` in order to add iOS.

```rust
#[cfg(target_os = "ios")]
pub fn Platform() -> DOMString {
    DOMString::from("iOS")
}
```

See here for more informations : servo/servo#18154

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes partially work on #18154

- [X] These changes do not require tests because it deals with the compile toolchain

Source-Repo: https://github.com/servo/servo
Source-Revision: e61a043a567f2d8766b9bbecb88b3a9bfb7808d8
@JJayet
Copy link
Contributor

@JJayet JJayet commented Sep 5, 2017

Hello everyone,

Here are the errors that pop-in:

  • mozjs-sys:
--- stderr
DEBUG: _cc: Trying aarch64-apple-ios-gcc
ERROR: Cannot find the target C compiler
make: *** [maybe-configure] Error 1
thread 'main' panicked at 'assertion failed: result.success()', /some/path/mozjs-fa11ffc7d4f1cc2d/834ce35/build.rs:43:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
  • harfbuzz-sys:
Invalid configuration `aarch64-apple-ios': system `ios' not recognized
configure: error: /bin/sh /some/path/harfbuzz-sys-0.1.12/harfbuzz/config.sub aarch64-apple-ios failed
  • servo-freetype-sys:
clang: warning: using sysroot for 'MacOSX' but targeting 'iPhone' [-Wincompatible-sysroot]
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libSystem.tbd, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libSystem.tbd (2 slices)
ld: dynamic main executables must link with libSystem.dylib for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_5573e] Error 1
make: *** [cmTC_5573e/fast] Error 2

I'm wondering if some of the errors could come from my Mac not having the right setup or if those libs do not have an iOS target.

@MortimerGoro
Copy link
Contributor

@MortimerGoro MortimerGoro commented Sep 5, 2017

@JJayet It seems that you are using mac frameworks to link iphone builds ("warning: using sysroot for 'MacOSX' but targeting 'iPhone").

All those 3 projects use cmake/make for building C code which may require setting some CXX or sysroot variables. I had to do many fixes for Android armv7/arm64 builds in the same libraries. See #11921

@JJayet
Copy link
Contributor

@JJayet JJayet commented Sep 5, 2017

@MortimerGoro Good to know, I'll look into it, thanks !

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Nov 22, 2017

I'm seen some iOS-specific PR landing lately.

Does libservo compile on iOS now? (I don't care about the /ports/ part)

If not, how far are we?

@tdjastrzebski
Copy link

@tdjastrzebski tdjastrzebski commented May 1, 2019

Hi, what is the status of iOS support? I see iOS is still not mentioned on https://servo.org page.

@blairmacintyre
Copy link

@blairmacintyre blairmacintyre commented May 1, 2019

I too would love to see it on iOS ....

gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…support); r=larsbergstrom

This mostly prevents Gaol/sandboxing to be used during compilation.
There are a number of issues with : `expat-sys`, `servo-freetype-sys`, `fontsan`, `heartbeats-simple-sys`, `mozjs_sys`.

Also modified `components/script/dom/navigatorinfo.rs` in order to add iOS.

```rust
#[cfg(target_os = "ios")]
pub fn Platform() -> DOMString {
    DOMString::from("iOS")
}
```

See here for more informations : servo/servo#18154

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes partially work on #18154

- [X] These changes do not require tests because it deals with the compile toolchain

Source-Repo: https://github.com/servo/servo
Source-Revision: e61a043a567f2d8766b9bbecb88b3a9bfb7808d8

UltraBlame original commit: 3eb8ae58925fd9b1d118400e306eec1666c1f236
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…port); r=jdm

This commit adds an initial iOS User-Agent as discussed here : servo/servo#18154 (comment)

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes (continues to) fix #18154.

<!-- Either: -->
- [X] These changes do not require tests because too little is done

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: bde7135a3be80f8d8a4d15719394eddc97934392

UltraBlame original commit: 0fe6f6ffc4198662402ad81f58d7ff3b2bc55292
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…support); r=larsbergstrom

This mostly prevents Gaol/sandboxing to be used during compilation.
There are a number of issues with : `expat-sys`, `servo-freetype-sys`, `fontsan`, `heartbeats-simple-sys`, `mozjs_sys`.

Also modified `components/script/dom/navigatorinfo.rs` in order to add iOS.

```rust
#[cfg(target_os = "ios")]
pub fn Platform() -> DOMString {
    DOMString::from("iOS")
}
```

See here for more informations : servo/servo#18154

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes partially work on #18154

- [X] These changes do not require tests because it deals with the compile toolchain

Source-Repo: https://github.com/servo/servo
Source-Revision: e61a043a567f2d8766b9bbecb88b3a9bfb7808d8

UltraBlame original commit: 3eb8ae58925fd9b1d118400e306eec1666c1f236
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…port); r=jdm

This commit adds an initial iOS User-Agent as discussed here : servo/servo#18154 (comment)

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes (continues to) fix #18154.

<!-- Either: -->
- [X] These changes do not require tests because too little is done

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: bde7135a3be80f8d8a4d15719394eddc97934392

UltraBlame original commit: 0fe6f6ffc4198662402ad81f58d7ff3b2bc55292
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…support); r=larsbergstrom

This mostly prevents Gaol/sandboxing to be used during compilation.
There are a number of issues with : `expat-sys`, `servo-freetype-sys`, `fontsan`, `heartbeats-simple-sys`, `mozjs_sys`.

Also modified `components/script/dom/navigatorinfo.rs` in order to add iOS.

```rust
#[cfg(target_os = "ios")]
pub fn Platform() -> DOMString {
    DOMString::from("iOS")
}
```

See here for more informations : servo/servo#18154

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes partially work on #18154

- [X] These changes do not require tests because it deals with the compile toolchain

Source-Repo: https://github.com/servo/servo
Source-Revision: e61a043a567f2d8766b9bbecb88b3a9bfb7808d8

UltraBlame original commit: 3eb8ae58925fd9b1d118400e306eec1666c1f236
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…port); r=jdm

This commit adds an initial iOS User-Agent as discussed here : servo/servo#18154 (comment)

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes (continues to) fix #18154.

<!-- Either: -->
- [X] These changes do not require tests because too little is done

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: bde7135a3be80f8d8a4d15719394eddc97934392

UltraBlame original commit: 0fe6f6ffc4198662402ad81f58d7ff3b2bc55292
@tommyZZM
Copy link

@tommyZZM tommyZZM commented Apr 23, 2020

any update on this issue?
I too would love to see it on iOS too

@jdm
Copy link
Member

@jdm jdm commented Apr 23, 2020

Nobody is working in this.

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

Successfully merging a pull request may close this issue.

9 participants
You can’t perform that action at this time.