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

link with "libssp" on *-sun-solaris systems #70682

Closed
wants to merge 1 commit into from

Conversation

jclulow
Copy link
Contributor

@jclulow jclulow commented Apr 2, 2020

LLVM will insert calls to the stack protector functions
"__stack_chk_fail" and "__stack_chk_guard" into code in native object
files. Some platforms include these symbols directly in libc, but at
least historically these have been provided in libssp.so on illumos and
Solaris systems. Include "-lssp" in the arguments to the linker when
building for those targets.

LLVM will insert calls to the stack protector functions
"__stack_chk_fail" and "__stack_chk_guard" into code in native object
files.  Some platforms include these symbols directly in libc, but at
least historically these have been provided in libssp.so on illumos and
Solaris systems.  Include "-lssp" in the arguments to the linker when
building for those targets.
@rust-highfive
Copy link
Collaborator

r? @eddyb

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 2, 2020
@eddyb
Copy link
Member

eddyb commented Apr 2, 2020

r? @nagisa

@rust-highfive rust-highfive assigned nagisa and unassigned eddyb Apr 2, 2020
@nagisa
Copy link
Member

nagisa commented Apr 4, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Apr 4, 2020

📌 Commit d730bf9 has been approved by nagisa

@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 Apr 4, 2020
@bors
Copy link
Contributor

bors commented Apr 4, 2020

⌛ Testing commit d730bf9 with merge eb69fe40a5a55193acce3c5485194228b2355a2f...

@bors
Copy link
Contributor

bors commented Apr 4, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 4, 2020
@jclulow
Copy link
Contributor Author

jclulow commented Apr 6, 2020

Hi folks. I'm not really sure what to do about this failure from CI.

[TIMING] Tidy -- 18.210
Build completed successfully in 0:00:41
+ /scripts/validate-toolstate.sh
Cloning into 'rust-toolstate'...
Traceback (most recent call last):
  File "../../src/tools/publish_toolstate.py", line 305, in <module>
    cur_datetime
  File "../../src/tools/publish_toolstate.py", line 205, in update_latest
    maintainers = ' '.join('@'+name for name in MAINTAINERS[tool])
KeyError: u'rustc-dev-guide'

It looks like at least some of the job(s) were manually cancelled by @alexcrichton.

@nagisa
Copy link
Member

nagisa commented Apr 6, 2020

@bors retry

@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 Apr 6, 2020
Centril added a commit to Centril/rust that referenced this pull request Apr 7, 2020
link with "libssp" on *-sun-solaris systems

LLVM will insert calls to the stack protector functions
"__stack_chk_fail" and "__stack_chk_guard" into code in native object
files.  Some platforms include these symbols directly in libc, but at
least historically these have been provided in libssp.so on illumos and
Solaris systems.  Include "-lssp" in the arguments to the linker when
building for those targets.
@mati865
Copy link
Contributor

mati865 commented Apr 7, 2020

Failed in dist-various-2:

error: linking with `sparcv9-sun-solaris2.10-gcc` failed: exit code: 1
  |
  = note: "sparcv9-sun-solaris2.10-gcc" "-m64" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/sparcv9-sun-solaris/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/deps/std-97afe19442433c88.std.69wtczm7-cgu.0.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/deps/libstd-97afe19442433c88.so" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/deps/std-97afe19442433c88.1dqmz04035xn56n6.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/deps/std-97afe19442433c88.1jec7r2ycgo6k2nz.rcgu.o" "-Wl,-zignore" "-nodefaultlibs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/build/compiler_builtins-f13cc3935cdb654c/out" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/sparcv9-sun-solaris/release/build/backtrace-sys-7b2e57d77ee6ec45/out" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/sparcv9-sun-solaris/lib" "-lsocket" "-lposix4" "-lpthread" "-lresolv" "-Wl,-Bstatic" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/libpanic_unwind-e0de6c145bfdda23.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/libhashbrown-841dc3088a59ec36.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/librustc_std_workspace_alloc-701f9522cf2dfdee.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/libbacktrace-4b6ca5209d18d7dd.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/libbacktrace_sys-785846d862396780.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/librustc_demangle-3d3c654b0022f0cb.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/libunwind-aee56d39e9b8bd80.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/libcfg_if-026debd6aa851d69.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/liblibc-5139e68ffd4d326d.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/liballoc-7f817a399916f914.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/librustc_std_workspace_core-69c71deb0a4e5b45.rlib" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "/tmp/rustcTCkQwu/libcore-f07dfebeb374ffb1.rlib" "-Wl,--no-whole-archive" "/tmp/rustcTCkQwu/libcompiler_builtins-f0dc553bb86841df.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-shared" "-Wl,-rpath,$ORIGIN/../lib" "-lssp"
  = note: /usr/local/lib/gcc/sparcv9-sun-solaris2.10/6.4.0/../../../../sparcv9-sun-solaris2.10/bin/ld: warning: -z ignore ignored.
          /usr/local/lib/gcc/sparcv9-sun-solaris2.10/6.4.0/../../../../sparcv9-sun-solaris2.10/bin/ld: cannot find -lssp
          collect2: error: ld returned 1 exit status

@bors
Copy link
Contributor

bors commented Apr 7, 2020

⌛ Testing commit d730bf9 with merge c577a8fdb1ff4046f0d8be5d05da15b99c621411...

@bors
Copy link
Contributor

bors commented Apr 7, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 7, 2020
@jclulow
Copy link
Contributor Author

jclulow commented Apr 7, 2020

OK, I've had a look at the contents of the illumos/Solaris sysroot in dist-various-2 and it's unfortunately missing libssp.so.0.0.0 on both platforms. I'll push ahead with creating a proper dist-x86_64-sun-solaris image first, with a more complete sysroot that can perform full dist builds, then circle back here.

Apologies for the trouble!

@mati865
Copy link
Contributor

mati865 commented Apr 8, 2020

@jclulow you should discuss that with infra first. CI has limited capacity and adding new builder is rarely accepted.

@bors
Copy link
Contributor

bors commented Apr 15, 2020

☔ The latest upstream changes (presumably #71162) made this pull request unmergeable. Please resolve the merge conflicts.

@jclulow
Copy link
Contributor Author

jclulow commented Apr 16, 2020

@pfmooney and I have decided to focus our effort here entirely on the new illumos triple, which has now integrated as #71145 and which includes this functionality for that platform.

@jclulow jclulow closed this Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants