crazywhalecc / static-php-cli

Build standalone PHP binary on Linux, macOS, FreeBSD, Windows, with PHP project together, with popular extensions included.
https://static-php.dev
MIT License
1.33k stars 233 forks source link

libavif build fails because it needs libyuv #503

Closed dunglas closed 4 months ago

dunglas commented 4 months ago

It looks like libavif now needs libyuv to build:

#34 585.8 [09:31:06] [INFO] [EXEC]  cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_BINDIR=/bin -DCMAKE_INSTALL_LIBDIR=/lib -DCMAKE_INSTALL_INCLUDEDIR=/include -DCMAKE_TOOLCHAIN_FILE=/go/src/app/dist/static-php-cli/source/toolchain.cmake -DBUILD_SHARED_LIBS=OFF ..
#34 585.8 [09:31:06] [DEBU] Running command with direct output: cd '/go/src/app/dist/static-php-cli/source/libavif/build' &&  cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_BINDIR=/bin -DCMAKE_INSTALL_LIBDIR=/lib -DCMAKE_INSTALL_INCLUDEDIR=/include -DCMAKE_TOOLCHAIN_FILE=/go/src/app/dist/static-php-cli/source/toolchain.cmake -DBUILD_SHARED_LIBS=OFF ..
#34 585.9 -- Found PkgConfig: /go/src/app/dist/static-php-cli/buildroot/bin/pkg-config (found version "0.29.2")
#34 586.0 -- The C compiler identification is GNU 13.2.1
#34 586.0 -- Detecting C compiler ABI info
#34 586.0 -- Detecting C compiler ABI info - done
#34 586.1 -- Check for working C compiler: /usr/bin/gcc - skipped
#34 586.1 -- Detecting C compile features
#34 586.1 -- Detecting C compile features - done
#34 586.1 -- Checking for module 'libyuv'
#34 586.1 --   No package 'libyuv' found
#34 586.1 CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
#34 586.1   Could NOT find libyuv (missing: LIBYUV_LIBRARY LIBYUV_LIBRARIES
#34 586.1   LIBYUV_INCLUDE_DIR) (found version "")
#34 586.1 Call Stack (most recent call first):
#34 586.1   /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
#34 586.1   cmake/Modules/Findlibyuv.cmake:52 (find_package_handle_standard_args)
#34 586.1   CMakeLists.txt:202 (find_package)
#34 586.1   CMakeLists.txt:221 (check_avif_option)
#34 586.1 
#34 586.1 
#34 586.1 -- Configuring incomplete, errors occurred!
#34 586.1 [09:31:06] [ERRO] Uncaught SPC\exception\RuntimeException: Command run failed with code[1]: cd '/go/src/app/dist/static-php-cli/source/libavif/build' &&  cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DCMAKE_INSTALL_BINDIR=/bin -DCMAKE_INSTALL_LIBDIR=/lib -DCMAKE_INSTALL_INCLUDEDIR=/include -DCMAKE_TOOLCHAIN_FILE=/go/src/app/dist/static-php-cli/source/toolchain.cmake -DBUILD_SHARED_LIBS=OFF .. at /go/src/app/dist/static-php-cli/src/globals/functions.php(147)
jingjingxyk commented 4 months ago

libwebp contain libyuv

dunglas commented 4 months ago

It's a very recent issue (since this morning). Something probably changed in libwebp or libavif.

crazywhalecc commented 4 months ago

@dunglas It has been fixed in #502 https://github.com/crazywhalecc/static-php-cli/pull/502/commits/4e26dc8ab9f9c031469ea7bc80c1c7e62c749167 during my testing of 2.3

I will release 2.3 this weekend, as it not only speeds up compilation, but also fixes a lot of things like this.