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

Building Codex on FreeBSD #913

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

easye
Copy link

@easye easye commented Sep 24, 2024

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.

After the build fails, patch the Rust target under <file:.cargo/> with

```shell
patch -p1 < $NIM_CODEX_ROOT/docs/notes/wasmer-vm-2.3.0-freebsd-amd64.patch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an already patched version of wasmer that builds on FreeBSD, I would very much like to avoid the manual patching. Other than that, this is great!

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

Successfully merging this pull request may close these issues.

2 participants