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

Add support for x86_64-sun-solaris target #935

Open
eeyun opened this issue Aug 16, 2018 · 10 comments · May be fixed by #2544
Open

Add support for x86_64-sun-solaris target #935

eeyun opened this issue Aug 16, 2018 · 10 comments · May be fixed by #2544

Comments

@eeyun
Copy link

eeyun commented Aug 16, 2018

Now that illumos/solaris users are going to have an actively supported rustc/cargo binary it might be nice for this crate to support it's bindings.

As a side note - I'm happy to contribute a PR that adds support for illumos if the maintainers feel like they would accept a PR to add solaris support but I didn't want to start in on the effort if adding a new platform is not something y'all are interested in!

@asomers
Copy link
Member

asomers commented Aug 16, 2018

Are there any users who need Nix on Illumos? If so, I would accept a PR for Illumos support.

@Susurrus
Copy link
Contributor

We don't compile-test on those platforms now I don't think. And for new platforms to be "added" I see that as a requirement. If we can run tests in a VM that's even better. I don't want to add support and fix things and then have it break 1 PR later because we don't have at least compilation testing working.

And what are the target tuples for the platforms you'd want to add. I assume that these OSes are treated as identical from the Rust compiler's perspective.

@eeyun
Copy link
Author

eeyun commented Aug 17, 2018

As far as any nix users who need it - that would be me! Though currently only for a hobby effort.

Yep all of "solaris" is treated exactly the same by the compiler. I've only been working with illumos in OpenIndiana and OmniOS but some random attempts with Solaris 11 seem to also work fairly identically, I have no interest personally in SPARC or the like. My initial "need" is just around the "x86_64-sun-solaris" target.

RE Testing: Running an Illumos VM should be totally possible on any virtualization platform, basically, a staged image would need to get created. I'll admit I haven't looked through all of the docs in the repo so I don't know what your testing strategies are as of today.

@eeyun
Copy link
Author

eeyun commented Aug 17, 2018

As a side note it would likely be a non-trivial effort. The first step actually starts with exposing a significant number of libc consts in the libc crate first (or really simultaneously). This feature request can't really even be completed until those changes were to get merged.

@asomers
Copy link
Member

asomers commented Aug 17, 2018

Yeah, libc definitely comes first. After that, I would accept a PR to add Illumos support as long as we could compile-test it on Travis in CI. As with NetBSD, I wouldn't insist on running the tests.

@Susurrus
Copy link
Contributor

Yeah, I'd expect that libc will need an absurd amount of cleanup. What I'd suggest is the following:

  • Get CI working for x86_64-sun-solaris for libc as a can-fail target
  • Clean up libc so that it compiles properly
  • Change the x86_64-sun-solaris target to be cant-fail

The above can be done in parallel with the same process done for nix

@Susurrus Susurrus changed the title Illumos/Solaris Bindings Add support for x86_64-sun-solaris target Nov 25, 2018
@Susurrus Susurrus changed the title Add support for x86_64-sun-solaris target Add support for x86_64-sun-solaris target Nov 25, 2018
@priyadarshan
Copy link

priyadarshan commented Jun 30, 2020

Still very much need support for x86_64-sun-solaris target.

papertigers added missing pieces in libc needed by nix

I have also hacked nix to a state where it can compile and I was able to successfully build fd-find on illumos. It seems to function correctly and all of its tests pass via cargo test.

@asomers
Copy link
Member

asomers commented Jun 30, 2020

It looks like cross has added supported for x86_64-sun-solaris (build only), which is cool. I think we can add that target to Nix. @priyadarshan care to submit a pr?

@priyadarshan
Copy link

Thanks for update. Pinging @papertigers who has been working on libc and nix crate changes. (It is also thanks to him that OmniOS can offer fid-find.)

@jasonbking
Copy link
Contributor

I have most of the work done. It required some updates to the libc crate for the CMSG_ bits that have been integrated, though a new version of the libc crate hasn't been cut yet. It's currently here: https://github.com/jasonbking/nix/tree/illumos but still needs openpty and forkpty -- they don't exist in libc on illumos, though @jclulow said he was going to try to take a shot at adding an implementation to the libc crate.

So the work is progressing, but probably not quite ready yet..

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

Successfully merging a pull request may close this issue.

5 participants