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

Can't install on FreeBSD 14 due to missing methods #36

Open
IchSchreiGleich opened this issue Apr 27, 2024 · 1 comment
Open

Can't install on FreeBSD 14 due to missing methods #36

IchSchreiGleich opened this issue Apr 27, 2024 · 1 comment

Comments

@IchSchreiGleich
Copy link

I tried to install via pip and ran into a problem on FreeBSD:

Compiling netifaces v0.1.0 (/tmp/pip-install-dyyhyxi9/netifaces2_a4e6ec59b8ba427f8cc87b285b0ddf70)
      error[E0599]: no method named `as_netlink_addr` found for union `SockaddrStorage` in the current scope
        --> src/linux.rs:82:49
         |
      82 |                 if let Some(net_link) = address.as_netlink_addr() {
         |                                                 ^^^^^^^^^^^^^^^ help: there is a method with a similar name: `as_link_addr`

      error[E0599]: no method named `as_vsock_addr` found for union `SockaddrStorage` in the current scope
        --> src/linux.rs:87:51
         |
      87 |                 if let Some(vsock_addr) = address.as_vsock_addr() {
         |                                                   ^^^^^^^^^^^^^ help: there is a method with a similar name: `as_link_addr`

      error[E0599]: no method named `as_alg_addr` found for union `SockaddrStorage` in the current scope
        --> src/linux.rs:96:49
         |
      96 |                 if let Some(alg_addr) = address.as_alg_addr() {
         |                                                 ^^^^^^^^^^^ method not found in `SockaddrStorage`

After commenting out the lines following configstarget_os = "macos" (what is not good for macos is also not good for freebsd :p ), the result is

//#[cfg(not(any(target_os = "ios", target_os = "macos")))]
//if let Some(net_link) = address.as_link_addr() {
//    add_to_types_mat(AF_NETLINK, net_link, name, &mut types_mat, &mut any);
//}

and everything is fine. Maybe not the right way.

My "build" config is

export CARGO_BUILD_TARGET=x86_64-unknown-freebsd
export RUSTUP_HOME=~/.rustup
export CARGO_HOME=~/.cargo
export PATH=$CARGO_HOME/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
@ronzelver
Copy link

ronzelver commented May 2, 2024

Same here, I'm trying to install the latest OctoPrint in a FreeBSD 13 jail which utilizes netifaces2 as well. I get the exactly same error on missing methods. It only complains about the following 3 methods:

  • as_netlink_addr()
  • as_vsock_addr()
  • as_alg_addr()

Apparently the method 'as_sockaddr_in()' is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants