fortanix / simple-hyper-client

Simple HTTP client using hyper providing both blocking and async interfaces
Mozilla Public License 2.0
4 stars 2 forks source link

Compilation errors #5

Closed catena2w closed 10 months ago

catena2w commented 10 months ago

I've created a simple "hello world" project with dependency to simple-hyper-client (https://github.com/catena2w/fortanix-http/tree/master) and trying to run it within sgx , but get errors like:

$ cargo run --target x86_64-fortanix-unknown-sgx
   Compiling mio v0.8.9
   Compiling socket2 v0.5.5
   Compiling sha1 v0.10.6
error[E0583]: file not found for module `sys`
   --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.5.5/src/lib.rs:179:1
    |
179 | mod sys;
    | ^^^^^^^^
    |
    = help: to create the module `sys`, create file "/home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.5.5/src/sys.rs" or "/home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.5.5/src/sys/mod.rs"
    = note: if there is a `mod sys` elsewhere in the crate already, import it with `use crate::...` instead

error: Socket2 doesn't support the compile target
   --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.5.5/src/lib.rs:182:1
    |
182 | compile_error!("Socket2 doesn't support the compile target");
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0432]: unresolved imports `crate::sys::c_int`, `crate::sys::sa_family_t`, `crate::sys::sockaddr`, `crate::sys::sockaddr_in`, `crate::sys::sockaddr_in6`, `crate::sys::sockaddr_storage`, `crate::sys::socklen_t`, `crate::sys::AF_INET`, `crate::sys::AF_INET6`, `crate::sys::AF_UNIX`
  --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.5.5/src/sockaddr.rs:11:5
   |
11 |     c_int, sa_family_t, sockaddr, sockaddr_in, sockaddr_in6, sockaddr_storage, socklen_t, AF_INET,
   |     ^^^^^  ^^^^^^^^^^^  ^^^^^^^^  ^^^^^^^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^  ^^^^^^^^^  ^^^^^^^ no `AF_INET` in `sys`
   |     |      |            |         |            |             |                 |
   |     |      |            |         |            |             |                 no `socklen_t` in `sys`
   |     |      |            |         |            |             no `sockaddr_storage` in `sys`
   |     |      |            |         |            no `sockaddr_in6` in `sys`
   |     |      |            |         no `sockaddr_in` in `sys`
   |     |      |            no `sockaddr` in `sys`
   |     |      no `sa_family_t` in `sys`
   |     no `c_int` in `sys`
12 |     AF_INET6, AF_UNIX,
   |     ^^^^^^^^  ^^^^^^^ no `AF_UNIX` in `sys`
   |     |
   |     no `AF_INET6` in `sys`
   |
   = help: consider importing one of these items instead:
           std::ffi::c_int
           std::os::raw::c_int
           core::ffi::c_int
   = help: consider importing this module instead:
           crate::sockaddr

error[E0432]: unresolved import `crate::sys::IoSourceState`
  --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.9/src/io_source.rs:12:5
   |
12 | use crate::sys::IoSourceState;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ no `IoSourceState` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.9/src/net/tcp/listener.rs:15:17
   |
15 | use crate::sys::tcp::{bind, listen, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.9/src/net/tcp/stream.rs:13:17
   |
13 | use crate::sys::tcp::{connect, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

....

Some errors have detailed explanations: E0412, E0425, E0432, E0433, E0599.
error: could not compile `mio` (lib) due to 44 previous errors

(full error here - https://qtext.io/wltf)

mzohreva commented 10 months ago

I compiled the program using nightly-2023-05-07 and it works fine? Did you already resolve the issue? if so please close this.