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

Failing to build on nightly #11

Closed
nelhage opened this issue May 26, 2020 · 3 comments
Closed

Failing to build on nightly #11

nelhage opened this issue May 26, 2020 · 3 comments

Comments

@nelhage
Copy link
Contributor

nelhage commented May 26, 2020

I'm getting build errors on Rust nightly, using this minimal test case:

[nelhage@monolithique:/tmp/probetest]$ cargo +nightly build
   Compiling probetest v0.1.0 (/tmp/probetest)
error[E0660]: malformed inline assembly
 --> main.rs:4:5
  |
4 |     probe!(test_probe, entry);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: use of deprecated item 'asm': the syntax of asm! will change soon, use llvm_asm! to avoid breakage
 --> main.rs:4:5
  |
4 |     probe!(test_probe, entry);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(deprecated)]` on by default
  = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0660`.
error: could not compile `probetest`.

To learn more, run the command again with --verbose.

I'm seeing this error on a nightly pulled from rustup just now, as well as on nightly-2020-04-08-x86_64-unknown-linux-gnu, although that doesn't give the warning:

[nelhage@monolithique:/tmp/probetest]$ cargo +nightly-2020-04-08-x86_64-unknown-linux-gnu build
   Compiling probetest v0.1.0 (/tmp/probetest)
error[E0660]: malformed inline assembly
 --> main.rs:4:5
  |
4 |     probe!(test_probe, entry);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0660`.
error: could not compile `probetest`.

To learn more, run the command again with --verbose.
@cuviper
Copy link
Owner

cuviper commented May 26, 2020

Rust is transitioning from the old asm! syntax (now llvm_asm! -- rust-lang/rust#70173) to a new syntax (rust-lang/rust#72016), and I converted to the new in probe 0.2. I doubt that will work on a nightly as old as 2020-04-08, but I don't know why it wouldn't work when you pulled a current nightly. Your reproducer works for me with:

rustc 1.45.0-nightly (f93bb2a50 2020-05-25)
binary: rustc
commit-hash: f93bb2a50b37bc8bafe4d960e2afd839eaa854ed
commit-date: 2020-05-25
host: x86_64-unknown-linux-gnu
release: 1.45.0-nightly
LLVM version: 10.0

@cuviper
Copy link
Owner

cuviper commented May 26, 2020

FWIW, I could publish a 0.1 update to use llvm_asm! if necessary, but I'm not sure it's needed. There is one downside to the new asm in that it only supports register constraints, which means I had to use isize for arguments instead of i64, since 32-bit platforms can't generally put i64 in registers. Previously, those could be stored as memory operands.

@nelhage
Copy link
Contributor Author

nelhage commented May 26, 2020

Ah, darn, my bad -- I ran a rustup update but that seems to have actually gotten a two-week-old build because of some issue related to rls-preview and rustfmt. Grabbing the actual latest nightly fixes it. Sorry for the noise!

@nelhage nelhage closed this as completed May 26, 2020
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

No branches or pull requests

2 participants