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 an alias for x86_64-sun-solaris target tuple #61761

Merged
merged 1 commit into from
Jun 13, 2019

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Jun 12, 2019

Closes #40531

r? @varkor

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 12, 2019
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 12, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:2109f981:start=1560317311741936049,finish=1560317312588596767,duration=846660718
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:07:22]    Compiling synstructure v0.10.2
[00:07:35]    Compiling rustc_macros v0.1.0 (/checkout/src/librustc_macros)
[00:07:42]    Compiling syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
[00:07:46]    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
[00:07:46] error[E0428]: the name `x86_64_sun_solaris` is defined multiple times
[00:07:46]     |
[00:07:46] 270 | / macro_rules! supported_targets {
[00:07:46] 270 | / macro_rules! supported_targets {
[00:07:46] 271 | |     ( $(($triple:expr, $module:ident),)+ ) => (
[00:07:46] 272 | |         $(mod $module;)*
[00:07:46]     | |           |
[00:07:46]     | |           |
[00:07:46]     | |           `x86_64_sun_solaris` redefined here
[00:07:46]     | |           previous definition of the module `x86_64_sun_solaris` here
[00:07:46] ...   |
[00:07:46] 327 | |     )
[00:07:46] 328 | | }
[00:07:46]     | |_- in this expansion of `supported_targets!`
[00:07:46]     | |_- in this expansion of `supported_targets!`
[00:07:46] 329 | 
[00:07:46] 330 | / supported_targets! {
[00:07:46] 331 | |     ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
[00:07:46] 332 | |     ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
[00:07:46] 333 | |     ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
[00:07:46] ...   |
[00:07:46] 479 | |     ("nvptx64-nvidia-cuda", nvptx64_nvidia_cuda),
[00:07:46]     | |_- in this macro invocation
[00:07:46]     |
[00:07:46]     |
[00:07:46]     = note: `x86_64_sun_solaris` must be defined only once in the type namespace of this module
[00:07:47] error: aborting due to previous error
[00:07:47] 
[00:07:47] For more information about this error, try `rustc --explain E0428`.
[00:07:47] error: Could not compile `rustc_target`.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:024d743c:start=1560318106887894815,finish=1560318107656741062,duration=768846247
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:06:57]    Compiling synstructure v0.10.2
[00:07:10]    Compiling rustc_macros v0.1.0 (/checkout/src/librustc_macros)
[00:07:17]    Compiling syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
[00:07:21]    Compiling rustc_errors v0.0.0 (/checkout/src/librustc_errors)
[00:07:21] error[E0428]: the name `x86_64_sun_solaris` is defined multiple times
[00:07:21]     |
[00:07:21] 270 | / macro_rules! supported_targets {
[00:07:21] 270 | / macro_rules! supported_targets {
[00:07:21] 271 | |     ( $(($triple:expr, $module:ident),)+ ) => (
[00:07:21] 272 | |         $(mod $module;)*
[00:07:21]     | |           |
[00:07:21]     | |           |
[00:07:21]     | |           `x86_64_sun_solaris` redefined here
[00:07:21]     | |           previous definition of the module `x86_64_sun_solaris` here
[00:07:21] ...   |
[00:07:21] 327 | |     )
[00:07:21] 328 | | }
[00:07:21]     | |_- in this expansion of `supported_targets!`
[00:07:21]     | |_- in this expansion of `supported_targets!`
[00:07:21] 329 | 
[00:07:21] 330 | / supported_targets! {
[00:07:21] 331 | |     ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
[00:07:21] 332 | |     ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
[00:07:21] 333 | |     ("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
[00:07:21] ...   |
[00:07:21] 479 | |     ("nvptx64-nvidia-cuda", nvptx64_nvidia_cuda),
[00:07:21]     | |_- in this macro invocation
[00:07:21]     |
[00:07:21]     |
[00:07:21]     = note: `x86_64_sun_solaris` must be defined only once in the type namespace of this module
[00:07:22] error: aborting due to previous error
[00:07:22] 
[00:07:22] For more information about this error, try `rustc --explain E0428`.
[00:07:22] error: Could not compile `rustc_target`.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@tesuji
Copy link
Contributor Author

tesuji commented Jun 12, 2019

@varkor Ready to review!

@varkor
Copy link
Member

varkor commented Jun 12, 2019

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 12, 2019

📌 Commit 7c8644d has been approved by varkor

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 12, 2019
Centril added a commit to Centril/rust that referenced this pull request Jun 12, 2019
Add an alias for x86_64-sun-solaris target tuple

Closes rust-lang#40531

r? @varkor
bors added a commit that referenced this pull request Jun 13, 2019
Rollup of 9 pull requests

Successful merges:

 - #60376 (Stabilize Option::xor)
 - #61398 (Stabilize copy_within)
 - #61629 (Hygienize macros in the standard library)
 - #61675 (Include frame pointer for bare metal RISC-V targets)
 - #61750 (Fix x.py install)
 - #61761 (Add an alias for x86_64-sun-solaris target tuple)
 - #61762 (rustbuild: fix libtest_stamp)
 - #61763 (ci: fix ci stats upload condition)
 - #61776 (Fix typos in error_codes)

Failed merges:

r? @ghost
@bors bors merged commit 7c8644d into rust-lang:master Jun 13, 2019
@tesuji tesuji deleted the target-tuple-solaris branch June 13, 2019 05:24
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 1, 2021
…,Mark-Simulacrum

make x86_64-pc-solaris the default target for x86-64 Solaris

This change makes `x86_64-pc-solaris` the default compilation target for x86-64 Solaris/Illumos (based on [this exchange](rust-lang#68214 (comment)) with `@varkor).`

I tried several ways of doing this (leveraging the alias support added with rust-lang#61761 and improved/fixed with rust-lang#80073) and found out that cross-compilation to the new one is by far the simplest way of doing this. It can be achieved by adding the following arguments: `--build x86_64-sun-solaris --host x86_64-pc-solaris --target x86_64-pc-solaris` and enabling the cross compilation with `PKG_CONFIG_ALLOW_CROSS=1` environment variable.

I also removed alias support altogether - `x86_64-pc-solaris` and `x86_64-sun-solaris` are now two separate targets. The problem with aliases is that even if rust internally knows that two are the same, other tools building with rust don't know that, resulting in build issues like the one with firefox mentioned [here](rust-lang#68214 (comment)). I think that once the dust settles and `x86_64-pc-solaris` becomes the default, `x86_64-sun-solaris` can be removed.

If you agree with the above, I have two subsequent questions:
1. Is there a preferred way to display deprecation warnings when `x86_64-sun-solaris` is passed into the compiler as an argument? I am not sure whether target deprecation was done before.
2. Where would be the best way to document this change for those using rust on Solaris? Without the cross-compilation arguments (used once to build a new version), the build won't work. Should I add it into [RELEASES.md](https://github.com/rust-lang/rust/blob/master/RELEASES.md)?

Thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

target tuples for solaris not quite right
5 participants