-
-
Notifications
You must be signed in to change notification settings - Fork 349
Sapi/frankenphp prerequisites #775
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
Conversation
src/SPC/builder/BuilderBase.php
Outdated
| if (!$this->getLib('libxml2')) { | ||
| throw new WrongUsageException('FrankenPHP SAPI requires libxml2 library, please include `xml` extension in your build.'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a requirement on macos? FrankenPHP itself doesn't need libxml2, it needs brotli and watcher for all the default functionality, but that's what -nowatcher and -nobrotli tags are for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. When I build only one extension without dependencies, it fails to build, saying it can't find libxml-2.0. But this seems to be a problem with FrankenPHP itself. It will force add the system's homebrew and /usr/local directories as LDFLAGS, which will make the spc build unstable. I don't know much about FrankenPHP's build system, but it seems to hardcode the LDFLAGS in the go source.
EDIT: libxml2 missing seems not related to hardcoded LDFLAGS things. These are two problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems to be macos specific then? I'm able to build without libxml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dunglas https://github.com/php/frankenphp/blob/main/frankenphp.go#L17
why are libxml2 and the brew paths required on MacOS? This may introduce problems with potentially linking to dynamic libraries or oldrr versions, depending on the order the linker iterates through the library paths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may also introduce issues on linux when a user has the php-devel package installed
is there a way to make Go ignore these linker comments?
What does this PR do?
Some framework updates and refactoring frankenphp deps download method.
Checklist before merging
*.phpor*.json, run them locally to ensure your changes are valid:PHP_CS_FIXER_IGNORE_ENV=1 composer cs-fixcomposer analysecomposer testbin/spc dev:sort-configsrc/globals/test-extensions.php.extension testortest extensionsto trigger full test suite.