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

need to test with more OSX versions #17269

Closed
aturon opened this issue Sep 15, 2014 · 13 comments
Closed

need to test with more OSX versions #17269

aturon opened this issue Sep 15, 2014 · 13 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-macos Operating system: macOS P-low Low priority

Comments

@aturon
Copy link
Member

aturon commented Sep 15, 2014

Recent changes landed that broke Rust on Mac OS 10.9 (Mavericks) and above, see #17214

The problem is that the linker is being passed an argument that works for gcc, but that clang rejects. (Mac OS moved wholesale to clang in 10.9, it appears.)

Unfortunately, this breakage wasn't caught by bors. Apparently the testing infrastructure is running an older version of Mac OS and therefor using gcc rather than clang.

To avoid surprise Mac OS breakage in the future, we should make sure to test against clang before landing PRs.

cc @brson @kballard @pnkfelix

@aturon aturon added A-testsuite Area: The testsuite used to check the correctness of rustc A-infrastructure labels Sep 15, 2014
@alexcrichton
Copy link
Member

Note that we do indeed build with clang on all the OSX builders, the gcc version is ancient (4.2) and wouldn't build C++11-required LLVM I believe. That being said, it looks like newer versions of clang made this an error as opposed to an warning:

$ ssh rust-mac6.corp.mtv2.mozilla.com clang -fno-use-linker-plugin foo.c -c
clang: warning: argument unused during compilation: '-fno-use-linker-plugin'

@aturon
Copy link
Member Author

aturon commented Sep 15, 2014

@alexcrichton Thanks. (The gcc/clang thing was just some speculation floating around.)

That being the case, is there anything actionable here?

@alexcrichton
Copy link
Member

We could probably benefit from a builder from all OSX versions. I believe we currently only test on 10.7 and 10.8, but we could add a 10.9 builder and make sure they stay up-to-date. Either that or we could test against all Xcode versions which may be the more relevant version in this case.

@alexcrichton alexcrichton changed the title need to test with clang on Mac OS need to test with more OSX versions Sep 15, 2014
@alexcrichton
Copy link
Member

(tweaked the title a bit)

@lilyball
Copy link
Contributor

Xcode is the more important bit, that's what controls e.g. whether the system actually has GCC installed. Although more recent versions of Xcode do tend to drop support for older versions of the OS (I'm not sure offhand what the OS support is for the most recent stable Xcode).

As soon as it's feasible to do so, it would be good to test on OS X 10.10 though (it's still in beta, which is why I'm not saying it should be tested now, although it certainly could be). This is primarily because it appears that 10.10 has somehow changed the default LDPATH, which causes issues when trying to link against third-party libraries that live in /usr/local/lib (because I can't pass -L /usr/local/lib to rustc or it breaks when trying to find its own libraries as now it finds duplicates). This is documented in #13733.

@brson brson mentioned this issue Sep 17, 2014
65 tasks
@brson
Copy link
Contributor

brson commented Sep 25, 2014

I doubt it's possible but if multiple xcode's can be installed in parallel that would make this easier.

@ghost
Copy link

ghost commented Sep 26, 2014

Multiple versions of xcode can be installed and toggled using xcode-select.

@steveklabnik
Copy link
Member

Triage: no change here so far.

@pnkfelix
Copy link
Member

pnkfelix commented Feb 9, 2016

@freebroccolo doesn't xcode-select change the default xcode system-wide? I had inferred that what brson wanted was to be able to switch in a local manner. ..

(Or maybe it doesn't matter; I don't know enough about how well our build infrastructure is virtualized for Mac hosts)

@brson
Copy link
Contributor

brson commented Feb 11, 2016

changing xcode system wide would be sufficient if we limited build concurrency to 1

@ghost
Copy link

ghost commented Feb 11, 2016

@pnkfelix yes, as far as I remember it does. There may be another way to switch versions nicely that isn't system wide in this fashion but I don't know of it.

@ranma42
Copy link
Contributor

ranma42 commented Feb 12, 2016

The manpage of xcode-select suggests an alternative to xcode-select --switch:

To set the path without superuser permissions or only for the current shell session, use the DEVELOPER_DIR environment variable instead

@brson brson added the P-low Low priority label Aug 22, 2016
@alexcrichton
Copy link
Member

Will make a new metabug around this soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-macos Operating system: macOS P-low Low priority
Projects
None yet
Development

No branches or pull requests

8 participants