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 TCP FastOpen support for macOS #1635

Merged
merged 1 commit into from
Feb 23, 2020
Merged

Add TCP FastOpen support for macOS #1635

merged 1 commit into from
Feb 23, 2020

Conversation

zonyitoo
Copy link
Contributor

fix #1632

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@zonyitoo
Copy link
Contributor Author

zonyitoo commented Jan 2, 2020

@gnzlbg Hello, could you review this PR?

Copy link
Contributor

@gnzlbg gnzlbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Once CI is fixed I'll merge it.

@gnzlbg
Copy link
Contributor

gnzlbg commented Jan 2, 2020

@mati865 @pietroalbini there are many linker failures across the board of the form that are unrelated to this PR:

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.1hrsp886jehe6mdx.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.1ouetbkp3jjfhh6r.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.1ssww7ta5gblmjyr.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.1wvs1mat0k1jmlnr.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.26fytuusgl87tw63.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.2d0i2oja4i59c8oh.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.2jigx46h41ggbo55.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.2r2fv9qpzrw0s7gh.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.2wcrd0gq8m7eh982.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.2xa7qshjpomh3ts7.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.31pxlxw0fjqhm0pg.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.37mjsvnuqejb34tb.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.398n1ac9a6g2l6mt.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.3co2mfk5el1mjqjd.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.3d17d7jg7smpu7ad.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.3ezfcovkx4ijk7m3.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.3hr6adqr8dmmonlo.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.41swc9is3t913lxd.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.46llah9hcnx2zwgu.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.4g5zeiqv08xcngwe.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.4j00w9sqr4uvy4zv.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.4jwz2e02ltuj5wcn.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.4no4j0q9dyfdgirf.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.4oi9wcbvef3k2gbj.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.4yqooiuh8050bntv.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.5ecmxiouksc9p16v.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.5gic5rctwbp57dke.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.8loaqrsjy075q1l.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.fppses3d1rky3g5.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.gb2ijbqts8tapyg.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.xed9cz7mimshle4.rcgu.o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.zgga9h93wntxhsz.rcgu.o" "-o" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509" "/checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.rvlc6xnm1atdbpn.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/checkout/target/mips-unknown-linux-gnu/debug/deps" "-L" "/checkout/target/debug/deps" "-L" "/checkout/target/mips-unknown-linux-gnu/debug/build/libc-test-71fc6b33766ee9ae/out" "-L" "/checkout/target/mips-unknown-linux-gnu/debug/build/libc-test-71fc6b33766ee9ae/out" "-L" "/checkout/target/mips-unknown-linux-gnu/debug/build/libc-test-71fc6b33766ee9ae/out" "-L" "/checkout/target/mips-unknown-linux-gnu/debug/build/libc-test-71fc6b33766ee9ae/out" "-L" "/checkout/target/mips-unknown-linux-gnu/debug/build/libc-test-71fc6b33766ee9ae/out" "-L" "/checkout/target/mips-unknown-linux-gnu/debug/build/libc-test-71fc6b33766ee9ae/out" "-L" "/checkout/target/mips-unknown-linux-gnu/debug/build/libc-test-71fc6b33766ee9ae/out" "-L" "/checkout/target/mips-unknown-linux-gnu/debug/build/libc-test-71fc6b33766ee9ae/out" "-L" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-lcmsg" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lerrqueue" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lmain" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-llinux_strerror_r" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-llinux_fcntl" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-llinux_termios" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-llinux_ipv6" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-llinux_elf" "-Wl,--no-whole-archive" "/checkout/target/mips-unknown-linux-gnu/debug/deps/liblibc-91ebc08b121ef9ca.rlib" "-Wl,--start-group" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/libstd-861fd224266aa746.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/libpanic_unwind-799cf42449707bee.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/libhashbrown-b47cb6cf2bb91e6c.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/librustc_std_workspace_alloc-db287287628d70c2.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/libbacktrace-900a287ff1adfa65.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/libbacktrace_sys-0ae24a4b5240b9b6.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/librustc_demangle-06360ac9f1275b3d.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/libunwind-04674fd6529e87f1.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/libcfg_if-16719bfe5ee8d6c9.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/liblibc-a5dc8e1e92544cc6.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/liballoc-ae88b16fdea07518.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/librustc_std_workspace_core-2fa8c930ecf64b64.rlib" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/libcore-90f057afb960b3c3.rlib" "-Wl,--end-group" "/rust/lib/rustlib/mips-unknown-linux-gnu/lib/libcompiler_builtins-d82a8b0dd996842c.rlib" "-Wl,-Bdynamic" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: relocations in generic ELF (EM: 8)
          /usr/bin/ld: /checkout/target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-c9f2496a738ae509.15npztk0ht4i6q45.rcgu.o: error adding symbols: file in wrong format
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

Do these look familiar ?

@mati865
Copy link
Contributor

mati865 commented Jan 2, 2020

I think there were changes to cc crate regarding relocations not long ago but I'll have to verify it.

@gnzlbg
Copy link
Contributor

gnzlbg commented Jan 2, 2020

This one? Looks potentially related: rust-lang/cc-rs#461 cc @alexcrichton

@mati865
Copy link
Contributor

mati865 commented Jan 2, 2020

It's not yet published so it was something else, Docker images shouldn't have changed AFAIK.

@mati865
Copy link
Contributor

mati865 commented Jan 2, 2020

Wait, /usr/bin/ld is not the proper linker for cross compiled targets. Maybe some cargo change broke it?

@mati865
Copy link
Contributor

mati865 commented Jan 2, 2020

I'll cc @ehuss ^

Possibly cargo or cc change made this no longer work:

ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \

@ehuss
Copy link
Contributor

ehuss commented Jan 2, 2020

Hm, sorry, that was an unexpected regression. I'll work on a fix today, though it may take until sometime next week to get into nightly.

@gnzlbg
Copy link
Contributor

gnzlbg commented Jan 2, 2020

@ehuss do you know which cargo PR caused it? I skimmed through the closed PR queue and couldn't find anything that ringed a bell.

@mati865
Copy link
Contributor

mati865 commented Jan 2, 2020

I think that is rust-lang/cargo#7649 and that's why I pointed to cargo (I knew about this PR before).

@ehuss
Copy link
Contributor

ehuss commented Jan 2, 2020

Fix has been posted at rust-lang/cargo#7763.

@ehuss
Copy link
Contributor

ehuss commented Jan 8, 2020

The fix should be in the latest nightly (2020-01-08).

@zonyitoo
Copy link
Contributor Author

zonyitoo commented Jan 8, 2020

@gnzlbg Could you trigger rebuild?

@zonyitoo
Copy link
Contributor Author

@gnzlbg Hello, when could this PR be merged?

@JohnTitor
Copy link
Member

Hey @zonyitoo, could you rebase to make sure things?

@JohnTitor
Copy link
Member

r? @JohnTitor

@rust-highfive rust-highfive assigned JohnTitor and unassigned gnzlbg Feb 19, 2020
@zonyitoo

This comment has been minimized.

@JohnTitor
Copy link
Member

Style check complains about line length, could you fix it?

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JohnTitor JohnTitor merged commit b030ee4 into rust-lang:master Feb 23, 2020
database64128 added a commit to database64128/libc that referenced this pull request Mar 3, 2023
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

Successfully merging this pull request may close these issues.

Add TCP FastOpen support for macOS
6 participants