Repository navigation
Missing SO_INCOMING_CPU compiling with armv7-unknown-linux-musleabi #213
Copy link
Copy link
Closed
rust-lang/libc
#2115Description
Compiling socket2 v0.3.19
Running `rustc --crate-name socket2 --edition=2018 /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.3.19/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C codegen-units=1 -C metadata=9516879405a31528 -C extra-filename=-9516879405a31528 --out-dir /tmp/cargo-installQyepjN/armv7-unknown-linux-musleabi/release/deps --target armv7-unknown-linux-musleabi -C linker=armv6-linux-musleabi-gcc -L dependency=/tmp/cargo-installQyepjN/armv7-unknown-linux-musleabi/release/deps -L dependency=/tmp/cargo-installQyepjN/release/deps --extern cfg_if=/tmp/cargo-installQyepjN/armv7-unknown-linux-musleabi/release/deps/libcfg_if-a21588f9f01fd146.rmeta --extern libc=/tmp/cargo-installQyepjN/armv7-unknown-linux-musleabi/release/deps/liblibc-2305531b0b6bff17.rmeta --cap-lints allow -C relocation-model=pic -C prefer-dynamic=off -C target-feature=+crt-static,-vfp2,-vfp3`
Compiling socket2 v0.4.0
Running `rustc --crate-name socket2 --edition=2018 /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C linker-plugin-lto -C codegen-units=1 --cfg 'feature="all"' -C metadata=4b78b189cd4beac3 -C extra-filename=-4b78b189cd4beac3 --out-dir /tmp/cargo-installQyepjN/armv7-unknown-linux-musleabi/release/deps --target armv7-unknown-linux-musleabi -C linker=armv6-linux-musleabi-gcc -L dependency=/tmp/cargo-installQyepjN/armv7-unknown-linux-musleabi/release/deps -L dependency=/tmp/cargo-installQyepjN/release/deps --extern libc=/tmp/cargo-installQyepjN/armv7-unknown-linux-musleabi/release/deps/liblibc-2305531b0b6bff17.rmeta --cap-lints allow -C relocation-model=pic -C prefer-dynamic=off -C target-feature=+crt-static,-vfp2,-vfp3`
error[E0425]: cannot find value `SO_INCOMING_CPU` in crate `libc` --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/sys/unix.rs:1201:69 | 1201 | getsockopt::<c_int>(self.inner, libc::SOL_SOCKET, libc::SO_INCOMING_CPU) | ^^^^^^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find value `SO_INCOMING_CPU` in crate `libc` --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/sys/unix.rs:1217:23 | 1217 | libc::SO_INCOMING_CPU, | ^^^^^^^^^^^^^^^ not found in `libc`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0425`.
error: could not compile `socket2` Caused by:
process didn't exit successfully: `rustc --crate-name socket2 --edition=2018 /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/socket2-0.4.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C linker-plugin-lto -C codegen-units=1 --cfg 'feature="all"' -C metadata=4b78b189cd4beac3 -C extra-filename=-4b78b189cd4beac3 --out-dir /tmp/cargo-installQyepjN/armv7-unknown-linux-musleabi/release/deps --target armv7-unknown-linux-musleabi -C linker=armv6-linux-musleabi-gcc -L dependency=/tmp/cargo-installQyepjN/armv7-unknown-linux-musleabi/release/deps -L dependency=/tmp/cargo-installQyepjN/release/deps --extern libc=/tmp/cargo-installQyepjN/armv7-unknown-linux-musleabi/release/deps/liblibc-2305531b0b6bff17.rmeta --cap-lints allow -C relocation-model=pic -C prefer-dynamic=off -C target-feature=+crt-static,-vfp2,-vfp3` (exit code: 1) warning: build failed, waiting for other jobs to finish...
error
This was originally found in shadowsocks/shadowsocks-rust#459 .
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
Auto merge of #2115 - zonyitoo:master, r=JohnTitor
zonyitoo commentedon Mar 17, 2021
Changed in libc is already merged. Consider fixed the lowest libc version in the next release.
Thomasdezeeuw commentedon Mar 17, 2021
Thanks for finding and solving the problem @zonyitoo.
oherrala commentedon Mar 19, 2021
Sorry to borrow this issue, but I found out
aarch64-unknown-linux-muslandx86_64-unknown-linux-musltargets are also broken the same way and made a pull request tolibccrate to getSO_INCOMING_CPUimplemented there.PR: rust-lang/libc#2119
Bump Rust toolchain
fbecart commentedon Mar 26, 2021
Until the next version of libc is released, is there a known workaround, such as pinning a specific version of libc or socket2?
Thomasdezeeuw commentedon Mar 26, 2021
@fbecart can you run
cargo update, updating the libc crate? That should resolve this issue.fbecart commentedon Mar 26, 2021
Thank you @Thomasdezeeuw for pointing me in the right direction. I realize the problem is currently fixed for a specific set of architectures only. I'm building for
i686-unknown-linux-musl, for which an issue likely still exists. I'll redirect my attention tolibc.Auto merge of #2124 - fbecart:master, r=JohnTitor
Auto merge of #2124 - fbecart:master, r=JohnTitor
zonyitoo commentedon Mar 31, 2021
There are still many architectures missing
SO_INCOMING_CPUin thelibccrate. Could @Thomasdezeeuw make sure that all Linux-like platforms have this definition inlibc?zonyitoo commentedon Mar 31, 2021
I am not sure that
target-env = "uclibc"hasSO_INCOMING_CPUdefinition. It is left for others to make patches. :)Thomasdezeeuw commentedon Mar 31, 2021
I think this issue is really with libc, not with socket2.
Auto merge of #2135 - zonyitoo:master, r=<try>
Auto merge of #2135 - zonyitoo:master, r=<try>
JinAirsOs commentedon Apr 2, 2021
I meet this issue too.
JinAirsOs commentedon Apr 2, 2021
how to work around?
Thomasdezeeuw commentedon Apr 2, 2021
@JinAirsOs you can disable the
allfeature for now to work around it. Otherwise I think rust-lang/libc#2135 would fix this issue.Auto merge of #2135 - zonyitoo:master, r=<try>
Auto merge of #2135 - zonyitoo:master, r=<try>
Auto merge of #2135 - zonyitoo:master, r=<try>
Auto merge of #2135 - zonyitoo:master, r=<try>
Auto merge of #2135 - zonyitoo:master, r=<try>
Auto merge of #2135 - zonyitoo:master, r=<try>
Auto merge of #2135 - zonyitoo:master, r=<try>
Auto merge of #2135 - zonyitoo:master, r=JohnTitor
updated dependencies