-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
macOS build issues (M1) #840
Comments
I'm much more inclined to say there is something wrong with your environment since static builds in CI appear to work fine. That being said, getting an environment in the right conditions when you're trying to do it on a computer you actually need to work on can be a bit frustrating (from experience). I highly recommend using a build environment specific to building this (such as a VM or CI). That being said, it seems you resolved most of your issues? I'm unclear what the actual issue is here. You say the issue is Can you clarify what issue you're running into? |
It's maybe a bug in the extension detection system of our shell script. Could you try to explicitly set For the slow builds, try to disable UPX. |
I've run into three different problems here, the logs for the GH template are just the first one.
I didn't, I gave up on the third and though it might be worth opening this issue as I surely can't be the only one with this problem. I get the impression macOS support isn't a priority, and I agree it shouldn't really be since prod is most likely going to be the linux build for most, but it's still worth having this report at least posted so others can follow the same trail.
Sorry I wasn't clear in my description, I did do that and stripped out the defaults by hand. Then I got down to issue #2. Yes on my todo list for next time is not using UPX. |
The warnings are not important and can be safely ignored. Issue 2 is weird and looks like a static-php-cli issue when building the zip extension (it happens). Could you try deleting entirely the Anyway, we need to do a patch to filter out builtin extensions (like |
The search path ones? It wouldn't proceed with the build until I resolved that. The bzip and search path issue went away when I removed the
Yep. I wouldn't mind taking a crack at it over the weekend with some bash-fu as well.
Same as issue 3 before - still goes all the way to |
It seems it's compiling zip extension with bzip2 support, and compile again without bzip2 problem. Just make sure every different combination of extensions has a clean buildroot ( If you still get the same error when compiling, you can turn on full output logging and find all the arguments to the bin/spc build command line and print them out. |
🤷♂️ That error only happens when those linker warnings are also present, and again removing here's the full output that I have, starting from a clean buildroot.
|
@nikspyratos Could you provide this line of log (
EDIT: Issue 1 |
Nice! Here's the log:
|
I just figured out what was causing the bzip2 link error.
|
That worked! Thanks! For this specific issue, I think it can be closed now, but I believe there are some lingering issues about how extensions are pulled/listed from the embedded application (at least on the local app) The build was successful, but since it was completely relying on the output of So perhaps trying to auto-parse the extensions from a project isn't going to be as accurate as originally hoped, since many project dependencies don't include accurate extension requirements. |
That's a good opportunity to fix the It's always possible to use the environnement variable for specific needs. |
100%. Will keep playing around with this, thanks for all the help! |
What happened?
Heyo. Been playing around with static builds. Got the Linux one with Docker working fine - though haven't yet tested the binary, and the build was suuuuper slow (#835). Next I wanted to try out the macOS build. Been fighting through a few issues and I'm at the point where this stuff is above my head. If nothing else I'd like to report this I'm also using Laravel Herd, which AFAICT is a normal build of PHP.
Issue 1:
composer check-platform-reqs
(added in 404086d) has a chance to put builtin PHP extensions in thePHP_EXTENSIONS
var, and./bin/spc
seems to not be happy with that (on macOS at least). Stripping out the builtins from the extensions list seems to solve the problem.Issue 2:
Once the extensions thing was fixed, the go build failed because something about how the
CGO_FLAGS
variable is built duplicates search paths for the linker. After some consultation with Claude AI, it suggested removing thesed
part, which worked for me.The error was:
Issue 3:
Lastly, I'm getting the same
./frankenphp.h:4:10: fatal error: 'Zend/zend_types.h' file not found
error as in #825. At this point I gave up. From that issue and the compile docs linked, it suggests that the static builds are an alternative to compiling from sources, so my understanding is that I shouldn't need to go as deep as downloading the PHP source for this?Build Type
Custom (tell us more in the description)
Worker Mode
No
Operating System
macOS
CPU Architecture
Apple Silicon
PHP configuration
Relevant log output
The text was updated successfully, but these errors were encountered: