<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">
<p style="color: #777777;">
<a href="https://gitlab.rtems.org/thejpster">Jonathan Pallant</a>
<a href="https://gitlab.rtems.org/rtems/docs/rtems-docs/-/issues/32#note_112152">commented</a>:
</p>
<div class="md" style="position: relative; z-index: 1; color: #28272d; word-wrap: break-word;">
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">Hello, SPARC bare-metal target maintainer for rustc here. I only work on this in my free time, so apologies for the delay. It irked me that you were observing an issue that affected only CI builds of the Rust toolchain and not locally build copies, so I quite a bit of time into thinking about it. I've posted what I think is the solution to the Rust Zulip thread that was that opened, but I also wanted to address some points here, for the record.</p>
<blockquote dir="auto" style="font-size: inherit; color: #4c4b51; padding-top: .5rem; padding-bottom: .5rem; padding-left: 1.5rem; --tw-shadow: inset 4px 0 0 0 var(--gray-100, #dcdcde); --tw-shadow-colored: inset 4px 0 0 0 var(--tw-shadow-color); box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow); border-top-width: 0; border-bottom-width: 0; border-right-width: 0; margin: .5rem 0;" align="initial">
<p style="color: inherit; line-height: 1.5; margin: 0;">Meanwhile, I contacted the maintainer of the Rust target <code style='font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0; font-weight: inherit; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; vertical-align: bottom; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>sparc-unknown-none-elf</code> from Ferrous Systems. He has also no immediate idea what happened. Only tier 1 targets are actively tested by the Rust community and guaranteed to work. The SPARC target is tier 3.</p>
</blockquote>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">Yes, correct, although note that <em style="margin-top: 0;">I</em> volunteered to support this target, not my employer.</p>
<blockquote dir="auto" style="font-size: inherit; color: #4c4b51; padding-top: .5rem; padding-bottom: .5rem; padding-left: 1.5rem; --tw-shadow: inset 4px 0 0 0 var(--gray-100, #dcdcde); --tw-shadow-colored: inset 4px 0 0 0 var(--tw-shadow-color); box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow); border-top-width: 0; border-bottom-width: 0; border-right-width: 0; margin: .5rem 0;" align="initial">
<blockquote style="font-size: inherit; color: #4c4b51; padding-top: .5rem; padding-bottom: .5rem; padding-left: 1.5rem; --tw-shadow: inset 4px 0 0 0 var(--gray-100, #dcdcde); --tw-shadow-colored: inset 4px 0 0 0 var(--tw-shadow-color); box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow); border-top-width: 0; border-bottom-width: 0; border-right-width: 0; margin: 0 0 .5rem;">
<p style="color: inherit; line-height: 1.5; margin: 0;">Are there any other builds to do a binary search to narrow down when it broke?
For the nightly builds, I doubt there is any possibility to download old builds for testing.</p>
</blockquote>
</blockquote>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">Every nightly rust toolchain since 1.0 (or maybe before) is available in rustup.</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre data-canonical-lang="console" class="code highlight js-syntax-highlight language-console" v-pre="true" style='display: block; font-size: 14px; color: #28272d; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 16px; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: .25rem; white-space: pre; margin-top: 0; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; vertical-align: bottom; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="console" style="margin-top: 0;"><span class="gp" style="margin-top: 0;">root@f13ef12eb383:/#</span><span class="w"> </span>rustup toolchain <span class="nb">install </span>nightly-2015-05-16</span>
<span id="LC2" class="line" lang="console"><span class="go" style="margin-top: 0;">info: syncing channel updates for 'nightly-2015-05-16-x86_64-unknown-linux-gnu'</span></span>
<span id="LC3" class="line" lang="console"><span class="go" style="margin-top: 0;">info: downloading component 'rust'</span></span>
<span id="LC4" class="line" lang="console"><span class="go" style="margin-top: 0;"> 11.2 MiB / 103.3 MiB ( 11 %) 54.4 KiB/s in 21s ETA: 28m 53s^C</span></span></code></pre>
<copy-code></copy-code>
</div>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">We also have <a href="https://github.com/rust-lang/cargo-bisect-rustc" rel="nofollow noreferrer noopener" target="_blank" style="margin-top: 0;">https://github.com/rust-lang/cargo-bisect-rustc</a>, which will automatically binary chop through nightly releases and find which release, and which commit within that release, broke your build.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">Anyway, having looked into it I'm pretty sure the answer is that your application ran out of stack.</p>
<p dir="auto" style="color: #28272d; margin: 0 0 16px;" align="initial">You don't observe this with a locally built compiler because you are electing to pre-build the libcore, so it is built with the release profile (and hence <code style='font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0; font-weight: inherit; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; vertical-align: bottom; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>-O2</code>). When you use nightly you are doing a source build of libcore, and so it follows whatever optimisations you have set for your project. As far as I can see, you have set none. There's also an additional gotcha here which is that you <em>only</em> compiled a local copy of rustc. When you did a <code style='font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; vertical-align: bottom; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>cargo +stage1 build</code> this used a <em>stable</em> copy of rustc (because that's better than complaining that you didn't build cargo), and so the unstable flag to enable building libcore from source was ignored.</p>
<p dir="auto" style="color: #28272d; margin: 0;" align="initial">Try adding more stack space, or adding a stack canary to detect stack overflow, or use <code style='font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0; font-weight: inherit; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; vertical-align: bottom; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>--release</code> on your Rust builds - especially when building libcore from source. I suspect, but I have not tested (because I use macOS), that this will resolve your issue.</p>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">
—
<br>
<a href="https://gitlab.rtems.org/rtems/docs/rtems-docs/-/issues/32#note_112152">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/dc096802ca32af408a1869d93c7e2ec1/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.rtems.org/rtems/docs/rtems-docs/-/issues/32#note_112152"}}</script>
</p>
</div>
</body>
</html>