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

FreeBSD compatibility #141

Closed
BrushXue opened this issue Nov 11, 2022 · 4 comments
Closed

FreeBSD compatibility #141

BrushXue opened this issue Nov 11, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@BrushXue
Copy link

BrushXue commented Nov 11, 2022

Describe the bug
Can't build on FreeBSD

error[E0308]: mismatched types
  --> /root/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/local-ip-address-0.4.4/src/lib.rs:86:22
   |
86 | pub fn local_ip() -> Result<IpAddr, Error> {
   |        --------      ^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `()`
   |        |
   |        implicitly returns `()` as its body has no tail or `return` expression
   |
   = note:   expected enum `Result<IpAddr, Error>`
           found unit type `()`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `local-ip-address` due to previous error
warning: build failed, waiting for other jobs to finish...

Describe the environment
TrueNAS 13.0 U2
Jails: FreeBSD 13.1-RELEASE-p3
Rust: 1.63.0

How to Reproduce the bug

pkg install git rust
git clone https://github.com/rustdesk/rustdesk-server.git
cd rustdesk-server/
cargo build --release

Expected behavior

Additional context
I have zero knowledge about Rust and I'm not sure if it's a Rust problem or FreeBSD problem.

Notes

@BrushXue BrushXue added the bug Something isn't working label Nov 11, 2022
@paspo
Copy link
Contributor

paspo commented Nov 17, 2022

Are you creating a jail for TrueNAS?

If not, have you considered enabling Linux Binary Compatibility in FreeBSD ?

(side note: it's not a bug if you're talking about an unsupported platform/architecture)

@BrushXue
Copy link
Author

Are you creating a jail for TrueNAS?

If not, have you considered enabling Linux Binary Compatibility in FreeBSD ?

(side note: it's not a bug if you're talking about an unsupported platform/architecture)

I've upgraded to TrueNAS Scale so I can use docker. It's a waste of time to deal with the linux compatibility in FreeBSD.

@n-connect
Copy link
Contributor

Are you creating a jail for TrueNAS?
If not, have you considered enabling Linux Binary Compatibility in FreeBSD ?
(side note: it's not a bug if you're talking about an unsupported platform/architecture)

I've upgraded to TrueNAS Scale so I can use docker. It's a waste of time to deal with the linux compatibility in FreeBSD.

With merged PR #207 and waiting PR #208 you can run rustdesk server as native service on FreeBSD. Needs less CPU/Mem than and empty running containerd and docker alone. Also it is kind of the only way to run it on FreeBSD, where containers & docker also not trivial to run. Plus this gives you the possibility to run them in jails.

@BrushXue
Copy link
Author

I can confirm now it works in jails (TrueNAS CORE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants