opencode.ai

I once briefly came across github fork for OPENCODE but it had no FreeBSD specific info (early stage fork attempt?) but I can't find it anymore (got deleted?).
Does anyone know of a way to get opencode running on FreeBSD natively without linuxlator or bhyve?
Thanks

open_code.png
 
LLM wizard is unfortunately high on mushrooms or something. Keeps lying, that it can be installed on any OS and confuses it repeatedly with the other opencode software.

So... download the source code and try to compile it and get it to run?

Completely lost why people don't do this any more. Literally -- we would receive and/or download the source code "just like this" to whatever platform we were using, make whatever software changes were required, get it to compile and run and .. then you are all good for like... forever !

Do you think we all sat around waiting for "someone else" to get source code running for us instead?

Or the AI to get updated to do it for us?
 
So... download the source code and try to compile it and get it to run?

Completely lost why people don't do this any more. Literally -- we would receive and/or download the source code "just like this" to whatever platform we were using, make whatever software changes were required, get it to compile and run and .. then you are all good for like... forever !

Do you think we all sat around waiting for "someone else" to get source code running for us instead?

Or the AI to get updated to do it for us?
Asking on a forum if someone already did it or knows about someone who did takes minutes.
I am old. My days are short.
 
Asking on a forum if someone already did it or knows about someone who did takes minutes. I am old. My days are short.
Asking on a forum if someone already did it or knows about someone who did takes minutes.
I am old. My days are short.
I'm about to try. I'll let you know.

EDIT1: I just found that I have about 400K left in my root drive. Gonna need to fix that when I can. I'll let you know when I can continue on. So far, I've installed ubuntu compatibility and am trying that rout. All of the standard install instructions failed with architecture complaints.
 
I once briefly came across github fork for OPENCODE but it had no FreeBSD specific info (early stage fork attempt?) but I can't find it anymore (got deleted?).
Does anyone know of a way to get opencode running on FreeBSD natively without linuxlator or bhyve?
Thanks
You're thinking of skywalk163. That project (to my knowledge) never worked. Looks like a raw fork. I briefly started working on it this morning. Not that easy since it seems to rely on bun, and there doesn't seem to be a way to make bun work on freebsd.
I tried the linux emulation way, but got prctl option 42 and 41 errors that seem emulator related...

I'll let you know if I get it working (i'll github it), but if you or anyone can make it work first I'd love to know.
 
Update: I've been busy at work and rebuilding the engine in my work truck, so I wasn't able to try again until today. I got the Debian bookworm compat layer up and working, and technically installed, but pic related is the result. I'll keep picking at it when I can, but this wasn't a very promising end state.
 

Attachments

  • opencodefail.jpg
    opencodefail.jpg
    189.6 KB · Views: 16
After trying to run pretty much every agent, the only one that worked (for me) out of the box was claude. I installed it through npm

pkg install nodejs npm
npm install -g @anthropic-ai/claude-code

Then I had to mess with the path and the config for the provider (I source from lm studio on my own network). Otherwise it wants you to login which I don't.

My goal was to bootstrap any agent to vibe-code the migration of hermes. Since my goal is done, I won't be working on the opencode problem, but if people need help setting up claude, well, try AI first, but I took notes so feel free to ask.
 
Opencode needs Bun and Bun does not support FreeBSD. There was preliminary support for FreeBSD being added to Bun back in November, but it wasn't functional and just messed up their CI so they ripped it out. I've tried to patch it back in but it has been an uphill battle.

Also Bun requires Bun to build itself, another annoying problem. And Bun relies on Zig, but not even a specific Zig release -- they rely on a custom Zig build instead of a release (Zig is already a moving target right now) which doesn't match the functionality of any existing Zig release. So they're essentially using a forked version of Zig.

It's a real mess. I put in several hours of work without much to show for it.

edit: I just found someone reported they got Bun to build on FreeBSD, so maybe there's a chance now...
 
OpenCode also has an interesting approach to security:

 
I can't find details about what it is. Any English txt file that covers that? For open source, they seem to love branding. No wikipedia entry? It can be used offline without any paid AI service? I would like that, a decentral distributed learning system.
 
I managed to get bun built but had to workaround some errors, likely due to changes since the script/patches were written: https://github.com/8ff/bun-freebsd/issues/1

something is still not quite right though. I was in the process of building opencode with this copy of bun and got a SIGILL. I noticed in the build output for some reason there was --march=haswell being used. Not entirely sure where this came from because I'm on an AMD Ryzen. My current guess is that there's a bug in their fork of Zig which has CPU detection but I should be able to turn off building for native CPU arch... will report back if I can solve this
 
With this degree of trouble, would it actually be less work than building a simple native program? We're just passing though json, right?

***

On a side note, I tried sidestepping the problem by installing vs code and using copilot through that. It also failed with its own set of problems.
 
Back
Top