Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quinn_udp build fails on DragonFlyBSD #1744

Open
movepointsolutions opened this issue Jan 19, 2024 · 2 comments
Open

quinn_udp build fails on DragonFlyBSD #1744

movepointsolutions opened this issue Jan 19, 2024 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@movepointsolutions
Copy link

anek@dfly:~/quinn % cb
Compiling quinn-udp v0.5.0 (/home/anek/quinn/quinn-udp)
Compiling hdrhistogram v7.5.4
error[E0425]: cannot find value IP_RECVTOS in crate libc
--> quinn-udp/src/unix.rs:72:79
|
72 | if let Err(err) = set_socket_option(&*io, libc::IPPROTO_IP, libc::IP_RECVTOS, OPTION_ON)
| ^^^^^^^^^^ help: a constant with a similar name exists: IP_RECVIF
|
::: /home/anek/.cargo/git/checkouts/libc-68af43d2bf751e61/8585f41/src/unix/bsd/freebsdlike/mod.rs:964:1
|
964 | pub const IP_RECVIF: ::c_int = 20;
| ---------------------------- similarly named constant IP_RECVIF defined here

error[E0412]: cannot find type mmsghdr in crate libc
--> quinn-udp/src/unix.rs:224:26
|
224 | let mut msgs: [libc::mmsghdr; BATCH_SIZE] = unsafe { mem::zeroed() };
| ^^^^^^^ help: a struct with a similar name exists: cmsghdr
|
::: /home/anek/.cargo/git/checkouts/libc-68af43d2bf751e61/8585f41/src/unix/bsd/mod.rs:10:1
|
10 | / s! {
11 | | pub struct sockaddr {
12 | | pub sa_len: u8,
13 | | pub sa_family: sa_family_t,
... |
124 | | }
125 | | }
| |_- similarly named struct cmsghdr defined here

error[E0412]: cannot find type mmsghdr in crate libc
--> quinn-udp/src/unix.rs:371:24
|
371 | msgvec: *mut libc::mmsghdr,
| ^^^^^^^ help: a struct with a similar name exists: cmsghdr
|
::: /home/anek/.cargo/git/checkouts/libc-68af43d2bf751e61/8585f41/src/unix/bsd/mod.rs:10:1
|
10 | / s! {
11 | | pub struct sockaddr {
12 | | pub sa_len: u8,
13 | | pub sa_family: sa_family_t,
... |
124 | | }
125 | | }
| |_- similarly named struct cmsghdr defined here

error[E0425]: cannot find value SYS_sendmmsg in crate libc
--> quinn-udp/src/unix.rs:378:39
|
378 | let ret = libc::syscall(libc::SYS_sendmmsg, sockfd, msgvec, vlen, flags) as libc::c_int;
| ^^^^^^^^^^^^ not found in libc

error[E0412]: cannot find type mmsghdr in crate libc
--> quinn-udp/src/unix.rs:410:24
|
410 | msgvec: *mut libc::mmsghdr,
| ^^^^^^^ help: a struct with a similar name exists: cmsghdr
|
::: /home/anek/.cargo/git/checkouts/libc-68af43d2bf751e61/8585f41/src/unix/bsd/mod.rs:10:1
|
10 | / s! {
11 | | pub struct sockaddr {
12 | | pub sa_len: u8,
13 | | pub sa_family: sa_family_t,
... |
124 | | }
125 | | }
| |_- similarly named struct cmsghdr defined here

error[E0412]: cannot find type mmsghdr in crate libc
--> quinn-udp/src/unix.rs:433:50
|
433 | let mut hdrs = unsafe { mem::zeroed::<[libc::mmsghdr; BATCH_SIZE]>() };
| ^^^^^^^ help: a struct with a similar name exists: cmsghdr
|
::: /home/anek/.cargo/git/checkouts/libc-68af43d2bf751e61/8585f41/src/unix/bsd/mod.rs:10:1
|
10 | / s! {
11 | | pub struct sockaddr {
12 | | pub sa_len: u8,
13 | | pub sa_family: sa_family_t,
... |
124 | | }
125 | | }
| |_- similarly named struct cmsghdr defined here

error[E0412]: cannot find type mmsghdr in crate libc
--> quinn-udp/src/unix.rs:498:24
|
498 | msgvec: *mut libc::mmsghdr,
| ^^^^^^^ help: a struct with a similar name exists: cmsghdr
|
::: /home/anek/.cargo/git/checkouts/libc-68af43d2bf751e61/8585f41/src/unix/bsd/mod.rs:10:1
|
10 | / s! {
11 | | pub struct sockaddr {
12 | | pub sa_len: u8,
13 | | pub sa_family: sa_family_t,
... |
124 | | }
125 | | }
| |_- similarly named struct cmsghdr defined here

error[E0412]: cannot find type mmsghdr in crate libc
--> quinn-udp/src/unix.rs:539:24
|
539 | msgvec: *mut libc::mmsghdr,
| ^^^^^^^ help: a struct with a similar name exists: cmsghdr
|
::: /home/anek/.cargo/git/checkouts/libc-68af43d2bf751e61/8585f41/src/unix/bsd/mod.rs:10:1
|
10 | / s! {
11 | | pub struct sockaddr {
12 | | pub sa_len: u8,
13 | | pub sa_family: sa_family_t,
... |
124 | | }
125 | | }
| |_- similarly named struct cmsghdr defined here

error[E0531]: cannot find unit struct, unit variant or constant IP_RECVTOS in crate libc
--> quinn-udp/src/unix.rs:670:73
|
670 | (libc::IPPROTO_IP, libc::IP_TOS) | (libc::IPPROTO_IP, libc::IP_RECVTOS) => unsafe {
| ^^^^^^^^^^ help: a constant with a similar name exists: IP_RECVIF
|
::: /home/anek/.cargo/git/checkouts/libc-68af43d2bf751e61/8585f41/src/unix/bsd/freebsdlike/mod.rs:964:1
|
964 | pub const IP_RECVIF: ::c_int = 20;
| ---------------------------- similarly named constant IP_RECVIF defined here

@movepointsolutions
Copy link
Author

movepointsolutions commented Jan 19, 2024

And it's unrelated to libc crate:

anek@dfly:~/libc % grep -r mmsghdr /usr/local/include/ /usr/include/
/usr/local/include/glib-2.0/gio/giotypes.h: * This structure closely mirrors 'struct mmsghdr' and 'struct msghdr' from
/usr/local/include/nice/agent.h: * #NiceInputMessage to struct mmsghdr.
/usr/local/include/nice/agent.h: * sendmmsg(); and #NiceOutputMessage to struct mmsghdr.
anek@dfly:~/libc % ```

@djc
Copy link
Collaborator

djc commented Jan 19, 2024

Please use code blocks in your GitHub comments -- this is pretty hard to read.

I suggest you submit a PR with changes to the compilation guards that make this work for you, as we don't really have a way to test this.

@Ralith Ralith added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Apr 4, 2024
@Ralith Ralith changed the title DragonFlyBSD doesn't have mmsghdr and recvmmsg at all quinn_udp build fails on DragonFlyBSD Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants