Skip to content

Windows builds use an old version of GCC  #8598

Closed
@vadimcn

Description

@vadimcn
Contributor

Rust wiki states that on Windows an old version of GCC must be used because of incompatibility with then-current LLVM. This causes problems for Windows users who run on a fresh mingw installation: #5878, #5712.

There had been several LLVM upgrades since then and apparently the incompatibility issue got fixed somewhere along the way: I was able to build Rust with GCC 4.7.2 on 64-bit Windows machine without apparent problems. Well, I had to copy old libgcc_s_dw2-1.dll and libstdc++-6.dll into stage0\bin to make stage1 compilation work, but other than that everything had worked fine.

Activity

adrientetar

adrientetar commented on Aug 24, 2013

@adrientetar
Contributor

I was able to build Rust with GCC 4.7 on Linux Mint 15 x86-64 for the record without having to do anything particular.

klutzy

klutzy commented on Sep 16, 2013

@klutzy
Contributor

#9205 blocks gcc 4.8 use, although it seems not critical. make succeeds, but make check-fast fails.
Tests expected to fail (as reported here):

  • extern-pass-TwoU64s-ref
  • extern-return-TwoU64s
  • struct-return

Also recent mingw has some problems: 1 2

klutzy

klutzy commented on Sep 16, 2013

@klutzy
Contributor

It would be good if we know latest working gcc version.
We currently recommend 4.5. I've used 4.6 for several months and had no problem.
4.8 is known to fail tests. I have no experience of 4.7.
So: @vadimcn @adridu59 did you run make only? or did you also run make check-fast and it succeeded?

klutzy

klutzy commented on Sep 16, 2013

@klutzy
Contributor

yet another w32api issue (4.0.0-1) from irc: winbase.h has the following lines

#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
...
#if (NTDDK_VERSION >= NTDDI_WIN2KSP2)
#define FILE_FLAG_FIRST_PIPE_INSTANCE   524288
#endif
...
#endif

but NTDDK_VERSION is not defined elsewhere. gcc treats the comparison as false, so the constant is not defined.

My old w32api-3.17-2 contains:

#if (_WIN32_WINNT >= 0x0500)
#define FILE_FLAG_FIRST_PIPE_INSTANCE 524288
#endif

I guess NTDDK_VERSION is a typo of NTDDI_VERSION.

klutzy

klutzy commented on Sep 16, 2013

@klutzy
Contributor

@aarondandy documented detailed instruction for gcc 4.8 on wiki. Hooray!

adrientetar

adrientetar commented on Sep 16, 2013

@adrientetar
Contributor

@klutzy I ran make only.

pnkfelix

pnkfelix commented on Nov 7, 2013

@pnkfelix
Member

We might currently work with gcc 4.8. But we nonetheless must update our bots to test against the appropriate version of gcc on Windows. Accepted for P-high.

zokier

zokier commented on Nov 12, 2013

@zokier

I just attempted to build rust on fresh install of MinGW with GCC 4.8.1. make check fails 8 tests:

[run-pass] run-pass/extern-pass-TwoU64s-ref.rs
[run-pass] run-pass/extern-pass-TwoU64s.rs
[run-pass] run-pass/extern-return-TwoU64s.rs
[run-pass] run-pass/glob-std.rs
[run-pass] run-pass/linkage-visibility.rs
[run-pass] run-pass/signal-exit-status.rs
[run-pass] run-pass/struct-return.rs
[run-pass] run-pass/tempfile.rs

Full log of failures as gist

vadimcn

vadimcn commented on Nov 12, 2013

@vadimcn
ContributorAuthor

That's expected. On Windows one should build the "check-fast" target, i.e. "make check-fast".

klutzy

klutzy commented on Nov 13, 2013

@klutzy
Contributor

@zokier @vadimcn I think make check should work anyway: #10452

vadimcn

vadimcn commented on Apr 20, 2014

@vadimcn
ContributorAuthor

1 remaining item

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: WindowsP-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pnkfelix@zokier@adrientetar@klutzy@vadimcn

        Issue actions

          Windows builds use an old version of GCC · Issue #8598 · rust-lang/rust