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

How to build on Mac and other platforms? #44

Open
corliss opened this issue Dec 23, 2017 · 4 comments
Open

How to build on Mac and other platforms? #44

corliss opened this issue Dec 23, 2017 · 4 comments

Comments

@corliss
Copy link

corliss commented Dec 23, 2017

Hello, the README has instructions for building libservobridge.so on Android, but not for the other platforms. I'm trying to build for Mac, iOS and UWP but don't know how. Would really appreciate some information about this - the README is the perfect place for it.

Just FYI, I've taken a couple of days off to get into this in my spare (vacation) time so a timely answer would really help :)

Thanks!

@corliss
Copy link
Author

corliss commented Dec 23, 2017

I was able to get the Mac version to build by:

  • Installing cmake with brew install cmake
  • Installing openssl with brew install openssl
  • Installing yasm with brew install yasm
  • Building the Mac version of libservobridge with cargo build --target x86_64-apple-darwin. This took around 20 minutes to complete
  • Creating a symlink from rust/target/x86_64-apple-darwin/debug/libservobridge.dylib to xamarin/Servofocus.Mac/lib/libservobridge.dylib
  • Building and running the ServoFocus.Mac app in Visual Studio for Mac.

At this point, the mac app runs, and the initial screen appears. However when I enter a URL and press enter, nothing happens. I've verified that _servo.LoadUrl(url) is getting called in MainViewModel.cs. Will continue to dig further, but do you have any idea what the issue might be?

@mfkl
Copy link
Collaborator

mfkl commented Dec 23, 2017

Hi,

I'm trying to build for Mac, iOS and UWP but don't know how.

iOS and UWP are not currently supported.

However when I enter a URL and press enter, nothing happens. Will continue to dig further, but do you have any idea what the issue might be?

Any logs from servo? Some webpages can have issues displaying, try duckduckgo or servo.org.

@corliss
Copy link
Author

corliss commented Dec 24, 2017

@mfkl, here's the stderr.log. There seem to be a few relevant errors. Any advice?
Thanks!

thread 'ResourceManager' panicked at 'Could not find Servo HSTS preload file: Error { repr: Os { code: 2, message: "No such file or directory" } }', src/libcore/result.rs:906:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread 'Constellation' panicked at 'assertion failed: mach_sys::mach_port_mod_refs(mach_task_self(), self.port,
                             MACH_PORT_RIGHT_SEND, 1) == KERN_SUCCESS', /Users/corliss/.cargo/registry/src/github.com-1ecc6299db9ec823/ipc-channel-0.9.0/src/platform/macos/mod.rs:336:12
thread 'StorageManager' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Error { repr: Custom(Custom { kind: ConnectionReset, error: StringError("No senders exist for this port.") }) })', src/libcore/result.rs:906:4

@paulrouget
Copy link
Owner

Hmm, yeah the issue is that, for now, Servo will looks for its resources directory in /tmp/resources. Just copy https://github.com/servo/servo/tree/master/resources in /tmp.

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

3 participants