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

Update to newer rustc #1067

Closed
nhynes opened this issue Oct 10, 2018 · 9 comments
Closed

Update to newer rustc #1067

nhynes opened this issue Oct 10, 2018 · 9 comments
Labels
c:build Category: build environment p:0 Priority: High! bugs, address immediately

Comments

@nhynes
Copy link
Contributor

nhynes commented Oct 10, 2018

new features, but there's also a security vulnerability in the old version.

This isn't a priority so maybe someone new might want to learn how to do this all-too-common task :)

@kostko
Copy link
Member

kostko commented Nov 25, 2018

We need to do this due to rust-lang/libc#1136 (comment).

@kostko kostko added p:0 Priority: High! bugs, address immediately c:build Category: build environment labels Nov 25, 2018
@kostko
Copy link
Member

kostko commented Nov 25, 2018

Actually we seem to have already bumped the version in #1167 without referencing this issue, so we may need an even newer version?

@kostko kostko changed the title Update to rustc nightly-2018-09-25 Update to newer rustc Nov 25, 2018
@kostko
Copy link
Member

kostko commented Nov 25, 2018

It seems that the 2018-11-01 nightly is not recent enough and 2018-11-25 is too recent as rust-sgx-sdk fails to compile due to the panic_implementation feature being removed (actually subsumed by panic_handler so it may be a simple change).

@nhynes
Copy link
Contributor Author

nhynes commented Nov 25, 2018

This issue was actually resolved by #1167. Sorry for not noticing.

@nhynes nhynes closed this as completed Nov 25, 2018
@kostko kostko reopened this Nov 25, 2018
@kostko
Copy link
Member

kostko commented Nov 25, 2018

Yeah but we need to bump it further due to the build failing with newer libc, at least that is my understanding of the comment linked above.

@kostko
Copy link
Member

kostko commented Nov 25, 2018

E.g., the build is now failing with:

error[E0432]: unresolved import `core::ffi::c_void`                                                                                                        
    --> /root/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/libc-0.2.44/src/unix/mod.rs:1151:17                                                          
     |                                                                                                                                                     
1151 |         pub use core::ffi::c_void;                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^ no `c_void` in `ffi`                                                                                              
                                                                                                                                                           

@nhynes
Copy link
Contributor Author

nhynes commented Nov 25, 2018

Weird, that's even in stable: https://doc.rust-lang.org/stable/core/ffi/enum.c_void.html

Also, we don't use the libc crate when building SGX (or at least we're not supposed to). What exactly are you trying to compile?

@kostko
Copy link
Member

kostko commented Nov 26, 2018

So our enclave builds are failing, e.g., try to build an enclave in master. I think the issue is that since 1.30 the c_void type is (a stable) part of libcore and the libc crate has changed to use that but for some reason that is not available under SGX.

Note that libc is explicitly made so that it compiles even in environments which lack a libc - in those cases it is merely an empty stub.

In any case, this does not seem to be an issue with the toolchain as the current version (nightly 2018-10-01) should be recent enough.

@kostko kostko closed this as completed Nov 26, 2018
@kostko
Copy link
Member

kostko commented Nov 26, 2018

Ok I see what the issues is. SGX std does not simply re-export all of core's ffi but it introduces a new module and libc uses extern crate std as core. So the solution is to re-export core::ffi::* in std::ffi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:build Category: build environment p:0 Priority: High! bugs, address immediately
Projects
None yet
Development

No branches or pull requests

2 participants