GithubHelp home page GithubHelp logo

ESP-IDF compiation error about socket2 HOT 4 OPEN

nandra avatar nandra commented on July 21, 2024
ESP-IDF compiation error

from socket2.

Comments (4)

Thomasdezeeuw avatar Thomasdezeeuw commented on July 21, 2024

The first problem should have already been solved by #460. Can you try v0.5.6? (I know your comments mentions trying it, but the error is from v0.4.10)

Also the second error is in Mio, which is a different library: https://github.com/tokio-rs/mio, you might want to look at tokio-rs/mio#1703.

from socket2.

nandra avatar nandra commented on July 21, 2024

@Thomasdezeeuw thanks for pointig me out to commit. I'm trying 0.5.6 by adding :

socket2 = { version = "0.5.6", features = ["all"] }

to dependencies but during build I'm still seeing:

error: could not compile `socket2` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error[E0432]: unresolved import `libc::IP_HDRINCL`
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.10/src/sys/unix.rs:83:16
   |
83 | pub(crate) use libc::IP_HDRINCL;
   |                ^^^^^^^^^^^^^^^^ no `IP_HDRINCL` in the root

error: aborting due to previous error

and it seems ti compile both versions of socket2:

   Compiling socket2 v0.4.10
   Compiling socket2 v0.5.6

Sorry for dummy responses I just started with rust ;). Thanks.

from socket2.

Thomasdezeeuw avatar Thomasdezeeuw commented on July 21, 2024

@Thomasdezeeuw thanks for pointig me out to commit. I'm trying 0.5.6 by adding :

socket2 = { version = "0.5.6", features = ["all"] }

to dependencies but during build I'm still seeing:

I'm afraid that doesn't work. One of your dependencies is still using v0.4 and since updating to v0.5 could contain breaking changes (which is does for socket2), Cargo will not force your dependencies to use v0.5.

You can list all your dependencies and their dependencies using cargo tree. There you can see what is still using socket2 v0.4.

However, since socket2 v0.4 is still supported we should also fix it. Except, I don't have any build setup for ESP-IDF, nor do we have CI setup. Would you be willing to give it a shot?

If you are, I think it's checking out the v0.4 branch and updating https://github.com/rust-lang/socket2/blob/v0.4.x/src/sys/unix.rs#L82-L83 to look like

socket2/src/sys/unix.rs

Lines 135 to 136 in 6923954

#[cfg(all(feature = "all", not(any(target_os = "redox", target_os = "espidf"))))]
pub(crate) use libc::IP_HDRINCL;
(same file on the main/v0.5 branch).

from socket2.

Thomasdezeeuw avatar Thomasdezeeuw commented on July 21, 2024

I think backporting 77e3bb9 should fix it.

from socket2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.