Skip to content

add ./install_dependencies.sh script, update build commands #1603

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

henderkes
Copy link
Contributor

maybe instead of #1565?

@henderkes
Copy link
Contributor Author

I would also like to add information that the recommended way to build FrankenPHP is with xcaddy, given that users will expect mercure, vulcain and brotli to work.

Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

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

I'm not sure that's a good idea to include this script. End users should use the packages provided by their distributions for these dependencies, when available.

@@ -0,0 +1,78 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

It should be install-depdendencies.sh for consistency with other scripts.

Also, is bash really necessary? Alpine doesn't have Bash by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, bash is necessary for the way the script is written. I could rework it to work with posix shell, if you want, but I chose bash because build-static and build-packages also use bin/bash.

@henderkes
Copy link
Contributor Author

henderkes commented Jun 2, 2025

I'm not sure that's a good idea to include this script. End users should use the packages provided by their distributions for these dependencies, when available.

I'm not sure if that's a good idea. Wtr-watcher doesn't exist as a package as far as I know and while brotli does exist, the brotli-devel static library is built without -fPIC, meaning it fails static linking and falls back to shared linking against libbrolienc, libbrotlidec and libbrolicommon.so. Users will end up with a frankenphp that links against shared libraries that they most likely won't have installed on their production system.

The worst part is that gcc falls back to linking against the shared libraries silently. A user will never know why it depends on libbrotli's shared libraries unless they use ldd and know about gcc's linking intricacies.

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.

3 participants