-
-
Notifications
You must be signed in to change notification settings - Fork 234
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 Support Not Working - "Current OS is not supported" #413
Comments
|
If the message could be updated to say use the builtin I'm getting an error on build
|
Seems related to #380 (comment) . Few people are currently using static-php on FreeBSD, many problems may not have been solved (those that have been solved on Linux or macOS). If you work on and use FreeBSD, I hope you can create a new issue or modify this issue to a Bug & TODO list to track FreeBSD related issues. FreeBSD lacks CI and I can only use local testing, updates may be slower than on other systems. |
I think I'm going to try a different path and see if I can get the existing ports system to statically build everything. Looking at the SPC code it appears that most of the build infrastructure for SPC appears to be toggling configure and build flags, which the native ports system is already built to do. We'd just need to add STATIC=YES support to those dependent packages that don't support it. If that works, I'll then try to hook SPC into that. |
@arcanumbridge I don't know much about FreeBSD's compilation environment, but many libraries on Linux don't like to be compiled statically. It would be best if most libraries supported static compilation on FreeBSD with a simple |
Yeah, pretty much, with a few small tweaks. I've just done a couple ports skeleton Makefile modifications (iconv, libxml2, pkg-config), but so far it's just adding the STATIC knob to push |
I tried building static-php again on my local FreeBSD virtual machine today. There are still many link errors. The only thing I can confirm now is that the build issue with pkg config can be fixed: #426 I'm thinking it's time to refactor BSDBuilder. Also, I don't actually know if I should link them completely statically (statically link all, including system libc, libm, libutil) or just dynamically link system libs. |
I'd recommend leaving the system libs as dynamically linked (for now). FreeBSB does a pretty good job with backwards compatibility when you upgrade the OS, and there are always the compat packages to deliver older system libs to new systems. Even for the embedded/NanoBSD system, we can ensure the proper system libs are included. Getting the system libs correctly statically linked is possible (all systems have /rescue that is fully statically linked), but again leveraging the FreeBSD source build system would be the way to do this without having to create a bunch of duplicated code you'd then have to maintain. I'm slowly working on putting the pieces together. The goal is to get a statically linked php + frankenphp + crunchgen to create a single binary I can deliver. |
I've attached a diff for the php82 port skeleton. This will just get you a basic static PHP binary and embed lib with the default modules (for the FreeBSD port) compiled in. You'll need rebuild libxml2 with the STATIC option. |
Just an update. I'm currently working with the FreeBSD php ports maintainer to develop a skeleton similar to the above attachment for official inclusion in the tree. We're hoping to complete this sometime during the summer. eg. |
@arcanumbridge Do you know of any way to support Actions or hook into other CIs for testing FreeBSD builds? |
@crazywhalecc Does github support hosted third-party runners? We use gitea internally via act-runner for GitHub/Gitea Actions support with our internal gitea instance. I'm good to have it connect directly to github for actions support if there is compatibility. We have some spare resources at our datacenter we can allocate to this effort. If that doesn't work, we could also setup a mirrored git repo to our gitea instance and connect the act-runner to that to process the workflows. |
Oh, cool! I wasn't aware that gitea Actions had support for FreeBSD. GitHub Actions is not currently supported yet. But I think the best way is to have a way to connect directly to the GitHub workflow, because then you can see the success and failure of the PR. |
See #152 FreeBSD section. And sorry for suspending FreeBSD maintenance. One of the main reasons is that very few people use it. I will start working on this once there is a CI workflow or someone can provide an answer to the static compilation issue for FreeBSD. I will open this issue again when I start working on this.
|
I'm trying to build this on FreeBSD 14.0 and it is failing with an unsupported OS message.
If you know who worked on the FreeBSD support so I can reach out to them directly.
The text was updated successfully, but these errors were encountered: