Open
Description
Description
I'm encountering a build failure when trying to install PHP extensions (intl
) on Alpine 3.22. The issue is caused by the toU16StringView
function being used in ICU headers but missing from the current ICU version shipped with Alpine 3.22 (ICU 76+).
📄 Error Log
/usr/include/unicode/unistr.h: In function 'icu_76::UnicodeString icu_76::operator+(const UnicodeString&, const S&)':
/usr/include/unicode/unistr.h:4118:46: error: 'toU16StringView' is not a member of 'icu_76::internal'
4118 | return unistr_internalConcat(s1, internal::toU16StringView(s2));
| ^~~~~~~~~~~~~~~
/usr/include/unicode/unistr.h:4118:10: error: there are no arguments to 'unistr_internalConcat' that depend on a template parameter, so a declaration of 'unistr_internalConcat' must be available [-fpermissive]
You can also reproduce this with a minimal Dockerfile using php:8.4-alpine3.22
:
🐳 Docker Reproduction
FROM php:8.4-alpine3.22
RUN apk add --no-cache icu-dev g++ && docker-php-ext-install intl
✅ Works on:
- Alpine 3.21 (with older ICU version)
❌ Fails on:
- Alpine 3.22 (icu-76.1)
Thanks!
Reference Issue: GitHub Issue Link
Reference build failure: GitHub Action Link
PHP Version
8.4-alpine
8.3-alpine
8.2-alpine
8.1-alpine
Operating System
Alpine 3.22