Comments (11)
When I try to run ./spc build ffi,mbstring,sodium --build-micro -I "ffi.enable=true" I get the following error:
- Download all sources command (with different PHP version):
./spc download --all --with-php=8.3
- Download sources for extensions and dependencies:
./spc download --for-extensions=ffi,mbstring,sodium
I tried to use the GitHub Actions built micro, but I get the following error when trying to execute:
Now Linux is purely statically compiled, and it cannot support methods such as ffi/dl and other dynamic linking methods for other libraries. If you are using macOS micro, you can use ffi and dl.
By the way, Linux can actually support standalone PHP binary that are not fully statically linked and can use ffi/dl, but currently the main branch does not provide an option (because of glibc).
I assume it's because ffi.enable needs to be true instead of preload
The -I
parameter to specify the required ini config when compiling or combining micro.sfx. (Docs)
I tryied cloning the repository into source folder
I just noticed this problem too. It seems that the freedesktop.org website is down. I have copied a previous source code archive to dl.static-php.dev, I'm working on #64 right now and will merge it soon, which contains the address to modify the pkgconfig download.
If you need to compile now, you can use ./spc download --all -U pkg-config:https://dl.static-php.dev/static-php-cli/deps/pkg-config/pkg-config-0.29.2.tar.gz
command to temporarily replace the download link of pkgconfig.
from static-php-cli.
The documentation will be updated. static-php/static-php-cli-docs#7
from static-php-cli.
Now Linux is purely statically compiled, and it cannot support methods such as ffi/dl and other dynamic linking methods for other libraries. If you are using macOS micro, you can use ffi and dl.
I don't think I understood this correctly.
If I can't correctly use FFI, should it be "yes" here?
from static-php-cli.
I was able to build and create the standalone file, but I got into the FFI error you mentioned:
Fatal error: Uncaught FFI\Exception: Failed loading 'libtcl8.6.so' (Dynamic loading not supported)
Is there a way around it? 😳
from static-php-cli.
If I can't correctly use FFI, should it be "yes" here?
You didn't mention what type of operating system you are using (Linux or macOS), so I explained the different features of different systems.
To put it simply, currently only static-php under macOS can use ffi/dl, and Linux cannot.
from static-php-cli.
You didn't mention what type of operating system you are using
I'm sorry. It's Linux.
To put it simply, currently only static-php under macOS can use ffi/dl, and Linux cannot.
So this should say "no" on the ffi line for Linux column, right?
from static-php-cli.
So this should say "no" on the ffi line for Linux column, right?
For linux, no.
from static-php-cli.
For linux, no.
"no" as in it should not say "no"? Even though you just mentioned it doesn't work? 🤔
from static-php-cli.
"no" as in it should not say "no"? Even though you just mentioned it doesn't work? 🤔
With the current main branch and project structure, we cannot directly build a php
that can use ffi
. So for your requirement it is no.
It is possible to use ffi on Linux, but it will not be considered at this time.
from static-php-cli.
That's my point: The doc should say that FFI for Linux isn't supported, right?
from static-php-cli.
To be precise, it doesn't work, but it can be supported. Because ffi itself can be compiled inline into PHP, it means that it is supported, but it is another matter that it cannot be used. This has something to do with the limitations of the Linux kernel and has nothing to do with PHP.
But you're right, I shouldn't describe linux ffi as yes without any comments inside the documentation.
from static-php-cli.
Related Issues (20)
- 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 6
- micro:combine在windows下生成的可执行文件中文乱码 HOT 3
- Extension request: curl on Windows HOT 1
- memory leak:zend_mm_heap corrupted HOT 5
- Technical details & code preservation HOT 1
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.