codex-storage / nim-codex

Decentralized Durability Engine
https://codex.storage
Apache License 2.0
69 stars 25 forks source link

Building Codex on FreeBSD #913

Open easye opened 2 months ago

easye commented 2 months ago

A pull request to encapsulate what I learned building Codex for freebsd-14.1 (amd64).

I wouldn't recommend considering merging this request as-is, as A) this is my first experience at patching Nim/Nimbus codebases, and B) the actual changes have more to do with patching codex dependencies than modifying Codex itself.

This pull request contains:

  1. Documentation of necessary additional FreeBSD system packages in BUILDING.md
  2. Modification to linking to overcome what I think is a problem in the circom-compat-ffi Rust crate in failing to include /usr/lib/libutil.a for its usage of kinfo_* interfaces
  3. A patch to the Rust wasmer-vm-2.3.0 dependency for amd64 architecture (an obvious mistake in the Rust source that is fixed in subsequent releases.

I would be happy for feedback on how to fix the problems in a smoother manner.