Comments (6)
Done: https://crates.io/crates/socket2/versions. I'm leaving v0.1.0 and v0.2.0 although they might have the same problem (I haven't checked), but those aren't maintained any more.
from socket2.
Sorry for the necromancy, but if I have a project that uses this 0.3.11 through several dependencies that are all dead, do you have any suggestions for just getting it to compile? I've tried switching the rust versions back to 1.4x.0 (around the time of this original issue) but it doesn't seem to help. Getting it to compile at least would let me migrate to newer versions of the dependencies a bit easier.
|
156 | mem::transmute::<SocketAddrV4, sockaddr_in>(v4);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: source type: `SocketAddrV4` (48 bits)
= note: target type: `sockaddr_in` (128 bits)
from socket2.
What happens if you try cargo update -p socket2
? That should update socket2
to 0.3.19
unless whatever crate depends on it has pinned a specific version.
What crate has the code you quote the error from? That code is invalid since those two types (no longer) have the same memory layout.
If you use socket2 0.3.11
I'm pretty sure your dependency tree should be able to handle version 0.3.16
and up where this issue is fixed.
from socket2.
@faern is entirely correct. v0.3.16 fixes this issue and is compatible with v0.3.x, while v0.4.x is not, so we don't want to yank that version.
from socket2.
What happens if you try
cargo update -p socket2
? That should updatesocket2
to0.3.19
unless whatever crate depends on it has pinned a specific version.
It bumped it to 0.3.19, That gets me to a very different looking error! Thank you!
warning: `flight-analysis-service` (lib) generated 12 warnings (run `cargo fix --lib -p flight-analysis-service` to apply 8 suggestions)
error: linking with `cc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/Users/brianstearns/.rustup/toolchains/stable-aarch64-ap ..... <giant path dump omitted>
ld: warning: pointer not aligned at _grpc_lb_v1_ClientStats_fields+0xB from /Users/brianstearns/rust/wtf/rs-flight-analysis-service/target/debug/deps/libgrpcio_sys-c6e4fac3b43a752f.rlib[344](load_balancer.pb.c.o)
ld: warning: pointer not aligned at _grpc_lb_v1_ClientStats_fields+0x6A from /Users/brianstearns/rust/wtf/rs-flight-analysis-service/target/debug/deps/libgrpcio_sys-c6e4fac3b43a752f.rlib[344](load_balancer.pb.c.o)
ld: warning: pointer not aligned at _grpc_lb_v1_LoadBalanceRequest_fields+0x1E from /Users/brianstearns/rust/wtf/rs-flight-analysis-service/target/debug/deps/libgrpcio_sys-c6e4fac3b43a752f.rlib[344](load_balancer.pb.c.o)
ld: warning: pointer not aligned at _grpc_lb_v1_InitialLoadBalanceResponse_fields+0x1E from /Users/brianstearns/rust/wtf/rs-flight-analysis-service/target/debug/deps/libgrpcio_sys-c6e4fac3b43a752f.rlib[344](load_balancer.pb.c.o)
ld: warning: pointer not aligned at _grpc_lb_v1_ServerList_fields+0xB from /Users/brianstearns/rust/wtf/rs-flight-analysis-service/target/debug/deps/libgrpcio_sys-c6e4fac3b43a752f.rlib[344](load_balancer.pb.c.o)
ld: warning: pointer not aligned at _grpc_lb_v1_LoadBalanceResponse_fields+0x1E from /Users/brianstearns/rust/wtf/rs-flight-analysis-service/target/debug/deps/libgrpcio_sys-c6e4fac3b43a752f.rlib[344](load_balancer.pb.c.o)
ld: pointer not 4-byte aligned at __DATA_CONST+0x81D13, fix alignment or disable chained fixups
final section layout:
__PAGEZERO addr=0x00000000, size=0x100000000, fileOffset=0x00000000
__TEXT addr=0x100000000, size=0x00d4c000, fileOffset=0x00000000
__text addr=0x100000920, size=0x0095e82c, fileOffset=0x00000920
__stubs addr=0x10095f14c, size=0x00002190, fileOffset=0x0095f14c
__init_offsets addr=0x1009612dc, size=0x00000084, fileOffset=0x009612dc
__const addr=0x100961360, size=0x00158bc8, fileOffset=0x00961360
__gcc_except_tab addr=0x100ab9f28, size=0x0004c510, fileOffset=0x00ab9f28
__cstring addr=0x100b06438, size=0x00016854, fileOffset=0x00b06438
__unwind_info addr=0x100b1cc8c, size=0x0005b980, fileOffset=0x00b1cc8c
__eh_frame addr=0x100b78610, size=0x001d39e8, fileOffset=0x00b78610
__DATA_CONST addr=0x100d4c000, size=0x00094000, fileOffset=0x00d4c000
__got addr=0x100d4c000, size=0x000016d0, fileOffset=0x00d4c000
__const addr=0x100d4d6d0, size=0x00091df0, fileOffset=0x00d4d6d0
__DATA addr=0x100de0000, size=0x0001c000, fileOffset=0x00de0000
__data addr=0x100de0000, size=0x000030d8, fileOffset=0x00de0000
__thread_vars addr=0x100de30d8, size=0x00000330, fileOffset=0x00de30d8
__thread_data addr=0x100de3410, size=0x00000040, fileOffset=0x00de3410
__thread_bss addr=0x100de3450, size=0x00000518, fileOffset=0x00de3450
__bss addr=0x100de3980, size=0x00015028, fileOffset=0x00000000
__common addr=0x100df89a8, size=0x000005a0, fileOffset=0x00000000
__LINKEDIT addr=0x100dfc000, size=0x00a48000, fileOffset=0x00de4000
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What crate has the code you quote the error from? That code is invalid since those two types (no longer) have the same memory layout.
I'm pretty sure this is mostly coming from the hyper
crate or trust-dns-proto
.
If you use
socket2 0.3.11
I'm pretty sure your dependency tree should be able to handle version0.3.16
and up where this issue is fixed.
socket2 0.3.11 is required via hyper
(0.13.8), ipconfig
(0.2.1), and trust-dns-proto
(0.8.0).
from socket2.
For anyone in the future who runs across this thread (also possible future me): to fix this new second issue right above this, the trick might be to set export MACOSX_DEPLOYMENT_TARGET=11
.
@faern thank you so much! I had tried manually editing the versions up earlier but I must have missed something.
from socket2.
Related Issues (20)
- Question: Possible to support architectures that only provide the `std::net` interface (and only TCP)? HOT 4
- Windows: `sa_family_t` should use `ADDRESS_FAMILY` from `windows-sys` HOT 5
- nonblocking connect HOT 6
- Set `ss_len` when creating `SockAddr` from std HOT 1
- Why cannot find WASStartup and WSACleanup in source code? HOT 7
- bind_device succeeds, but subsequent sends fail with no such device or address. HOT 5
- QUESTION: How to special `laddr` when dialing connection? HOT 3
- Android support HOT 3
- don'tassign8080 port
- Currently socket2 has no way to set the DF bit on packets. The attached patch adds it. HOT 3
- Error: BoxSend(Os { code: 98, kind: AddrInUse, message: "Address already in use" }) HOT 2
- How to read EventExtra from the event? HOT 2
- socket() always fails on WSL1 due to unsupported SOCK_CLOEXEC flag HOT 5
- Support for {recv,send}mmsg HOT 2
- New release HOT 1
- socket error HOT 1
- Provide `bind_device_by_index_v{4|6}` methods for linux. HOT 7
- Shouldn't socket recv() promise in its doc allows a nicer API HOT 7
- ESP-IDF compiation error HOT 4
- Possible to publish a new patch release? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socket2.