-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
PECL Windows Build Fails (Missing Dependencies on Build Server) #22
Comments
Thank you very much @P2T we'll try to figure this out |
I think that the cause is a missing dependency, but I know absolutely nothing about how the pecl website builds Windows binaries, and how additional dependencies can be configured. |
It seems this extension requires several libraries, but these dependencies are not checked during configuration on Windows (in config.w32). These checks would fail for PECL builds, though, since these libs are not available at https://windows.php.net/downloads/pecl/deps/. I'll see what I can do. |
Thank you @cmb69! We appreciate the help - let us know what we can do on our end! |
Not installed on Docker php:8.0.12-fpm-alpine3.14 |
The instructions say what should be installed like this |
What's the error you are having? |
Thank you. The problems was solved by installing the dependencies |
You need to install a couple of system libraries (for example like this), but it's much easier to use https://github.com/mlocati/docker-php-extension-installer |
Can this problem be also solved ? |
I tried to build OpenBLAS on Windows a while ago, but failed miserably. I have not been able to find usable prebuilt binaries either. Any pointer would be appreciated. |
@cmb69 can't we use the lib/dll/.h files that come from assets attached to https://github.com/xianyi/OpenBLAS/releases ? |
@mlocati, thanks for the hint! That seems to work for the vs16 builds, but apparently hangs for the vc15 builds (likely it is because they used VS 2019 for compiling/linking, but maybe I screwed something up). I need to check out the details tomorrow, and will then do a snapshot build of the latest PECL package, so that it can be tested before I do a release build. |
Without a respective lib, linking would inevitably fail. We also add a check for cblas.h, and if either is not found, disable ext/tensor with a respective warning. See also <RubixML#22>.
This is super ugly! There's no way to link a v142 built lib with v141, so we can't use these binaries for PHP < 8.0.0. Furthermore, PECL builds won't work even for PHP ≥ 8.0.0, because we're using the 16.9 toolset, but those binaries have been built with the 16.8 toolset, and PECL builds do a full in-tree build. So without other OpenBLAS binaries, we can only have phpize builds of tensor for PHP ≥ 8.0.0 on Windows. Oh, and this only works, if we patch lapack.h, because MSVC doesn't support the Anyhow, I've made the modified packages available as pecl/deps, and submitted PR #24, which allows for phpize builds. You can get prebuilt Windows packages; please test these, but do not use them in production! |
I've tried them on Windows 10, PHP 8.0.10, it seems to be OK. Thank you. |
Without a respective lib, linking would inevitably fail. We also add a check for cblas.h, and if either is not found, disable ext/tensor with a respective warning. See also <#22>.
Replying to #24 (comment) here, because that PR discussion has been locked by the bot. I'm afraid there is no documentation regarding the configuration on Windows. It is basically a partial port of GNU autoconf to JScript running on the Windows scripting host. Most of the GNU autoconf macro replacements are defined in confutils.js; the main script to build the configuration is buildconf.js. Anyhow, the patch in PR #24 is about checking for the OpenBLAS library actually being available, and to let the build fail otherwise. More importantly, though, Lines 7 to 9 in ebef514
Note that the PHP Windows buildsystem does not use pkg-config. BTW, I think this ticket can be closed after PR #24 has been merged. |
Oh sorry about that, I'll have to find a way to allow comments on merged PRs. Thanks for the explanation, it really helps alot! We still need to figure a way to patch the |
Hello |
Hi! |
I've managed to build it for php 7.4 nts x64 for windows: https://github.com/federicoemartinez/Tensor/releases/tag/3.0.1 |
This does not work for me. |
Where did you put libopenblas.dll? Try placing it in the same directory as php.exe if you put it in the ext directory. |
|
I'm using ts version of php 7.4. Is it an issue? |
@federicoemartinez Thanks a lot. solved the issue by using nts version of PHP 7.4. Could you please make a ts version of the tensor build for windows please? |
I'll try, but I'm going on vacations right now so it will have to wait. |
That's great. Waiting for your ts release. |
@federicoemartinez I have tried several time but could not use the .dll of PHP 8.1 (nts). It does not show any error. Is it not ready? |
Hello @federicoemartinez Could you please make a ts version? |
In the investigation of the build failures I came across this issue. RubixML/Tensor#22 In that issue user federicoemartinez was able to get the build to work with this workflow file. https://github.com/federicoemartinez/Tensor/blob/master/.github/workflows/php7.4-windows I'm testing that out as a possibility for building with PHP 8.2. If that succeeds then I will try more versions of PHP.
In the investigation of the build failures I came across this issue. RubixML/Tensor#22 In that issue user federicoemartinez was able to get the build to work with this workflow file. https://github.com/federicoemartinez/Tensor/blob/master/.github/workflows/php7.4-windows I'm testing that out as a possibility for building with PHP 8.2. If that succeeds then I will try more versions of PHP.
Hey @takielias I'm not sure if you ever got it to build. It took me many tries and a few days, but I did get it to work. https://github.com/jb-lopez/php-extensions-windows/releases/tag/Tensor |
That's a great help. Thanks a lot. Great contribution. I really appreciate your work. |
All versions fail to compile
fatal error C1083: Cannot open include file: 'cblas.h': No such file or directory
See https://windows.php.net/downloads/pecl/releases/tensor/
The text was updated successfully, but these errors were encountered: