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

Support Windows build with Cygwin installation #5526

Closed
thadguidry opened this issue Mar 24, 2013 · 8 comments
Closed

Support Windows build with Cygwin installation #5526

thadguidry opened this issue Mar 24, 2013 · 8 comments

Comments

@thadguidry
Copy link
Contributor

Thad is currently working on documenting and fixing the Windows installation to also support Cygwin (rather than just Msys & MinGW). Ping him for more info or if you want to help.

Cygwin is now recognized on Win 7 & Vista (32 and 64 bit) with the latest commit, but still has build platform issues being addressed in the make files, etc.

@thadguidry
Copy link
Contributor Author

Cygwin does not seem to be the best option for Windows users building Rust. Going to close this issue because of the problems and hurdles I saw when trying to build within Cygwin. It is not a best option for us, after having more discussion with the MingGW folks and looking at other options, including the use of mingw-get.

So back to MinGW, I go...and setting up the Mingw64 toolchain correctly there, since I initially had better luck on MinGW.

@kud1ing
Copy link

kud1ing commented May 7, 2013

Thanks for trying. For future reference: is there a description somewhere that shows how you came to this conclusion?

@thadguidry
Copy link
Contributor Author

It is doable. You just have to insert CYGWIN throughout the make file
scripts, libuv porting, etc. In other words, a lot of work. Llvm parts are
ok however. Feel free to give it a go yourself.
On May 7, 2013 1:49 AM, "kud1ing" notifications@github.com wrote:

Thanks for trying. For future reference: is there a description somewhere
that shows how you came to this conclusion?


Reply to this email directly or view it on GitHubhttps://github.com//issues/5526#issuecomment-17526107
.

@CMCDragonkai
Copy link

Any changed after a year? I would like to keep my Cygwin environment. Perhaps there's a way to make mingw coexist with cygwin?

@tkelman
Copy link

tkelman commented Jul 26, 2014

You can try using the Cygwin-hosted MinGW cross-compilers (e.g. i686-w64-mingw32-gcc). These work well for Julia, which shares several dependencies (LLVM, libuv) with Rust but I can't speak to the Rust-specific parts.

@CMCDragonkai
Copy link

@tkelman cool, do you have an example, or a tutorial?

@tkelman
Copy link

tkelman commented Jul 27, 2014

For libuv or LLVM or anything that uses autotools, you generally only need to say ./configure --host=i686-w64-mingw32 and have the appropriate cross-compiler packages (mingw64-i686-gcc-g++) installed. There are some differences in path handling between Cygwin and MSYS that may trip up Rust's build system, I'm not sure. It would be interesting to find out what breaks though. You might just end up needing to add cygpath -w before some paths, since Cygwin doesn't do the automatic translation from posix-style paths to Windows-style that MSYS does, and MinGW-compiled executables don't understand Cygwin absolute paths.

@viperscape
Copy link

I noticed just having cygwin installed and in my env path is enough for it to glom all rust build commands. To fix I had to remove gcc and ld from cygwin\bin folder. I'm not sure of another way around this, but this worked for me; luckily I don't use gcc from cygwin but have it installed since I like grep and ls on windows.

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

5 participants