Open Anecho opened 2 years ago
Is there a known solution to this? I'm running into the same problem with PHP 8.1.10 on Alpine 3.16. I also have lapack-dev
installed.
@Kabingeran Why would anyone message you privately to discuss this topic? Just post your solution here if you have one
@adrianguenter In each case, it will probably be different. Why write to me in private? To get your solution. Well, try making symbolic links. This should help.
@adrianguenter In each case, it will probably be different. Why write to me in private? To get your solution. Well, try making symbolic links. This should help.
What symbolic links do you mean? I have exactly the same issue when trying to build the extension from source.
@epoxa Yeah, I don't know why they're being so cryptic. There's definitely a general purpose solution to this, so if they've solved it I wish they'd just share it with the community.
There is no universal solution. Try installing lapack with the specified version and making symlinks if needed. There are several deprecation errors after installing on 8.1. No need to install on 8.1 yet.
Most things can be generalized to a certain degree, though, and I'm sure that is the case here as well. You're being intentionally cryptic for some strange reason.
You need to know the Alpine version you are using (cat /etc/os-release
):
lapack
, lapack-dev
, openblas-dev
apk packageslapack
, lapack-dev
, openblas-dev
apk packages and you need to run
ln -s /usr/lib/liblapacke.so.3 /usr/lib/liblapacke.so
liblapack
, lapack-dev
, openblas-dev
apk packagesPS: if and once #39 will be merged, and a new version is published on PECL, I can update my install-php-extensions
script so that you can install tensor very easily.
It seems PECL has been updated. For Alpine in Docker this worked for me:
RUN apk add --no-cache openblas-dev libexecinfo-dev lapack=3.10.1-r0
RUN ln -s /usr/lib/liblapack.so.3 /usr/lib/liblapack.so \
&& ln -s /usr/lib/liblapacke.so.3 /usr/lib/liblapacke.so
RUN pecl install tensor
RUN docker-php-ext-enable tensor
Yep, that works. You an also check here to see what should be done in order to have the correct apk (and apt) dependencies:
https://github.com/RubixML/Tensor/blob/master/.github/workflows/ci-ext.yml#L40
@Kabingeran you can also use this script of mine to install tensor (and a ton of other PHP extensions) without having to worry about the system requirements (apk/apt libraries, symbolic links, and so on). Simply write
install-php-extensions tensor
and you are done.
I tried it on Alpine 3.16. It is unlikely that anyone will need older versions.
Alpine 3.19:
RUN apk add --no-cache openblas-dev lapack-dev
RUN pecl install tensor
RUN docker-php-ext-enable tensor
Versions according to https://pkgs.alpinelinux.org/packages
.Dockerfile for
pecl install tensor
Error from
pecl install tensor
:Fixed by
apk add libexecinfo-dev
https://github.com/awslabs/aws-lambda-cpp/issues/124#issuecomment-968302646But then other error pops up:
musl/bin/ld file is there.
Also tried building from source - same error on
make
step pops up..Dockerfile for
build tensor from source
Error from
build tensor from source
:What am I missing here?