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

Rollup of 8 pull requests #47572

Closed
wants to merge 26 commits into from
Closed

Conversation

hellow554 and others added 26 commits December 22, 2017 06:42
removed styling of dt tages, which would make them look like keys and
added <kbd> tag inside of dt tag.
Added css style for kbd and removed some stylings for dt
To workaround a bug in glibc <= 2.26 lookup_host() calls res_init()
based on the glibc version detected at runtime. While this avoids
calling res_init() on platforms where it's not required we will still
end up linking against the symbol.

This causes an issue on macOS where res_init() is implemented in a
separate library (libresolv.9.dylib) from the main libc. While this is
harmless for standalone programs it becomes a problem if Rust code is
statically linked against another program. If the linked program doesn't
already specify -lresolv it will cause the link to fail. This is
captured in issue rust-lang#46797

Fix this by hooking in to the glibc workaround in `cvt_gai` and only
activating it for the "gnu" environment on Unix This should include all
glibc platforms while excluding musl, windows-gnu, macOS, FreeBSD, etc.

This has the side benefit of removing the #[cfg] in sys_common; only
unix.rs has code related to the workaround now.
We intended to do this quite a while ago but it snuck through.
…laumeGomez

add kbd style tag to main.css in rustdoc

Added css style for kbd tags so they actually look like keys.
Result preview and discussion was going on in rust-lang#46900 .
…nix, r=alexcrichton

Only link res_init() on GNU/*nix

To workaround a bug in glibc <= 2.26 lookup_host() calls res_init() based on the glibc version detected at runtime. While this avoids calling res_init() on platforms where it's not required we will still end up linking against the symbol.

This causes an issue on macOS where res_init() is implemented in a separate library (libresolv.9.dylib) from the main libc. While this is harmless for standalone programs it becomes a problem if Rust code is statically linked against another program. If the linked program doesn't already specify -lresolv it will cause the link to fail. This is captured in issue rust-lang#46797

Fix this by hooking in to the glibc workaround in `cvt_gai` and only activating it for the "gnu" environment on Unix This should include all glibc platforms while excluding musl, windows-gnu, macOS, FreeBSD, etc.

This has the side benefit of removing the #[cfg] in sys_common; only unix.rs has code related to the workaround now.

Before this commit:
```shell
> cat main.rs
use std::net::ToSocketAddrs;

#[no_mangle]
pub extern "C" fn resolve_test() -> () {
    let addr_list = ("google.com.au", 0).to_socket_addrs().unwrap();
    println!("{:?}", addr_list);
}
> rustc --crate-type=staticlib main.rs
> clang libmain.a test.c -o combined
Undefined symbols for architecture x86_64:
  "_res_9_init", referenced from:
      std::net::lookup_host::h93c17fe9ad38464a in libmain.a(std-826c8d3b356e180c.std0.rcgu.o)
ld: symbol(s) not found for architecture x86_64
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
```

Afterwards:
```shell
> rustc --crate-type=staticlib main.rs
> clang libmain.a test.c -o combined
> ./combined
IntoIter([V4(172.217.25.131:0)])
```

Fixes  rust-lang#46797
…eveklabnik

add Rust By Example to the bookshelf

cc rust-lang#46194

With rust-lang#46196 freshly merged, we should add a link to the main docs distribution so people can find it! We discussed this at the docs team meeting today and decided to go ahead with adding it to the bookshelf.
Deprecate std::net::lookup_host

We intended to do this quite a while ago but it snuck through.

r? @alexcrichton
Add E0659 for ambiguous names

Still on the tracks of the "no error without error code" road.
add target/ to ignored tidy dirs

Sometimes you get a target directory from running cargo in the rust repo (the root is `src/`), and it contains generated files. Just whitelist it since it causes tidy to spew warnings uncontrollably.
Fix the "Github - About Pull Requests" link in CONTRIBUTING.md

Previously the text that is supposed to link to the Github Pull Requests page, instead linked to the same file (CONTRIBUTING.md).
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=1

@bors
Copy link
Contributor

bors commented Jan 19, 2018

📌 Commit ce797d5 has been approved by GuillaumeGomez

@petrochenkov petrochenkov added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 19, 2018
@bors
Copy link
Contributor

bors commented Jan 19, 2018

⌛ Testing commit ce797d5 with merge a7b8622...

bors added a commit that referenced this pull request Jan 19, 2018
Rollup of 8 pull requests

- Successful merges: #46938, #47334, #47420, #47508, #47510, #47512, #47535, #47559
- Failed merges:
@bors
Copy link
Contributor

bors commented Jan 19, 2018

💔 Test failed - status-travis

@estebank
Copy link
Contributor

estebank commented Jan 19, 2018

https://travis-ci.org/rust-lang/rust/jobs/330886192#L7274 👀

[01:33:13] test cargo_fail_with_no_stderr has been running for over 60 seconds

No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.

@GuillaumeGomez
Copy link
Member Author

Let's retry I suppose...

@bors: retry

@bors
Copy link
Contributor

bors commented Jan 19, 2018

⌛ Testing commit ce797d5 with merge abe7ad89c834d6952cefaa3171e3548cfbbbdb6e...

@bors
Copy link
Contributor

bors commented Jan 20, 2018

💔 Test failed - status-travis

@estebank
Copy link
Contributor

same error

@bors retry

@alexcrichton
Copy link
Member

@bors: r-

this is a legitimate error:

$ echo -n foo > foo.rs
$ ./bin/rustc foo.rs
# hangs forever

@GuillaumeGomez
Copy link
Member Author

Then I close this PR.

@GuillaumeGomez GuillaumeGomez deleted the rollup branch January 20, 2018 13:19
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.