Skip to content

tunnel-node is not compatible to compile for freebsd #820

@amirseyedian

Description

@amirseyedian

Im trying to compile tunnel-node to use on router operation systems like PfSense or OPNSense which is based on free bsd but due to C library dependencies cannot be build and facing this error

Steps to reproduce

.cargo/config.toml

[target.x86_64-unknown-freebsd]
linker = "rust-lld"

rustup target add x86_64-unknown-freebsd
cargo build --release --target x86_64-unknown-freebsd

error: linking with `rust-lld` failed: exit status: 1
  |
  = note:  "rust-lld" "-flavor" "gnu" "<1 object files omitted>" "--as-needed" "-Bstatic" "<sysroot>/lib/rustlib/x86_64-unknown-freebsd/lib/libcompiler_builtins-*.rlib" "-Bdynamic" "-lrt" "-lutil" "-lexecinfo" "-lkvm" "-lmemstat" "-lkvm" "-lutil" "-lprocstat" "-lrt" "-ldevstat" "-lexecinfo" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lrt" "-lutil" "-lexecinfo" "-lkvm" "-lmemstat" "-lkvm" "-lutil" "-lprocstat" "-lrt" "-ldevstat" "-L" "/root/tunnel-node/target/x86_64-unknown-freebsd/release/deps/rustcS2s4mC/raw-dylibs" "--eh-frame-hdr" "-z" "noexecstack" "-o" "/root/tunnel-node/target/x86_64-unknown-freebsd/release/deps/tunnel_node-04911b498adcf914" "--gc-sections" "-pie" "-z" "relro" "-z" "now" "-O1" "--strip-all"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: rust-lld: error: unable to find library -lrt
          rust-lld: error: unable to find library -lutil
          rust-lld: error: unable to find library -lexecinfo
          rust-lld: error: unable to find library -lkvm
          rust-lld: error: unable to find library -lmemstat
          rust-lld: error: unable to find library -lkvm
          rust-lld: error: unable to find library -lutil
          rust-lld: error: unable to find library -lprocstat
          rust-lld: error: unable to find library -lrt
          rust-lld: error: unable to find library -ldevstat
          rust-lld: error: unable to find library -lexecinfo
          rust-lld: error: unable to find library -lpthread
          rust-lld: error: unable to find library -lgcc_s
          rust-lld: error: unable to find library -lc
          rust-lld: error: unable to find library -lm
          rust-lld: error: unable to find library -lrt
          rust-lld: error: unable to find library -lpthread
          rust-lld: error: unable to find library -lrt
          rust-lld: error: unable to find library -lutil
          rust-lld: error: unable to find library -lexecinfo
          rust-lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
          

error: could not compile `mhrv-tunnel-node` (bin "tunnel-node") due to 1 previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions