zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
21.34k stars 644 forks source link

Unable to build on FreeBSD 14 #1470

Open bdrewery opened 2 years ago

bdrewery commented 2 years ago
   Compiling interprocess v1.1.1
error[E0432]: unresolved imports `libc::SIGPOLL`, `libc::SO_PASSCRED`, `libc::SO_PEERCRED`, `libc::SCM_CREDENTIALS`, `libc::ucred`
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/interprocess-1.1.1/src/os/unix/imports.rs:51:13
   |
51 |             SIGPOLL,
   |             ^^^^^^^ no `SIGPOLL` in the root
52 |             SO_PASSCRED,
   |             ^^^^^^^^^^^ no `SO_PASSCRED` in the root
53 |             SO_PEERCRED,
   |             ^^^^^^^^^^^ no `SO_PEERCRED` in the root
54 |             SCM_CREDENTIALS,
   |             ^^^^^^^^^^^^^^^ no `SCM_CREDENTIALS` in the root
55 |             socklen_t,
56 |             ucred,
   |             ^^^^^ no `ucred` in the root
   |
help: a similar name exists in the module
   |
51 |             SIGILL,
   |             ~~~~~~
help: a similar name exists in the module
   |
56 |             xucred,
   |             ~~~~~~

For more information about this error, try `rustc --explain E0432`.
error: could not compile `interprocess` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `zellij v0.30.0`, intermediate artifacts can be found at `/tmp/cargo-installSZv9H8`

This was reported before in #378 but not fixed directly. interprocess was fixed in ~1.1.2~ https://github.com/kotauskas/interprocess/issues/10 - ~Can the dependency be bumped to 1.1.2?~ 1.1.2 was never released.

bdrewery commented 2 years ago

On a614d117376c87b9375e418c9adb9761bf4c007b Using a newer version of interprocess allows building but it just goes into an infinite loop not being able to connect. I'm not logging a separate bug as I don't know if it is due to using a random version of interprocess.

INFO   |zellij_client            | 2022-06-09 13:12:22.966 [main      ] [zellij-client/src/lib.rs:124]: Starting Zellij client!
INFO   |zellij_server            | 2022-06-09 13:12:22.976 [main      ] [zellij-server/src/lib.rs:194]: Starting Zellij server!
WARN   |zellij_utils::ipc        | 2022-06-09 13:12:22.979 [router    ] [zellij-utils/src/ipc.rs:194]: Error in IpcReceiver.recv(): Io(Os { code: 57, kind: NotConnected, message: "Socket is not connected" })
ERROR  |zellij_client            | 2022-06-09 13:12:22.980 [router    ] [zellij-client/src/lib.rs:291]: Received empty message from server
WARN   |zellij_utils::ipc        | 2022-06-09 13:12:22.980 [router    ] [zellij-utils/src/ipc.rs:194]: Error in IpcReceiver.recv(): Io(Os { code: 57, kind: NotConnected, message: "Socket is not connected" })
ERROR  |zellij_client            | 2022-06-09 13:12:22.980 [router    ] [zellij-client/src/lib.rs:291]: Received empty message from server
WARN   |zellij_utils::ipc        | 2022-06-09 13:12:22.980 [router    ] [zellij-utils/src/ipc.rs:194]: Error in IpcReceiver.recv(): Io(Os { code: 57, kind: NotConnected, message: "Socket is not connected" })
ERROR  |zellij_client            | 2022-06-09 13:12:22.981 [router    ] [zellij-client/src/lib.rs:291]: Received empty message from server
WARN   |zellij_utils::ipc        | 2022-06-09 13:12:22.981 [router    ] [zellij-utils/src/ipc.rs:194]: Error in IpcReceiver.recv(): Io(Os { code: 57, kind: NotConnected, message: "Socket is not connected" })
ERROR  |zellij_client            | 2022-06-09 13:12:22.981 [router    ] [zellij-client/src/lib.rs:291]: Received empty message from server
WARN   |zellij_utils::ipc        | 2022-06-09 13:12:22.981 [router    ] [zellij-utils/src/ipc.rs:194]: Error in IpcReceiver.recv(): Io(Os { code: 57, kind: NotConnected, message: "Socket is not connected" })
ERROR  |zellij_client            | 2022-06-09 13:12:22.981 [router    ] [zellij-client/src/lib.rs:291]: Received empty message from server

From truss:

78018: connect(5,{ AF_UNIX "/tmp/zellij-0/0.31.0/flippant-self" },106) ERR#2 'No such file or directory'
78021: unlink("/tmp/zellij-0/0.31.0/flippant-self") ERR#2 'No such file or directory'
78021: bind(5,{ AF_UNIX "/tmp/zellij-0/0.31.0/flippant-self" },106) = 0 (0x0)
78021: compat11.stat("/tmp/zellij-0/0.31.0/flippant-self",{ mode=srwxr-xr-x ,inode=9289,size=0,blksize=4096 }) = 0 (0x0)
78021: chmod("/tmp/zellij-0/0.31.0/flippant-self",0700) = 0 (0x0)

It appears to try connecting before the socket is present and then does not retry.

root       78021    1.0  0.0  61284  25928  -  SX   13:32       0:00.00 /root/git/zellij/target/debug/zellij --server /tmp/zellij-0/0.31.0/flippant-self
root       78017   55.7  0.0  13136   2952  1  R+   13:32       0:08.19 truss -f ./target/debug/zellij -d
root       78018    8.4  0.0  76636  28956  1  TX+  13:32       0:01.08 ./target/debug/zellij -d
# ls /tmp/zellij-0/0.31.0/flippant-self
/tmp/zellij-0/0.31.0/flippant-self=
NuSkooler commented 2 years ago

I'm hitting the same unresolved symbols issue with FreeBSD 13: FreeBSD nu-minibsd 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64