Comments (9)
关键就是修改这个文件 https://github.com/crazywhalecc/static-php-cli/blob/main/config/ext.json
修改 lib-depends 项 或者 lib-suggests 项
例子:
"gd": {
"type": "builtin",
"arg-type": "custom",
"arg-type-windows": "with",
"lib-depends": [
"zlib",
"libpng"
],
"ext-depends": [
"zlib"
],
"lib-suggests": [
"libavif",
"libwebp",
"libjpeg",
"freetype"
]
},
from static-php-cli.
我指的是这样的编译选项:CFLAGS='' CC='x86_64-linux-musl-gcc -static -idirafter /software/spc/buildroot/include -idirafter /usr/include/ -idirafter /usr/include/x86_64-linux-gnu/ ' ./Configure no-shared zlib --prefix=/ --libdir=lib -static --with-zlib-include=/software/spc/buildroot/include --with-zlib-lib=/software/spc/buildroot/lib no-legacy linux-x86_64
from static-php-cli.
[15:27:06] [INFO] enabling gd without library libavif
[15:27:06] [INFO] enabling gd without library libwebp
[15:27:06] [INFO] enabling gd without library libjpeg
[15:27:06] [INFO] enabling gd without library freetype
指定了--with-libs=libwebp,但enable-gd的时候仍然是without library libwebp
这个编译选项没有找到在什么地方修改
from static-php-cli.
指定了--with-libs=libwebp,但enable-gd的时候仍然是without library libwebp
只要编译 gd
扩展时包含了 --with-libs=libwebp
,就会启用 webp 支持。我刚才试了下是这样的。不过你上面提到的 log 中显示 without library libwebp 确实是个问题,但仅限于显示,后面我会修复显示问题。
from static-php-cli.
指定了--with-libs=libwebp,但enable-gd的时候仍然是without library libwebp
只要编译
gd
扩展时包含了--with-libs=libwebp
,就会启用 webp 支持。我刚才试了下是这样的。不过你上面提到的 log 中显示 without library libwebp 确实是个问题,但仅限于显示,后面我会修复显示问题。
我检查了日志里面EXEC里的./configure,编译选项里的确没有--with-webp,但是编出来的cli文件的确-i里有webp,很奇怪。另外把configure命令重新到php-src里执行,不能检测通过libevent_core
checking PHP version... PHP 8.x
checking for include/event2/event.h... found in /software/spc/buildroot
checking for libevent version... ok
checking for event_free in -levent_core... no
configure: error: event_free not found in event_core library, or the library is not installed
from static-php-cli.
指定了--with-libs=libwebp,但enable-gd的时候仍然是without library libwebp
只要编译
gd
扩展时包含了--with-libs=libwebp
,就会启用 webp 支持。我刚才试了下是这样的。不过你上面提到的 log 中显示 without library libwebp 确实是个问题,但仅限于显示,后面我会修复显示问题。我检查了日志里面EXEC里的./configure,编译选项里的确没有--with-webp,但是编出来的cli文件的确-i里有webp,很奇怪。另外把configure命令重新到php-src里执行,不能检测通过libevent_core
checking PHP version... PHP 8.x checking for include/event2/event.h... found in /software/spc/buildroot checking for libevent version... ok checking for event_free in -levent_core... no configure: error: event_free not found in event_core library, or the library is not installed
这个问题解决了,原因是putenv设置的环境变量没有用export等效设置到shell当中。
现在在shell下靠手动加了--with-webp编译选项,额外添加了libwebp.a lib libsharpyuv.a,成功编译了自己需要的静态cli和fpm。但是对项目结构还不熟悉,不知道在什么地方修改,没法提PR
from static-php-cli.
我刚才试了下这个 log 提示的问题,似乎最新的分支没有这个问题。而且目前除了还没有关闭的几个 Issue 涉及的扩展外,其他扩展应该都可以正常使用,不需要修改任何代码。
from static-php-cli.
from static-php-cli.
试了很多次 spc
二进制,似乎也都没有你提到的问题。
另外,关于这个 Issue 的标题,你可以参考刚才提交的对于 uv 扩展的支持和 redis 额外特性的支持修改了哪些文件,这是典型的扩展和依赖库添加的改动。#296 #295
from static-php-cli.
Related Issues (20)
- FreeBSD Support Not Working - "Current OS is not supported" HOT 10
- bug: Linux x86_64 build failed HOT 6
- Compiled Windows executable isn't running HOT 1
- Windows Defender SmartScreen HOT 4
- SSL operation failed with code 5 HOT 10
- In extreme cases micro.sfx using `--with-upx-pack` will build the wrong binary
- Extension request: `gd` on Windows
- postgresql: Failed to get pkg-config information HOT 3
- ncurses 6.5 not working with libreadline
- xz build failed on Linux and macOS
- download bug: for-extensions=redis does not download zstd
- Extension request: `intl` on Windows HOT 2
- `intl` ICU build errors HOT 2
- SAPI embed Support on Windows HOT 2
- Add the parallel extension HOT 3
- Doc: remove `untested` type for extension list
- Put extension and library compatibility checks before compilation
- Build PHP 7.4 without micro is buggy now, but 7.4 does not support micro
- Added Expanding webview for linux HOT 2
- micro:combine在windows下生成的可执行文件中文乱码 HOT 3
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 static-php-cli.