Comments (3)
Note that I tried to use the build-static.sh
without changing anything:
git clone https://github.com/dunglas/frankenphp
cd frankenphp
./build-static.sh
it fails after a long time running:
/bin/bash /home/www/franken-builder/dist/static-php-cli/source/php-src/libtool --silent --preserve-dup-deps --tag=CC --mode=compile x86_64-linux-musl-gcc -Iext/gd/ -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/gd/ -I/home/www/franken-builder/dist/static-php-cli/source/php-src/include -I/home/www/franken-builder/dist/static-php-cli/source/php-src/main -I/home/www/franken-builder/dist/static-php-cli/source/php-src -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/date/lib -I/home/www/franken-builder/dist/static-php-cli/buildroot/include/libxml2 -I/home/www/franken-builder/dist/static-php-cli/buildroot/lib/pkgconfig/../../include -I/home/www/franken-builder/dist/static-php-cli/buildroot/include -I/home/www/franken-builder/dist/static-php-cli/buildroot/lib/pkgconfig/../../include/libpng16 -I/include -I/home/www/franken-builder/dist/static-php-cli/buildroot/lib/pkgconfig/../../include/webp -I/home/www/franken-builder/dist/static-php-cli/buildroot/lib/pkgconfig/../../include/freetype2 -I/home/www/franken-builder/dist/static-php-cli/buildroot/lib/pkgconfig/../../include/ImageMagick-7 -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/mbstring/libmbfl -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/mbstring/libmbfl/mbfl -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/xlswriter/library/libxlsxwriter/include -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/xlswriter/library/libexpat/expat/lib -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/xlswriter/library/libxlsxio/include -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/xlswriter -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/xlswriter/include -I/home/www/franken-builder/dist/static-php-cli/source/php-src/TSRM -I/home/www/franken-builder/dist/static-php-cli/source/php-src/Zend -I/home/www/franken-builder/dist/static-php-cli/buildroot/include -D_GNU_SOURCE -D_REENTRANT -pthread -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -ffp-contract=off -fvisibility=hidden -pthread -Wimplicit-fallthrough=1 -DZTS -DZEND_MAX_EXECUTION_TIMERS -g -Os -fno-ident -fPIE -Wno-strict-prototypes -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/gd/libgd -c /home/www/franken-builder/dist/static-php-cli/source/php-src/ext/gd/libgd/gd_ss.c -o ext/gd/libgd/gd_ss.lo -MMD -MF ext/gd/libgd/gd_ss.dep -MT ext/gd/libgd/gd_ss.lo
/bin/bash /home/www/franken-builder/dist/static-php-cli/source/php-src/libtool --silent --preserve-dup-deps --tag=CC --mode=compile x86_64-linux-musl-gcc -Iext/gd/ -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/gd/ -I/home/www/franken-builder/dist/static-php-cli/source/php-src/include -I/home/www/franken-builder/dist/static-php-cli/source/php-src/main -I/home/www/franken-builder/dist/static-php-cli/source/php-src -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/date/lib -I/home/www/franken-builder/dist/static-php-cli/buildroot/include/libxml2 -I/home/www/franken-builder/dist/static-php-cli/buildroot/lib/pkgconfig/../../include -I/home/www/franken-builder/dist/static-php-cli/buildroot/include -I/home/www/franken-builder/dist/static-php-cli/buildroot/lib/pkgconfig/../../include/libpng16 -I/include -I/home/www/franken-builder/dist/static-php-cli/buildroot/lib/pkgconfig/../../include/webp -I/home/www/franken-builder/dist/static-php-cli/buildroot/lib/pkgconfig/../../include/freetype2 -I/home/www/franken-builder/dist/static-php-cli/buildroot/lib/pkgconfig/../../include/ImageMagick-7 -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/mbstring/libmbfl -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/mbstring/libmbfl/mbfl -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/xlswriter/library/libxlsxwriter/include -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/xlswriter/library/libexpat/expat/lib -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/xlswriter/library/libxlsxio/include -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/xlswriter -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/xlswriter/include -I/home/www/franken-builder/dist/static-php-cli/source/php-src/TSRM -I/home/www/franken-builder/dist/static-php-cli/source/php-src/Zend -I/home/www/franken-builder/dist/static-php-cli/buildroot/include -D_GNU_SOURCE -D_REENTRANT -pthread -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -ffp-contract=off -fvisibility=hidden -pthread -Wimplicit-fallthrough=1 -DZTS -DZEND_MAX_EXECUTION_TIMERS -g -Os -fno-ident -fPIE -Wno-strict-prototypes -I/home/www/franken-builder/dist/static-php-cli/source/php-src/ext/gd/libgd -c /home/www/franken-builder/dist/static-php-cli/source/php-src/ext/gd/libgd/gd_io_ss.c -o ext/gd/libgd/gd_io_ss.lo -MMD -MF ext/gd/libgd/gd_io_ss.dep -MT ext/gd/libgd/gd_io_ss.lo
x86_64-linux-musl-gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
make: *** [Makefile:944: ext/fileinfo/libmagic/apprentice.lo] Error 1
make: *** Waiting for unfinished jobs....
[18:11:06] [ERRO] Uncaught SPC\exception\RuntimeException: Command run failed with code[2]: cd '/home/www/franken-builder/dist/static-php-cli/source/php-src' && make -j2 INSTALL_ROOT=/home/www/franken-builder/dist/static-php-cli/buildroot EXTRA_CFLAGS='-g -Os -fno-ident -fPIE' EXTRA_LIBS='/home/www/franken-builder/dist/static-php-cli/buildroot/lib/libyaml.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libtidy.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/liblz4.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libsqlite3.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libpq.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libpgport.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libpgcommon.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libreadline.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libonig.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/liblber.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libldap.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libsodium.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libMagick++-7.Q16HDRI.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libMagickWand-7.Q16HDRI.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libMagickCore-7.Q16HDRI.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libzip.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libtiff.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libncurses.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libgmp.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libfreetype.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libjpeg.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libturbojpeg.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libwebp.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libwebpdecoder.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libwebpdemux.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libwebpmux.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libsharpyuv.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libavif.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libpng16.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libcurl.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libzstd.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libxml2.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libicui18n.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libicuio.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libicuuc.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libicudata.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libiconv.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libcharset.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libbrotlidec.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libbrotlienc.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libbrotlicommon.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libssh2.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libssl.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libcrypto.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libz.a /home/www/franken-builder/dist/static-php-cli/buildroot/lib/libbz2.a -lstdc++ -lgomp ' EXTRA_LDFLAGS_PROGRAM='-all-static' install at /home/www/franken-builder/dist/static-php-cli/src/globals/functions.php(147)
[18:11:06] [ERRO] #0 /home/www/franken-builder/dist/static-php-cli/src/SPC/util/UnixShell.php(51): f_passthru()
#1 /home/www/franken-builder/dist/static-php-cli/src/SPC/builder/linux/LinuxBuilder.php(300): SPC\util\UnixShell->exec()
#2 /home/www/franken-builder/dist/static-php-cli/src/SPC/builder/linux/LinuxBuilder.php(196): SPC\builder\linux\LinuxBuilder->buildEmbed()
#3 /home/www/franken-builder/dist/static-php-cli/src/SPC/command/BuildCliCommand.php(173): SPC\builder\linux\LinuxBuilder->buildPHP()
#4 /home/www/franken-builder/dist/static-php-cli/src/SPC/command/BaseCommand.php(101): SPC\command\BuildCliCommand->handle()
#5 /home/www/franken-builder/dist/static-php-cli/vendor/symfony/console/Command/Command.php(326): SPC\command\BaseCommand->execute()
#6 /home/www/franken-builder/dist/static-php-cli/vendor/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run()
#7 /home/www/franken-builder/dist/static-php-cli/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#8 /home/www/franken-builder/dist/static-php-cli/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#9 /home/www/franken-builder/dist/static-php-cli/bin/spc(21): Symfony\Component\Console\Application->run()
#10 {main}
from frankenphp.
On Linux, you should run the static-builder
Docker image to build the static binary. Otherwise, the host needs special preparation that is tricky to do (musl etc).
from frankenphp.
Thanks @dunglas, I'm able to build the base static binary.
Unfortunately it seems there is no way to add custom caddy modules in the final static build with your docker image right?
I need to add the following modules (with go get
or directly by editing go.mod
& go.sum
- see #976 (comment)):
- github.com/darkweak/souin/plugins/caddy@65cb24114d76a7de3f4e8c7b8ef7df3efd028899
- github.com/darkweak/souin@65cb24114d76a7de3f4e8c7b8ef7df3efd028899
- github.com/darkweak/storages/otter/caddy
According to https://frankenphp.dev/docs/static/#customizing-the-build, I can't see any env vars to specify extra caddy modules as we can do for php extensions for instance.
Don't hesitate to tell me if I'm wrong (and how to do this) but it seems that it's currently impossible to have a static build of frankenphp with custom caddy modules.
I tries to edit locally https://github.com/dunglas/frankenphp/blob/main/caddy/go.mod without no effect at all, it seems everything come from your docker image dunglas/frankenphp:static-builder
from frankenphp.
Related Issues (20)
- [QUESTION] Is frankenphp can be use to pipelines ? HOT 6
- Worker mode - objects are not resetted after finish one request HOT 1
- Non 200 responses on 1.2.3 HOT 10
- Question: How do you handle Runner errors? HOT 9
- Laravel HMR not working HOT 8
- should stdin be the request body?
- Segmentation fault /usr/local/bin/frankenphp php-cli ${args[@]} HOT 1
- Inconsistency in environment variables HOT 5
- Strange issues with file-descriptors HOT 2
- worker is not restarting when using xdebug on symfony project HOT 6
- Can't run Caddy with HTTP cache HOT 10
- thrown in /app/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php HOT 2
- "No Active Transaction" Error After Reconnecting Database in Worker Mode HOT 1
- curl.cainfo setting from php.ini is being ignored and thus certs aren't available to cURL HOT 20
- Allow a way to define scripts to be run regularly or as a service HOT 2
- Question: about task scheduling in laravel HOT 1
- Deploying on render.com
- XDebug toggling optimizations HOT 4
- Error after build process HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frankenphp.