Hi there,
I was following the esp-rs-book to get setup.
Compiling and flashing works with the regular esp-rs-hal and corresponding template.
However, I now need to use the esp-idf and am unable to compile it.
I have added the riscv32imac-unknown-none-elf
target and installed these prerequisites: sudo pacman -S --needed gcc git make flex bison gperf python cmake ninja ccache dfu-util libusb
.
Additionally, I installed the crates ldproxy, cargo-generate and cargo-espflash
.
I then generated the template with cargo generate esp-rs/esp-idf-template cargo
, no advanced options.
Trying to compile now results in errors regarding pointer types (*const i8 vs *const u8) (see end of post).
I compiled simply with cargo build
and also with cargo +nightly build --target riscv32imac-esp-espidf
. Results are identical. cargo clean
did not help.
Some stats:
rust: v1.85.0-nightly
ESP_IDF_VERSION (from template): v5.2.2
Am I missing something here, or is this a bug?
Compiling std v0.0.0 (/home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
Compiling esp-idf-hal v0.44.1
Compiling esp-idf-svc v0.49.1
Compiling test v0.1.0 (/home/joel/dev/COLORADIO/test)
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1053:33
|
1053 | unsafe { CStr::from_ptr(self.entry.d_name.as_ptr()) }
| -------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*const u8`, found `*const i8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
note: associated function defined here
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ffi/c_str.rs:276:25
|
276 | pub const unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a CStr {
| ^^^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1185:43
|
1185 | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode as c_int) })?;
| ------ ^^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:850:12
|
850 | pub fn open(path: *const c_char, oflag: c_int, ...) -> c_int;
| ^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1555:61
|
1555 | run_path_with_cstr(p, &|p| cvt(unsafe { libc::mkdir(p.as_ptr(), self.mode) }).map(|_| ()))
| ----------- ^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:825:12
|
825 | pub fn mkdir(path: *const c_char, mode: mode_t) -> c_int;
| ^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1791:71
|
1791 | let ptr = run_path_with_cstr(path, &|p| unsafe { Ok(libc::opendir(p.as_ptr())) })?;
| ------------- ^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:871:12
|
871 | pub fn opendir(dirname: *const c_char) -> *mut crate::DIR;
| ^^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1802:58
|
1802 | run_path_with_cstr(p, &|p| cvt(unsafe { libc::unlink(p.as_ptr()) }).map(|_| ()))
| ------------ ^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:1036:12
|
1036 | pub fn unlink(c: *const c_char) -> c_int;
| ^^^^^^
error[E0308]: arguments to this function are incorrect
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1808:26
|
1808 | cvt(unsafe { libc::rename(old.as_ptr(), new.as_ptr()) }).map(|_| ())
| ^^^^^^^^^^^^
|
note: expected `*const i8`, found `*const u8`
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1808:39
|
1808 | cvt(unsafe { libc::rename(old.as_ptr(), new.as_ptr()) }).map(|_| ())
| ^^^^^^^^^^^^
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: expected `*const i8`, found `*const u8`
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1808:53
|
1808 | cvt(unsafe { libc::rename(old.as_ptr(), new.as_ptr()) }).map(|_| ())
| ^^^^^^^^^^^^
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:585:12
|
585 | pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int;
| ^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1814:62
|
1814 | run_path_with_cstr(p, &|p| cvt_r(|| unsafe { libc::chmod(p.as_ptr(), perm.mode) }).map(|_| ()))
| ----------- ^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:807:12
|
807 | pub fn chmod(path: *const c_char, mode: mode_t) -> c_int;
| ^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1818:57
|
1818 | run_path_with_cstr(p, &|p| cvt(unsafe { libc::rmdir(p.as_ptr()) }).map(|_| ()))
| ----------- ^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:1004:12
|
1004 | pub fn rmdir(path: *const c_char) -> c_int;
| ^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1829:45
|
1829 | cvt(unsafe { libc::readlink(p, buf.as_mut_ptr() as *mut _, buf.capacity()) })?
| -------------- ^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:1672:20
|
1672 | pub fn readlink(path: *const c_char, buf: *mut c_char, bufsz: size_t) -> ssize_t;
| ^^^^^^^^
error[E0308]: arguments to this function are incorrect
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1853:26
|
1853 | cvt(unsafe { libc::symlink(original.as_ptr(), link.as_ptr()) }).map(|_| ())
| ^^^^^^^^^^^^^
|
note: expected `*const i8`, found `*const u8`
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1853:40
|
1853 | cvt(unsafe { libc::symlink(original.as_ptr(), link.as_ptr()) }).map(|_| ())
| ^^^^^^^^^^^^^^^^^
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: expected `*const i8`, found `*const u8`
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1853:59
|
1853 | cvt(unsafe { libc::symlink(original.as_ptr(), link.as_ptr()) }).map(|_| ())
| ^^^^^^^^^^^^^
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:1133:12
|
1133 | pub fn symlink(path1: *const c_char, path2: *const c_char) -> c_int;
| ^^^^^^^
error[E0308]: arguments to this function are incorrect
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1868:34
|
1868 | cvt(unsafe { libc::link(original.as_ptr(), link.as_ptr()) })?;
| ^^^^^^^^^^
|
note: expected `*const i8`, found `*const u8`
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1868:45
|
1868 | cvt(unsafe { libc::link(original.as_ptr(), link.as_ptr()) })?;
| ^^^^^^^^^^^^^^^^^
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: expected `*const i8`, found `*const u8`
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1868:64
|
1868 | cvt(unsafe { libc::link(original.as_ptr(), link.as_ptr()) })?;
| ^^^^^^^^^^^^^
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:993:12
|
993 | pub fn link(src: *const c_char, dst: *const c_char) -> c_int;
| ^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1894:29
|
1894 | cvt(unsafe { stat64(p.as_ptr(), &mut stat) })?;
| ------ ^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:836:12
|
836 | pub fn stat(path: *const c_char, buf: *mut stat) -> c_int;
| ^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1913:30
|
1913 | cvt(unsafe { lstat64(p.as_ptr(), &mut stat) })?;
| ------- ^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:1113:12
|
1113 | pub fn lstat(path: *const c_char, buf: *mut stat) -> c_int;
| ^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1920:27
|
1920 | Ok(libc::realpath(path.as_ptr(), ptr::null_mut()))
| -------------- ^^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:1153:12
|
1153 | pub fn realpath(pathname: *const c_char, resolved: *mut c_char) -> *mut c_char;
| ^^^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:1926:34
|
1926 | let buf = CStr::from_ptr(r).to_bytes().to_vec();
| -------------- ^ expected `*const u8`, found `*mut i8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const u8`
found raw pointer `*mut i8`
note: associated function defined here
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ffi/c_str.rs:276:25
|
276 | pub const unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a CStr {
| ^^^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:2072:34
|
2072 | cvt(unsafe { libc::chown(path.as_ptr(), uid as libc::uid_t, gid as libc::gid_t) })
| ----------- ^^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:941:12
|
941 | pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> c_int;
| ^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:2085:35
|
2085 | cvt(unsafe { libc::lchown(path.as_ptr(), uid as libc::uid_t, gid as libc::gid_t) })
| ------------ ^^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:946:12
|
946 | pub fn lchown(path: *const c_char, uid: uid_t, gid: gid_t) -> c_int;
| ^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:2098:62
|
2098 | run_path_with_cstr(dir, &|dir| cvt(unsafe { libc::chroot(dir.as_ptr()) }).map(|_| ()))
| ------------ ^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:1380:12
|
1380 | pub fn chroot(name: *const c_char) -> c_int;
| ^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:634:63
|
634 | if let Some(key_value) = parse(CStr::from_ptr(*environ).to_bytes()) {
| -------------- ^^^^^^^^ expected `*const u8`, found `*const i8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
note: associated function defined here
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ffi/c_str.rs:276:25
|
276 | pub const unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a CStr {
| ^^^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:666:39
|
666 | let v = unsafe { libc::getenv(k.as_ptr()) } as *const libc::c_char;
| ------------ ^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:644:12
|
644 | pub fn getenv(s: *const c_char) -> *mut c_char;
| ^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:672:49
|
672 | let bytes = unsafe { CStr::from_ptr(v) }.to_bytes().to_vec();
| -------------- ^ expected `*const u8`, found `*const i8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
note: associated function defined here
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ffi/c_str.rs:276:25
|
276 | pub const unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a CStr {
| ^^^^^^^^
error[E0308]: arguments to this function are incorrect
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:685:17
|
685 | cvt(libc::setenv(k.as_ptr(), v.as_ptr(), 1)).map(drop)
| ^^^^^^^^^^^^
|
note: expected `*const i8`, found `*const u8`
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:685:30
|
685 | cvt(libc::setenv(k.as_ptr(), v.as_ptr(), 1)).map(drop)
| ^^^^^^^^^^
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: expected `*const i8`, found `*const u8`
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:685:42
|
685 | cvt(libc::setenv(k.as_ptr(), v.as_ptr(), 1)).map(drop)
| ^^^^^^^^^^
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:1125:12
|
1125 | pub fn setenv(name: *const c_char, val: *const c_char, overwrite: c_int) -> c_int;
| ^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:693:28
|
693 | cvt(libc::unsetenv(nbuf.as_ptr())).map(drop)
| -------------- ^^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:1131:12
|
1131 | pub fn unsetenv(name: *const c_char) -> c_int;
| ^^^^^^^^
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs:184:29
|
184 | argv: Argv(vec![program.as_ptr(), ptr::null()]),
| ^^^^^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs:231:26
|
231 | self.argv.0[0] = arg.as_ptr();
| -------------- ^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| expected due to the type of this binding
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs:239:40
|
239 | self.argv.0[self.args.len()] = arg.as_ptr();
| ---------------------------- ^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| expected due to the type of this binding
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/process/process_common.rs:417:28
|
417 | self.ptrs[l - 1] = item.as_ptr();
| ---------------- ^^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| expected due to the type of this binding
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
error[E0308]: mismatched types
--> /home/joel/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/net.rs:211:40
|
211 | cvt_gai(c::getaddrinfo(c_host.as_ptr(), ptr::null(), &hints, &mut res))
| -------------- ^^^^^^^^^^^^^^^ expected `*const i8`, found `*const u8`
| |
| arguments to this function are incorrect
|
= note: expected raw pointer `*const i8`
found raw pointer `*const u8`
note: function defined here
--> /home/joel/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.167/src/unix/mod.rs:1294:12
|
1294 | pub fn getaddrinfo(
| ^^^^^^^^^^^
For more information about this error, try `rustc --explain E0308`.
error: could not compile `std` (lib) due to 28 previous errors