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

Categorize WASI as an "OS" rather than as an "environment". #60117

Merged
merged 2 commits into from
May 4, 2019

Conversation

sunfishcode
Copy link
Member

This distinction is fairly abstract, but in practice, the main advantage
here is that LLVM's triple code considers WASI to be an OS, so this
makes rustc agree with that.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(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 19, 2019
@sunfishcode
Copy link
Member Author

r? @alexcrichton

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Apr 19, 2019

📌 Commit dcdcffc5d885bd285e7b0d28b82e0da44c9e75eb has been approved by alexcrichton

@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 19, 2019
@bors
Copy link
Contributor

bors commented Apr 19, 2019

⌛ Testing commit dcdcffc5d885bd285e7b0d28b82e0da44c9e75eb with merge 711ae553f8c04ebde38cca890e7bd43f684eab07...

@bors
Copy link
Contributor

bors commented Apr 20, 2019

💔 Test failed - checks-travis

@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 20, 2019
@rust-highfive
Copy link
Collaborator

The job dist-various-2 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:02:31] 
[01:02:32] error[E0432]: unresolved imports `libc::c_char`, `libc::c_void`
[01:02:32]  --> src/libstd/sys/wasi/fd.rs:7:18
[01:02:32]   |
[01:02:32] 7 | use libc::{self, c_char, c_void};
[01:02:32]   |                  ^^^^^^  ^^^^^^ no `c_void` in the root
[01:02:32]   |                  no `c_char` in the root
[01:02:32] 
[01:02:32] 
[01:02:32] error[E0432]: unresolved imports `libc::__wasi_ciovec_t`, `libc::__wasi_iovec_t`, `libc::c_void`
[01:02:32]  --> src/libstd/sys/wasi/io.rs:4:12
[01:02:32]   |
[01:02:32] 4 | use libc::{__wasi_ciovec_t, __wasi_iovec_t, c_void};
[01:02:32]   |            ^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^  ^^^^^^ no `c_void` in the root
[01:02:32]   |            |                |
[01:02:32]   |            |                no `__wasi_iovec_t` in the root
[01:02:32]   |            no `__wasi_ciovec_t` in the root
[01:02:32] 
[01:02:33] error[E0433]: failed to resolve: could not find `time_t` in `libc`
[01:02:33]   --> src/libstd/sys/wasi/thread.rs:37:44
[01:02:33]    |
[01:02:33] 37 |                     tv_sec: cmp::min(libc::time_t::max_value() as u64, secs) as libc::time_t,
[01:02:33]    |                                            ^^^^^^ could not find `time_t` in `libc`
[01:02:34] error[E0425]: cannot find function `malloc` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/alloc.rs:11:19
[01:02:34]    |
[01:02:34] 11 |             libc::malloc(layout.size()) as *mut u8
---
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `realloc` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/alloc.rs:38:19
[01:02:34]    |
[01:02:34] 38 |             libc::realloc(ptr as *mut libc::c_void, new_size) as *mut u8
[01:02:34]    |                   ^^^^^^^ not found in `libc`
[01:02:34]    |
[01:02:34] 1  | use alloc::alloc::realloc;
[01:02:34]    |
[01:02:34] 
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `c_void` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/alloc.rs:38:45
[01:02:34]    |
[01:02:34] 38 |             libc::realloc(ptr as *mut libc::c_void, new_size) as *mut u8
[01:02:34]    |                                             ^^^^^^ not found in `libc`
[01:02:34]    |
[01:02:34] 1  | use core::ffi::c_void;
[01:02:34]    |
[01:02:34] 1  | use core::ffi::c_void;
[01:02:34] 1  | use core::ffi::c_void;
[01:02:34]    |
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_args_sizes_get` in module `libc`
[01:02:34]    |
[01:02:34]    |
[01:02:34] 33 |         cvt_wasi(libc::__wasi_args_sizes_get(&mut argc, &mut argv_buf_size))?;
[01:02:34]    |                        ^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] error[E0412]: cannot find type `c_char` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/args.rs:35:45
[01:02:34]    |
[01:02:34]    |
[01:02:34] 35 |         let mut argc = vec![0 as *mut libc::c_char; argc];
[01:02:34]    |                                             ^^^^^^ not found in `libc`
[01:02:34]    |
[01:02:34] 1  | use crate::os::raw::c_char;
[01:02:34]    |
[01:02:34] 
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_args_get` in module `libc`
[01:02:34]    |
[01:02:34]    |
[01:02:34] 37 |         cvt_wasi(libc::__wasi_args_get(argc.as_mut_ptr(), argv_buf.as_mut_ptr()))?;
[01:02:34]    |                        ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_fd_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:11:15
[01:02:34]    |
[01:02:34] 11 |     fd: libc::__wasi_fd_t,
[01:02:34]    |               ^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_iovec_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:27:51
[01:02:34]    |
[01:02:34] 27 | fn iovec(a: &mut [IoVecMut<'_>]) -> (*const libc::__wasi_iovec_t, usize) {
[01:02:34]    |                                                   ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_iovec_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:30:30
[01:02:34]    |
[01:02:34] 30 |         mem::size_of::<libc::__wasi_iovec_t>()
[01:02:34]    |                              ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_iovec_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:34:31
[01:02:34]    |
[01:02:34] 34 |         mem::align_of::<libc::__wasi_iovec_t>()
[01:02:34]    |                               ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_iovec_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:36:33
[01:02:34]    |
[01:02:34] 36 |     (a.as_ptr() as *const libc::__wasi_iovec_t, a.len())
[01:02:34]    |                                 ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_ciovec_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:39:45
[01:02:34]    |
[01:02:34] 39 | fn ciovec(a: &[IoVec<'_>]) -> (*const libc::__wasi_ciovec_t, usize) {
[01:02:34]    |                                             ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_ciovec_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:42:30
[01:02:34]    |
[01:02:34] 42 |         mem::size_of::<libc::__wasi_ciovec_t>()
[01:02:34]    |                              ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_ciovec_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:46:31
[01:02:34]    |
[01:02:34] 46 |         mem::align_of::<libc::__wasi_ciovec_t>()
[01:02:34]    |                               ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_ciovec_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:48:33
[01:02:34]    |
[01:02:34] 48 |     (a.as_ptr() as *const libc::__wasi_ciovec_t, a.len())
[01:02:34]    |                                 ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_fd_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:52:38
[01:02:34]    |
[01:02:34] 52 |     pub unsafe fn from_raw(fd: libc::__wasi_fd_t) -> WasiFd {
[01:02:34]    |                                      ^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_fd_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:56:36
[01:02:34]    |
[01:02:34] 56 |     pub fn into_raw(self) -> libc::__wasi_fd_t {
[01:02:34]    |                                    ^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_fd_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:62:35
[01:02:34]    |
[01:02:34] 62 |     pub fn as_raw(&self) -> libc::__wasi_fd_t {
[01:02:34]    |                                   ^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_datasync` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:67:33
[01:02:34]    |
[01:02:34] 67 |         cvt_wasi(unsafe { libc::__wasi_fd_datasync(self.fd) })
[01:02:34]    |                                 ^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_pread` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:73:33
[01:02:34]    |
[01:02:34] 73 |         cvt_wasi(unsafe { libc::__wasi_fd_pread(self.fd, ptr, len, offset, &mut read) })?;
[01:02:34]    |                                 ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_pwrite` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:80:33
[01:02:34]    |
[01:02:34] 80 |         cvt_wasi(unsafe { libc::__wasi_fd_pwrite(self.fd, ptr, len, offset, &mut read) })?;
[01:02:34]    |                                 ^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_read` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:87:33
[01:02:34]    |
[01:02:34] 87 |         cvt_wasi(unsafe { libc::__wasi_fd_read(self.fd, ptr, len, &mut read) })?;
[01:02:34]    |                                 ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_write` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fd.rs:94:33
[01:02:34]    |
[01:02:34] 94 |         cvt_wasi(unsafe { libc::__wasi_fd_write(self.fd, ptr, len, &mut read) })?;
[01:02:34]    |                                 ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find value `__WASI_WHENCE_SET` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:100:44
[01:02:34]     |
[01:02:34] 100 |             SeekFrom::Start(pos) => (libc::__WASI_WHENCE_SET, pos as i64),
[01:02:34]     |                                            ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find value `__WASI_WHENCE_END` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:101:42
[01:02:34]     |
[01:02:34] 101 |             SeekFrom::End(pos) => (libc::__WASI_WHENCE_END, pos),
[01:02:34]     |                                          ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find value `__WASI_WHENCE_CUR` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:102:46
[01:02:34]     |
[01:02:34] 102 |             SeekFrom::Current(pos) => (libc::__WASI_WHENCE_CUR, pos),
[01:02:34]     |                                              ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_seek` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:105:33
[01:02:34]     |
[01:02:34] 105 |         cvt_wasi(unsafe { libc::__wasi_fd_seek(self.fd, offset, whence, &mut pos) })?;
[01:02:34]     |                                 ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_tell` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:111:33
[01:02:34]     |
[01:02:34] 111 |         cvt_wasi(unsafe { libc::__wasi_fd_tell(self.fd, &mut pos) })?;
[01:02:34]     |                                 ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_fdstat_set_flags` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:118:33
[01:02:34]     |
[01:02:34] 118 |         cvt_wasi(unsafe { libc::__wasi_fd_fdstat_set_flags(self.fd, flags) })
[01:02:34]     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_fdstat_set_rights` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:122:33
[01:02:34]     |
[01:02:34] 122 |         cvt_wasi(unsafe { libc::__wasi_fd_fdstat_set_rights(self.fd, base, inheriting) })
[01:02:34]     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_sync` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:126:33
[01:02:34]     |
[01:02:34] 126 |         cvt_wasi(unsafe { libc::__wasi_fd_sync(self.fd) })
[01:02:34]     |                                 ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_advise` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:130:33
[01:02:34]     |
[01:02:34] 130 |         cvt_wasi(unsafe { libc::__wasi_fd_advise(self.fd, offset, len, advice as u8) })
[01:02:34]     |                                 ^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_allocate` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:134:33
[01:02:34]     |
[01:02:34] 134 |         cvt_wasi(unsafe { libc::__wasi_fd_allocate(self.fd, offset, len) })
[01:02:34]     |                                 ^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_path_create_directory` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:139:19
[01:02:34]     |
[01:02:34] 139 |             libc::__wasi_path_create_directory(self.fd, path.as_ptr() as *const c_char, path.len())
[01:02:34]     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_path_link` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:151:19
[01:02:34]     |
[01:02:34] 151 |             libc::__wasi_path_link(
[01:02:34]     |                   ^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_path_open` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:174:28
[01:02:34]     |
[01:02:34] 174 |             cvt_wasi(libc::__wasi_path_open(
[01:02:34]     |                            ^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_readdir` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:192:19
[01:02:34]     |
[01:02:34] 192 |             libc::__wasi_fd_readdir(
[01:02:34]     |                   ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_path_readlink` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:206:19
[01:02:34]     |
[01:02:34] 206 |             libc::__wasi_path_readlink(
[01:02:34]     |                   ^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_path_rename` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:220:19
[01:02:34]     |
[01:02:34] 220 |             libc::__wasi_path_rename(
[01:02:34]     |                   ^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_filestat_t` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:231:48
[01:02:34]     |
[01:02:34] 231 |     pub fn filestat_get(&self, buf: *mut libc::__wasi_filestat_t) -> io::Result<()> {
[01:02:34]     |                                                ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_filestat_get` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:232:33
[01:02:34]     |
[01:02:34] 232 |         cvt_wasi(unsafe { libc::__wasi_fd_filestat_get(self.fd, buf) })
[01:02:34]     |                                 ^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_filestat_set_times` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:241:33
[01:02:34]     |
[01:02:34] 241 |         cvt_wasi(unsafe { libc::__wasi_fd_filestat_set_times(self.fd, atim, mtim, fstflags) })
[01:02:34]     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_filestat_set_size` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:245:33
[01:02:34]     |
[01:02:34] 245 |         cvt_wasi(unsafe { libc::__wasi_fd_filestat_set_size(self.fd, size) })
[01:02:34]     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_filestat_t` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:252:25
[01:02:34]     |
[01:02:34] 252 |         buf: *mut libc::__wasi_filestat_t,
[01:02:34]     |                         ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_path_filestat_get` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:255:19
[01:02:34]     |
[01:02:34] 255 |             libc::__wasi_path_filestat_get(
[01:02:34]     |                   ^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_path_filestat_set_times` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:274:19
[01:02:34]     |
[01:02:34] 274 |             libc::__wasi_path_filestat_set_times(
[01:02:34]     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_path_symlink` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:288:19
[01:02:34]     |
[01:02:34] 288 |             libc::__wasi_path_symlink(
[01:02:34]     |                   ^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_path_unlink_file` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:300:19
[01:02:34]     |
[01:02:34] 300 |             libc::__wasi_path_unlink_file(self.fd, path.as_ptr() as *const c_char, path.len())
[01:02:34]     |                   ^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_path_remove_directory` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:306:19
[01:02:34]     |
[01:02:34] 306 |             libc::__wasi_path_remove_directory(self.fd, path.as_ptr() as *const c_char, path.len())
[01:02:34]     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_sock_recv` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:319:19
[01:02:34]     |
[01:02:34] 319 |             libc::__wasi_sock_recv(self.fd, ptr, len, ri_flags, &mut ro_datalen, &mut ro_flags)
[01:02:34]     |                   ^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_sock_send` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:327:33
[01:02:34]     |
[01:02:34] 327 |         cvt_wasi(unsafe { libc::__wasi_sock_send(self.fd, ptr, len, si_flags, &mut so_datalen) })?;
[01:02:34]     |                                 ^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find value `__WASI_SHUT_RD` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:333:37
[01:02:34]     |
[01:02:34] 333 |             Shutdown::Read => libc::__WASI_SHUT_RD,
[01:02:34]     |                                     ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find value `__WASI_SHUT_WR` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:334:38
[01:02:34]     |
[01:02:34] 334 |             Shutdown::Write => libc::__WASI_SHUT_WR,
[01:02:34]     |                                      ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find value `__WASI_SHUT_WR` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:335:37
[01:02:34]     |
[01:02:34] 335 |             Shutdown::Both => libc::__WASI_SHUT_WR | libc::__WASI_SHUT_RD,
[01:02:34]     |                                     ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find value `__WASI_SHUT_RD` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:335:60
[01:02:34]     |
[01:02:34] 335 |             Shutdown::Both => libc::__WASI_SHUT_WR | libc::__WASI_SHUT_RD,
[01:02:34]     |                                                            ^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_sock_shutdown` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:337:33
[01:02:34]     |
[01:02:34] 337 |         cvt_wasi(unsafe { libc::__wasi_sock_shutdown(self.fd, how) })?;
[01:02:34]     |                                 ^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find function `__wasi_fd_close` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fd.rs:347:19
[01:02:34]     |
[01:02:34] 347 |             libc::__wasi_fd_close(self.fd);
[01:02:34]     |                   ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_filestat_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fs.rs:24:17
[01:02:34]    |
[01:02:34] 24 |     meta: libc::__wasi_filestat_t,
[01:02:34]    |                 ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_dirent_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fs.rs:41:17
[01:02:34]    |
[01:02:34] 41 |     meta: libc::__wasi_dirent_t,
[01:02:34]    |                 ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_lookupflags_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fs.rs:50:21
[01:02:34]    |
[01:02:34] 50 |     dirflags: libc::__wasi_lookupflags_t,
[01:02:34]    |                     ^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_fdflags_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fs.rs:51:20
[01:02:34]    |
[01:02:34] 51 |     fdflags: libc::__wasi_fdflags_t,
[01:02:34]    |                    ^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_oflags_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fs.rs:52:19
[01:02:34]    |
[01:02:34] 52 |     oflags: libc::__wasi_oflags_t,
[01:02:34]    |                   ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_rights_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fs.rs:53:31
[01:02:34]    |
[01:02:34] 53 |     rights_base: Option<libc::__wasi_rights_t>,
[01:02:34]    |                               ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_rights_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fs.rs:54:37
[01:02:34]    |
[01:02:34] 54 |     rights_inheriting: Option<libc::__wasi_rights_t>,
[01:02:34]    |                                     ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_filetype_t` in module `libc`
[01:02:34]   --> src/libstd/sys/wasi/fs.rs:64:17
[01:02:34]    |
[01:02:34] 64 |     bits: libc::__wasi_filetype_t,
[01:02:34]    |                 ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_filestat_t` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fs.rs:104:37
[01:02:34]     |
[01:02:34] 104 |     pub fn as_wasi(&self) -> &libc::__wasi_filestat_t {
[01:02:34]     |                                     ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find value `__WASI_FILETYPE_DIRECTORY` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fs.rs:121:28
[01:02:34]     |
[01:02:34] 121 |         self.bits == libc::__WASI_FILETYPE_DIRECTORY
[01:02:34]     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find value `__WASI_FILETYPE_REGULAR_FILE` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fs.rs:125:28
[01:02:34]     |
[01:02:34] 125 |         self.bits == libc::__WASI_FILETYPE_REGULAR_FILE
[01:02:34]     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0425]: cannot find value `__WASI_FILETYPE_SYMBOLIC_LINK` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fs.rs:129:28
[01:02:34]     |
[01:02:34] 129 |         self.bits == libc::__WASI_FILETYPE_SYMBOLIC_LINK
[01:02:34]     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_filetype_t` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fs.rs:132:33
[01:02:34]     |
[01:02:34] 132 |     pub fn bits(&self) -> libc::__wasi_filetype_t {
[01:02:34]     |                                 ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:34] error[E0412]: cannot find type `__wasi_dirent_t` in module `libc`
[01:02:34]    --> src/libstd/sys/wasi/fs.rs:176:52
[01:02:34]     |
[01:02:34] 176 |             let dirent_size = mem::size_of::<libc::__wasi_dirent_t>();
[01:02:34]     |                                                    ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:34] 
[01:02:35] error[E0412]: cannot find type `__wasi_dirent_t` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:185:78
[01:02:35]     |
[01:02:35] 185 |                 unsafe { ptr::read_unaligned(dirent.as_ptr() as *const libc::__wasi_dirent_t) };
[01:02:35]     |                                                                              ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `__wasi_inode_t` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:244:32
[01:02:35]     |
[01:02:35] 244 |     pub fn ino(&self) -> libc::__wasi_inode_t {
[01:02:35]     |                                ^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_LOOKUP_SYMLINK_FOLLOW` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:252:31
[01:02:35]     |
[01:02:35] 252 |         base.dirflags = libc::__WASI_LOOKUP_SYMLINK_FOLLOW;
[01:02:35]     |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_O_TRUNC` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:265:26
[01:02:35]     |
[01:02:35] 265 |         self.oflag(libc::__WASI_O_TRUNC, truncate);
[01:02:35]     |                          ^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_O_CREAT` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:269:26
[01:02:35]     |
[01:02:35] 269 |         self.oflag(libc::__WASI_O_CREAT, create);
[01:02:35]     |                          ^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_O_EXCL` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:273:26
[01:02:35]     |
[01:02:35] 273 |         self.oflag(libc::__WASI_O_EXCL, create_new);
[01:02:35]     |                          ^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_O_CREAT` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:274:26
[01:02:35]     |
[01:02:35] 274 |         self.oflag(libc::__WASI_O_CREAT, create_new);
[01:02:35]     |                          ^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_O_DIRECTORY` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:278:26
[01:02:35]     |
[01:02:35] 278 |         self.oflag(libc::__WASI_O_DIRECTORY, directory);
[01:02:35]     |                          ^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `__wasi_oflags_t` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:281:36
[01:02:35]     |
[01:02:35] 281 |     fn oflag(&mut self, bit: libc::__wasi_oflags_t, set: bool) {
[01:02:35]     |                                    ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_FDFLAG_APPEND` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:290:27
[01:02:35]     |
[01:02:35] 290 |         self.fdflag(libc::__WASI_FDFLAG_APPEND, set);
[01:02:35]     |                           ^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_FDFLAG_DSYNC` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/fs.rs:294:27
[01:02:35]     |
[01:02:35] 294 |         self.fdflag(libc::__WASI_FDFLAG_DSYNC, set);
[01:02:35]     |                           ^^^^^^^^^^^^^^^^^^^ not found in `libc`
---
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `c_int` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/os.rs:24:29
[01:02:35]    |
[01:02:35] 24 |         static errno: libc::c_int;
[01:02:35]    |                             ^^^^^ not found in `libc`
[01:02:35]    |
[01:02:35] 1  | use crate::os::raw::c_int;
[01:02:35]    |
[01:02:35] 
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `c_int` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/os.rs:32:37
[01:02:35]    |
[01:02:35] 32 |         fn strerror_r(errnum: libc::c_int, buf: *mut libc::c_char,
[01:02:35]    |                                     ^^^^^ not found in `libc`
[01:02:35]    |
[01:02:35] 1  | use crate::os::raw::c_int;
[01:02:35]    |
[01:02:35] 
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `c_char` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/os.rs:32:60
[01:02:35]    |
[01:02:35] 32 |         fn strerror_r(errnum: libc::c_int, buf: *mut libc::c_char,
[01:02:35]    |                                                            ^^^^^^ not found in `libc`
[01:02:35]    |
[01:02:35] 1  | use crate::os::raw::c_char;
[01:02:35]    |
[01:02:35] 
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `size_t` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/os.rs:33:37
[01:02:35]    |
[01:02:35] 33 |                       buflen: libc::size_t) -> libc::c_int;
[01:02:35]    |                                     ^^^^^^ not found in `libc`
[01:02:35] error[E0412]: cannot find type `c_int` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/os.rs:33:54
[01:02:35]    |
[01:02:35]    |
[01:02:35] 33 |                       buflen: libc::size_t) -> libc::c_int;
[01:02:35]    |                                                      ^^^^^ not found in `libc`
[01:02:35]    |
[01:02:35] 1  | use crate::os::raw::c_int;
[01:02:35]    |
[01:02:35] 
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `c_char` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/os.rs:36:31
[01:02:35]    |
[01:02:35] 36 |     let mut buf = [0 as libc::c_char; 1024];
[01:02:35]    |                               ^^^^^^ not found in `libc`
[01:02:35]    |
[01:02:35] 1  | use crate::os::raw::c_char;
[01:02:35]    |
[01:02:35] 
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `c_int` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/os.rs:40:38
[01:02:35]    |
[01:02:35] 40 |         if strerror_r(errno as libc::c_int, p, buf.len()) < 0 {
[01:02:35]    |                                      ^^^^^ not found in `libc`
[01:02:35]    |
[01:02:35] 1  | use crate::os::raw::c_int;
[01:02:35]    |
[01:02:35] 
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `environ` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/os.rs:108:33
[01:02:35]     |
[01:02:35] 108 |         let mut environ = libc::environ;
[01:02:35]     |                                 ^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find function `getenv` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/os.rs:139:23
[01:02:35]     |
[01:02:35] 139 |         let s = libc::getenv(k.as_ptr()) as *const libc::c_char;
[01:02:35]     |                       ^^^^^^ not found in `libc`
[01:02:35]     |
[01:02:35]     |
[01:02:35] 1   | use crate::sys::wasi::os::getenv;
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `c_char` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/os.rs:139:58
[01:02:35]     |
[01:02:35]     |
[01:02:35] 139 |         let s = libc::getenv(k.as_ptr()) as *const libc::c_char;
[01:02:35]     |                                                          ^^^^^^ not found in `libc`
[01:02:35]     |
[01:02:35] 1   | use crate::os::raw::c_char;
[01:02:35]     |
[01:02:35] 
[01:02:35] 
[01:02:35] error[E0425]: cannot find function `setenv` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/os.rs:155:19
[01:02:35]     |
[01:02:35] 155 |         cvt(libc::setenv(k.as_ptr(), v.as_ptr(), 1)).map(|_| ())
[01:02:35]     |                   ^^^^^^ not found in `libc`
[01:02:35]     |
[01:02:35]     |
[01:02:35] 1   | use crate::sys::wasi::os::setenv;
[01:02:35] 
[01:02:35] 
[01:02:35] error[E0425]: cannot find function `unsetenv` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/os.rs:164:19
[01:02:35]     |
[01:02:35] 164 |         cvt(libc::unsetenv(nbuf.as_ptr())).map(|_| ())
[01:02:35]     |                   ^^^^^^^^ not found in `libc`
[01:02:35]     |
[01:02:35]     |
[01:02:35] 1   | use crate::sys::wasi::os::unsetenv;
[01:02:35] 
[01:02:35] error[E0425]: cannot find function `exit` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/os.rs:178:15
[01:02:35]     |
[01:02:35]     |
[01:02:35] 178 |         libc::exit(code)
[01:02:35]     |               ^^^^ not found in `libc`
[01:02:35]     |
[01:02:35] 1   | use crate::process::exit;
[01:02:35]     |
[01:02:35]     |
[01:02:35] 1   | use crate::sys::wasi::os::exit;
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `STDIN_FILENO` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/stdio.rs:20:59
[01:02:35]    |
[01:02:35]    |
[01:02:35] 20 |         ManuallyDrop::new(unsafe { WasiFd::from_raw(libc::STDIN_FILENO as u32) })
[01:02:35]    |                                                           ^^^^^^^^^^^^ not found in `libc`
[01:02:35] error[E0425]: cannot find value `STDOUT_FILENO` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/stdio.rs:35:59
[01:02:35]    |
[01:02:35]    |
[01:02:35] 35 |         ManuallyDrop::new(unsafe { WasiFd::from_raw(libc::STDOUT_FILENO as u32) })
[01:02:35]    |                                                           ^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `STDERR_FILENO` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/stdio.rs:54:59
[01:02:35]    |
[01:02:35] 54 |         ManuallyDrop::new(unsafe { WasiFd::from_raw(libc::STDERR_FILENO as u32) })
[01:02:35]    |                                                           ^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_EBADF` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/stdio.rs:76:38
[01:02:35]    |
[01:02:35] 76 |     err.raw_os_error() == Some(libc::__WASI_EBADF as i32)
[01:02:35]    |                                      ^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find function `__wasi_sched_yield` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/thread.rs:22:34
[01:02:35]    |
[01:02:35] 22 |         let ret = unsafe { libc::__wasi_sched_yield() };
[01:02:35]    |                                  ^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] error[E0422]: cannot find struct, variant or union type `timespec` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/thread.rs:36:36
[01:02:35]    |
[01:02:35]    |
[01:02:35] 36 |                 let mut ts = libc::timespec {
[01:02:35]    |                                    ^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `time_t` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/thread.rs:37:87
[01:02:35]    |
[01:02:35] 37 |                     tv_sec: cmp::min(libc::time_t::max_value() as u64, secs) as libc::time_t,
[01:02:35]    |                                                                                       ^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find function `nanosleep` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/thread.rs:41:27
[01:02:35]    |
[01:02:35] 41 |                 cvt(libc::nanosleep(&ts, &mut ts)).unwrap();
[01:02:35]    |                           ^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find function `__wasi_clock_time_get` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/time.rs:17:24
[01:02:35]    |
[01:02:35] 17 |         cvt_wasi(libc::__wasi_clock_time_get(
[01:02:35]    |                        ^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_CLOCK_MONOTONIC` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/time.rs:31:36
[01:02:35]    |
[01:02:35] 31 |         Instant(current_time(libc::__WASI_CLOCK_MONOTONIC))
[01:02:35]    |                                    ^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_CLOCK_REALTIME` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/time.rs:57:39
[01:02:35]    |
[01:02:35] 57 |         SystemTime(current_time(libc::__WASI_CLOCK_REALTIME))
[01:02:35]    |                                       ^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0412]: cannot find type `__wasi_timestamp_t` in module `libc`
[01:02:35]   --> src/libstd/sys/wasi/time.rs:60:42
[01:02:35]    |
[01:02:35] 60 |     pub fn from_wasi_timestamp(ts: libc::__wasi_timestamp_t) -> SystemTime {
[01:02:35]    |                                          ^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_FILETYPE_BLOCK_DEVICE` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/ext/fs.rs:339:41
[01:02:35]     |
[01:02:35] 339 |         self.as_inner().bits() == libc::__WASI_FILETYPE_BLOCK_DEVICE
[01:02:35]     |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_FILETYPE_CHARACTER_DEVICE` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/ext/fs.rs:342:41
[01:02:35]     |
[01:02:35] 342 |         self.as_inner().bits() == libc::__WASI_FILETYPE_CHARACTER_DEVICE
[01:02:35]     |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_FILETYPE_SOCKET_DGRAM` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/ext/fs.rs:345:41
[01:02:35]     |
[01:02:35] 345 |         self.as_inner().bits() == libc::__WASI_FILETYPE_SOCKET_DGRAM
[01:02:35]     |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:35] 
[01:02:35] error[E0425]: cannot find value `__WASI_FILETYPE_SOCKET_STREAM` in module `libc`
[01:02:35]    --> src/libstd/sys/wasi/ext/fs.rs:348:41
[01:02:35]     |
[01:02:35] 348 |         self.as_inner().bits() == libc::__WASI_FILETYPE_SOCKET_STREAM
[01:02:35]     |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:36] error[E0425]: cannot find value `STDIN_FILENO` in module `libc`
[01:02:36]    --> src/libstd/sys/wasi/ext/io.rs:128:15
[01:02:36]     |
[01:02:36] 128 |         libc::STDIN_FILENO as u32
---
[01:02:36]     |
[01:02:36] 134 |         libc::STDOUT_FILENO as u32
[01:02:36]     |               ^^^^^^^^^^^^^ not found in `libc`
[01:02:36] 
[01:02:36] error[E0425]: cannot find value `STDERR_FILENO` in module `libc`
[01:02:36]    --> src/libstd/sys/wasi/ext/io.rs:140:15
[01:02:36] 140 |         libc::STDERR_FILENO as u32
[01:02:36]     |               ^^^^^^^^^^^^^ not found in `libc`
[01:02:36] 
[01:02:36] 
[01:02:36] error[E0425]: cannot find function `abort` in module `libc`
[01:02:36]   --> src/libstd/sys/wasi/mod.rs:86:11
[01:02:36] 86 |     libc::abort()
[01:02:36]    |           ^^^^^ not found in `libc`
[01:02:36] help: possible candidates are found in other modules, you can import them into scope
[01:02:36]    |
---
[01:02:36] 
[01:02:36] error[E0412]: cannot find type `c_void` in module `libc`
[01:02:36]   --> src/libstd/sys/wasi/mod.rs:92:62
[01:02:36]    |
[01:02:36] 92 |         let base = &mut ret as *mut (u64, u64) as *mut libc::c_void;
[01:02:36]    |                                                              ^^^^^^ not found in `libc`
[01:02:36]    |
[01:02:36] 17 | use core::ffi::c_void;
[01:02:36]    |
[01:02:36] 17 | use core::ffi::c_void;
[01:02:36] 17 | use core::ffi::c_void;
[01:02:36]    |
[01:02:36] 
[01:02:36] error[E0425]: cannot find function `__wasi_random_get` in module `libc`
[01:02:36]   --> src/libstd/sys/wasi/mod.rs:94:24
[01:02:36]    |
[01:02:36] 94 |         cvt_wasi(libc::__wasi_random_get(base, len)).unwrap();
[01:02:36]    |                        ^^^^^^^^^^^^^^^^^ not found in `libc`
[01:02:36] 
[01:02:36] error[E0425]: cannot find value `__WASI_ESUCCESS` in module `libc`
[01:02:36]    --> src/libstd/sys/wasi/mod.rs:123:19
[01:02:36]     |
[01:02:36] 123 |     if r != libc::__WASI_ESUCCESS {
[01:02:36]     |                   ^^^^^^^^^^^^^^^ not found in `libc`
[01:02:39] error: aborting due to 181 previous errors
[01:02:39] 
[01:02:39] Some errors have detailed explanations: E0412, E0422, E0425, E0432, E0433.
[01:02:39] For more information about an error, try `rustc --explain E0412`.
---
travis_time:end:09432ac0:start=1555719040126785182,finish=1555719040132714541,duration=5929359
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:3105b610
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:01885a02
travis_time:start:01885a02
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0ab45a80
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexcrichton
Copy link
Member

@sunfishcode FWIW I think the change to libc-the-crate will need to land to read either target_os or target_env so that error can be fixed.

@kennytm kennytm added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 23, 2019
@sunfishcode
Copy link
Member Author

@alexcrichton Ok, I now have an updated PR to libc which includes the target_os change: rust-lang/libc#1325

@sunfishcode
Copy link
Member Author

rust-lang/libc#1325 landed, and the CI is now green here.

@alexcrichton
Copy link
Member

Oh I think libc still needs to be updated in Cargo.lock here, but to do that a new release needs to be made as well

sunfishcode added a commit to sunfishcode/libc that referenced this pull request Apr 26, 2019
This adds more WASI support, and in particular adds support for WASI
being a target_os rather than a target_env, which relates to this PR:

rust-lang/rust#60117
bors added a commit to rust-lang/libc that referenced this pull request Apr 26, 2019
Bump to 0.2.53

This adds more WASI support, and in particular adds support for WASI
being a target_os rather than a target_env, which relates to this PR:

rust-lang/rust#60117
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:00c1c017:start=1556289763768723716,finish=1556289861012497593,duration=97243773877
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[00:01:23] 
######################################################################## 100.0%
[00:01:23] extracting /checkout/obj/build/cache/2019-04-11/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
[00:01:23]     Updating crates.io index
[00:01:39] error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
[00:01:39] Build completed unsuccessfully in 0:00:29
[00:01:39] make: *** [prepare] Error 1
[00:01:39] Makefile:69: recipe for target 'prepare' failed
[00:01:40] Command failed. Attempt 2/5:
[00:01:40] Command failed. Attempt 2/5:
[00:01:40]     Updating crates.io index
[00:01:41] error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
[00:01:41] Build completed unsuccessfully in 0:00:00
[00:01:41] Makefile:69: recipe for target 'prepare' failed
[00:01:41] make: *** [prepare] Error 1
[00:01:43] Command failed. Attempt 3/5:
[00:01:43] Command failed. Attempt 3/5:
[00:01:43]     Updating crates.io index
[00:01:44] error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
[00:01:44] Build completed unsuccessfully in 0:00:00
[00:01:44] Makefile:69: recipe for target 'prepare' failed
[00:01:44] make: *** [prepare] Error 1
[00:01:47] Command failed. Attempt 4/5:
[00:01:47] Command failed. Attempt 4/5:
[00:01:47]     Updating crates.io index
[00:01:48] error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
[00:01:48] Build completed unsuccessfully in 0:00:00
[00:01:48] Makefile:69: recipe for target 'prepare' failed
[00:01:48] make: *** [prepare] Error 1
[00:01:52] Command failed. Attempt 5/5:
[00:01:52] Command failed. Attempt 5/5:
[00:01:52]     Updating crates.io index
[00:01:53] error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
[00:01:53] Build completed unsuccessfully in 0:00:00
[00:01:53] make: *** [prepare] Error 1
[00:01:53] Makefile:69: recipe for target 'prepare' failed
[00:01:53] The command has failed after 5 attempts.
---
travis_time:end:00c20184:start=1556289984648374468,finish=1556289984655055406,duration=6680938
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:009161f4
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:116f1526
travis_time:start:116f1526
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:2ddc3978
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Apr 26, 2019

📌 Commit aafd1268700e872fd1d3a3e1d0c622aaa9c40eef has been approved by alexcrichton

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 3, 2019
@bors
Copy link
Contributor

bors commented May 4, 2019

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout wasi-os (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self wasi-os --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
warning: Cannot merge binary files: Cargo.lock (HEAD vs. heads/homu-tmp)
Auto-merging Cargo.lock
CONFLICT (content): Merge conflict in Cargo.lock
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 4, 2019
This distinction is fairly abstract, but in practice, the main advantage
here is that LLVM's triple code considers WASI to be an OS, so this
makes rustc agree with that.
@sunfishcode
Copy link
Member Author

Resolved Cargo.lock conflicts.

@bors: r+

@bors
Copy link
Contributor

bors commented May 4, 2019

📌 Commit c07b52e has been approved by sunfishcode

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 4, 2019
@bors
Copy link
Contributor

bors commented May 4, 2019

⌛ Testing commit c07b52e with merge d0a6ddf...

bors added a commit that referenced this pull request May 4, 2019
Categorize WASI as an "OS" rather than as an "environment".

This distinction is fairly abstract, but in practice, the main advantage
here is that LLVM's triple code considers WASI to be an OS, so this
makes rustc agree with that.
@bors
Copy link
Contributor

bors commented May 4, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: sunfishcode
Pushing d0a6ddf to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 4, 2019
@bors bors merged commit c07b52e into rust-lang:master May 4, 2019
@sunfishcode sunfishcode deleted the wasi-os branch May 4, 2019 16:18
sunfishcode added a commit to sunfishcode/getrandom that referenced this pull request May 15, 2019
 - WASI is now categorized as an OS rather than an environment.
   (rust-lang/rust#60117)
 - The WASI triple is renamed from wasm32-unknown-wasi to wasm32-wasi.
   (rust-lang/rust#60585)
sunfishcode added a commit to CraneStation/wasi that referenced this pull request Jun 5, 2019
In addition to using the new triple, this arranges for users get the
following fixes:
 - rust-lang/rust#60117
 - rust-lang/rust#59727
rtzoeller added a commit to rtzoeller/nix that referenced this pull request Jun 6, 2022
Remove obsolete references to target_env = wasi, target_os = nacl,
target_os = osx, and a typo'd target_os = fushsia that didn't compile
when fixed.

 - target_env = wasi is dead: rust-lang/rust#60117
 - target_os = nacl is dead: rust-lang/rust#45041
 - target_os = osx is dead, but I can't find a link.
bors bot added a commit to nix-rust/nix that referenced this pull request Jun 9, 2022
1735: Cleanup cfg blocks r=asomers a=rtzoeller

Remove obsolete references to target_env = wasi, target_os = nacl, target_os = osx, and a typo'd target_os = fushsia that didn't compile when fixed.

 - target_env = wasi is dead: rust-lang/rust#60117
 - target_os = nacl is dead: rust-lang/rust#45041
 - target_os = osx is dead, but I can't find a link.

Found while exploring `--check-cfg`, as mentioned in #1734.

Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants