Skip to content

PHP 8.3 build fails with --enable-mbstring enabled #11514

Closed

Description

@GrahamCampbell

Description

./buildconf --force

CFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I/usr/include -ffunction-sections -fdata-sections" \
CPPFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I/usr/include -ffunction-sections -fdata-sections" \
LDFLAGS="-L${INSTALL_DIR}/lib64 -L${INSTALL_DIR}/lib -Wl,-O1 -Wl,--strip-all -Wl,--hash-style=both -pie" \
./configure \
    --prefix=${INSTALL_DIR} \
    --enable-option-checking=fatal \
    --enable-sockets \
    --with-config-file-path=/opt/bref/etc/php \
    --with-config-file-scan-dir=/opt/bref/etc/php/conf.d:/var/task/php/conf.d \
    --enable-fpm \
    --disable-cgi \
    --enable-cli \
    --disable-phpdbg \
    --with-sodium \
    --with-readline \
    --with-openssl \
    --with-zlib \
    --with-zlib-dir \
    --with-curl \
    --enable-exif \
    --enable-ftp \
    --with-gettext \
    --enable-mbstring \
    --with-pdo-mysql=shared,mysqlnd \
    --with-mysqli \
    --enable-pcntl \
    --with-zip \
    --enable-bcmath \
    --with-pdo-pgsql=shared,${INSTALL_DIR} \
    --enable-intl=shared \
    --enable-soap \
    --with-xsl=${INSTALL_DIR} \
    --with-pear

make -j $(nproc)
2023-06-23T10:22:15.5722143Z #90 [console build-environment 53/66] RUN make -j $(nproc)
2023-06-23T10:22:15.5724171Z #90 279.0 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/json/ -I/tmp/php/ext/json/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/json/json.c -o ext/json/json.lo  -MMD -MF ext/json/json.dep -MT ext/json/json.lo
2023-06-23T10:22:15.5727209Z #90 279.1 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/json/ -I/tmp/php/ext/json/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/json/json_encoder.c -o ext/json/json_encoder.lo  -MMD -MF ext/json/json_encoder.dep -MT ext/json/json_encoder.lo
2023-06-23T10:22:16.7759800Z #90 280.3 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/json/ -I/tmp/php/ext/json/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/json/json_parser.tab.c -o ext/json/json_parser.lo  -MMD -MF ext/json/json_parser.dep -MT ext/json/json_parser.lo
2023-06-23T10:22:17.3745505Z #90 280.8 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/json/ -I/tmp/php/ext/json/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/json/json_scanner.c -o ext/json/json_scanner.lo  -MMD -MF ext/json/json_scanner.dep -MT ext/json/json_scanner.lo
2023-06-23T10:22:18.1078423Z #90 281.5 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/mbstring/ -I/tmp/php/ext/mbstring/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS    -DONIG_ESCAPE_UCHAR_COLLISION=1 -DUChar=OnigUChar -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/mbstring/mbstring.c -o ext/mbstring/mbstring.lo  -MMD -MF ext/mbstring/mbstring.dep -MT ext/mbstring/mbstring.lo
2023-06-23T10:22:18.9974348Z #90 282.5 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/mbstring/ -I/tmp/php/ext/mbstring/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS    -DONIG_ESCAPE_UCHAR_COLLISION=1 -DUChar=OnigUChar -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/mbstring/php_unicode.c -o ext/mbstring/php_unicode.lo  -MMD -MF ext/mbstring/php_unicode.dep -MT ext/mbstring/php_unicode.lo
2023-06-23T10:22:19.2990908Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c: In function ‘mb_fast_check_utf8_avx2’:
2023-06-23T10:22:19.2991629Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5181:14: warning: implicit declaration of function ‘_mm256_set_m128i’; did you mean ‘_mm256_set_epi8’? [-Wimplicit-function-declaration]
2023-06-23T10:22:19.2992241Z #90 282.8     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 10)), 10));
2023-06-23T10:22:19.2992527Z #90 282.8               ^~~~~~~~~~~~~~~~
2023-06-23T10:22:19.2993012Z #90 282.8               _mm256_set_epi8
2023-06-23T10:22:19.2993678Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5181:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.2994334Z #90 282.8     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 10)), 10));
2023-06-23T10:22:19.2994684Z #90 282.8             ^
2023-06-23T10:22:19.2995241Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5184:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.2995801Z #90 282.8     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 9)), 9));
2023-06-23T10:22:19.2996084Z #90 282.8             ^
2023-06-23T10:22:19.2996555Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5196:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.2997100Z #90 282.8     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 6)), 6));
2023-06-23T10:22:19.2997387Z #90 282.8             ^
2023-06-23T10:22:19.2997854Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5199:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.2998389Z #90 282.8     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 5)), 5));
2023-06-23T10:22:19.2998668Z #90 282.8             ^
2023-06-23T10:22:19.2999148Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5202:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.2999667Z #90 282.8     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 4)), 4));
2023-06-23T10:22:19.2999939Z #90 282.8             ^
2023-06-23T10:22:19.3000422Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5205:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3000964Z #90 282.8     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 3)), 3));
2023-06-23T10:22:19.3001216Z #90 282.8             ^
2023-06-23T10:22:19.3001691Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5208:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3002224Z #90 282.8     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 2)), 2));
2023-06-23T10:22:19.3002480Z #90 282.8             ^
2023-06-23T10:22:19.3002956Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5211:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3003493Z #90 282.8     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 1)), 1));
2023-06-23T10:22:19.3003774Z #90 282.8             ^
2023-06-23T10:22:19.3004246Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5215:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3004661Z #90 282.8     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3004926Z #90 282.8             ^
2023-06-23T10:22:19.3005401Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5218:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3005815Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 2)), 14), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3006098Z #90 282.8             ^
2023-06-23T10:22:19.3006570Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5221:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3007041Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 3)), 13), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3007359Z #90 282.8             ^
2023-06-23T10:22:19.3007833Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5224:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3008352Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 4)), 12), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3008609Z #90 282.8             ^
2023-06-23T10:22:19.3009077Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5227:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3009497Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 5)), 11), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3009757Z #90 282.8             ^
2023-06-23T10:22:19.3010217Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5230:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3010636Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 6)), 10), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3010901Z #90 282.8             ^
2023-06-23T10:22:19.3011368Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5233:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3011792Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 7)), 9), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3012060Z #90 282.8             ^
2023-06-23T10:22:19.3012576Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5236:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3012995Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 8)), 8), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3013272Z #90 282.8             ^
2023-06-23T10:22:19.3013743Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5239:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3014168Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 9)), 7), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3014428Z #90 282.8             ^
2023-06-23T10:22:19.3014900Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5242:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3015320Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 10)), 6), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3015593Z #90 282.8             ^
2023-06-23T10:22:19.3016053Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5245:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3016483Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 11)), 5), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3016753Z #90 282.8             ^
2023-06-23T10:22:19.3017215Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5248:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3017655Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 12)), 4), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3017919Z #90 282.8             ^
2023-06-23T10:22:19.3018400Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5251:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3018863Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 13)), 3), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3019146Z #90 282.8             ^
2023-06-23T10:22:19.3019671Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5254:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3020090Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 14)), 2), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3020396Z #90 282.8             ^
2023-06-23T10:22:19.3020919Z #90 282.8 /tmp/php/ext/mbstring/mbstring.c:5257:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:19.3021338Z #90 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 15)), 1), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:19.3021602Z #90 282.8             ^
2023-06-23T10:22:19.4005920Z #90 282.9 make: *** [ext/mbstring/mbstring.lo] Error 1
2023-06-23T10:22:19.4006293Z #90 282.9 make: *** Waiting for unfinished jobs....
2023-06-23T10:22:20.4158811Z #90 ERROR: process "/bin/sh -c make -j $(nproc)" did not complete successfully: exit code: 2
2023-06-23T10:22:20.4159105Z 
2023-06-23T10:22:20.4159323Z #89 [php-fpm-dev build-environment 53/66] RUN make -j $(nproc)
2023-06-23T10:22:20.4161334Z #89 279.3 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/json/ -I/tmp/php/ext/json/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/json/json.c -o ext/json/json.lo  -MMD -MF ext/json/json.dep -MT ext/json/json.lo
2023-06-23T10:22:20.4164307Z #89 279.4 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/json/ -I/tmp/php/ext/json/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/json/json_encoder.c -o ext/json/json_encoder.lo  -MMD -MF ext/json/json_encoder.dep -MT ext/json/json_encoder.lo
2023-06-23T10:22:20.4167249Z #89 280.5 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/json/ -I/tmp/php/ext/json/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/json/json_parser.tab.c -o ext/json/json_parser.lo  -MMD -MF ext/json/json_parser.dep -MT ext/json/json_parser.lo
2023-06-23T10:22:20.4170490Z #89 281.1 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/json/ -I/tmp/php/ext/json/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/json/json_scanner.c -o ext/json/json_scanner.lo  -MMD -MF ext/json/json_scanner.dep -MT ext/json/json_scanner.lo
2023-06-23T10:22:20.4173683Z #89 281.9 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/mbstring/ -I/tmp/php/ext/mbstring/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS    -DONIG_ESCAPE_UCHAR_COLLISION=1 -DUChar=OnigUChar -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/mbstring/mbstring.c -o ext/mbstring/mbstring.lo  -MMD -MF ext/mbstring/mbstring.dep -MT ext/mbstring/mbstring.lo
2023-06-23T10:22:20.4176809Z #89 282.8 /bin/sh /tmp/php/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/mbstring/ -I/tmp/php/ext/mbstring/ -I/tmp/php/include -I/tmp/php/main -I/tmp/php -I/tmp/php/ext/date/lib -I/opt/include/libxml2 -I/opt/include -I/tmp/php/ext/mbstring/libmbfl -I/tmp/php/ext/mbstring/libmbfl/mbfl -I/tmp/php/TSRM -I/tmp/php/Zend  -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -fstack-protector-strong -fpic -fpie -O3 -I/opt/include -I/usr/include -ffunction-sections -fdata-sections -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS    -DONIG_ESCAPE_UCHAR_COLLISION=1 -DUChar=OnigUChar -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/php/ext/mbstring/php_unicode.c -o ext/mbstring/php_unicode.lo  -MMD -MF ext/mbstring/php_unicode.dep -MT ext/mbstring/php_unicode.lo
2023-06-23T10:22:20.4178313Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c: In function ‘mb_fast_check_utf8_avx2’:
2023-06-23T10:22:20.4178965Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5181:14: warning: implicit declaration of function ‘_mm256_set_m128i’; did you mean ‘_mm256_set_epi8’? [-Wimplicit-function-declaration]
2023-06-23T10:22:20.4179569Z #89 283.1     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 10)), 10));
2023-06-23T10:22:20.4179861Z #89 283.1               ^~~~~~~~~~~~~~~~
2023-06-23T10:22:20.4180091Z #89 283.1               _mm256_set_epi8
2023-06-23T10:22:20.4180606Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5181:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4181162Z #89 283.1     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 10)), 10));
2023-06-23T10:22:20.4181428Z #89 283.1             ^
2023-06-23T10:22:20.4181994Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5184:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4182590Z #89 283.1     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 9)), 9));
2023-06-23T10:22:20.4182856Z #89 283.1             ^
2023-06-23T10:22:20.4183397Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5196:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4183990Z #89 283.1     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 6)), 6));
2023-06-23T10:22:20.4184269Z #89 283.1             ^
2023-06-23T10:22:20.4184741Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5199:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4185277Z #89 283.1     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 5)), 5));
2023-06-23T10:22:20.4185559Z #89 283.1             ^
2023-06-23T10:22:20.4186020Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5202:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4186554Z #89 283.1     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 4)), 4));
2023-06-23T10:22:20.4186836Z #89 283.1             ^
2023-06-23T10:22:20.4187322Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5205:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4187839Z #89 283.1     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 3)), 3));
2023-06-23T10:22:20.4188114Z #89 283.1             ^
2023-06-23T10:22:20.4188591Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5208:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4189131Z #89 283.1     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 2)), 2));
2023-06-23T10:22:20.4189396Z #89 283.1             ^
2023-06-23T10:22:20.4189873Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5211:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4190405Z #89 283.1     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 1)), 1));
2023-06-23T10:22:20.4190682Z #89 283.1             ^
2023-06-23T10:22:20.4191143Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5215:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4191552Z #89 283.1     operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4191814Z #89 283.1             ^
2023-06-23T10:22:20.4192276Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5218:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4192721Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 2)), 14), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4193001Z #89 283.1             ^
2023-06-23T10:22:20.4193644Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5221:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4194069Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 3)), 13), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4194346Z #89 283.1             ^
2023-06-23T10:22:20.4194823Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5224:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4195310Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 4)), 12), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4195573Z #89 283.1             ^
2023-06-23T10:22:20.4196105Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5227:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4196533Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 5)), 11), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4196840Z #89 283.1             ^
2023-06-23T10:22:20.4197379Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5230:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4197800Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 6)), 10), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4198066Z #89 283.1             ^
2023-06-23T10:22:20.4198526Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5233:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4198950Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 7)), 9), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4199234Z #89 283.1             ^
2023-06-23T10:22:20.4199708Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5236:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4200135Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 8)), 8), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4200404Z #89 283.1             ^
2023-06-23T10:22:20.4200874Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5239:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4201301Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 9)), 7), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4201561Z #89 283.1             ^
2023-06-23T10:22:20.4202033Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5242:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4202450Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 10)), 6), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4202717Z #89 283.1             ^
2023-06-23T10:22:20.4203185Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5245:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4203600Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 11)), 5), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4203868Z #89 283.1             ^
2023-06-23T10:22:20.4204324Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5248:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4204746Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 12)), 4), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4205022Z #89 283.1             ^
2023-06-23T10:22:20.4205493Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5251:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4205912Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 13)), 3), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4206178Z #89 283.1             ^
2023-06-23T10:22:20.4206653Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5254:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4207069Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 14)), 2), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4207342Z #89 283.1             ^
2023-06-23T10:22:20.4207865Z #89 283.1 /tmp/php/ext/mbstring/mbstring.c:5257:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.4208332Z #89 283.1     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 15)), 1), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.4208627Z #89 283.1             ^
2023-06-23T10:22:20.4208867Z #89 283.2 make: *** [ext/mbstring/mbstring.lo] Error 1
2023-06-23T10:22:20.4209162Z #89 283.2 make: *** Waiting for unfinished jobs....
2023-06-23T10:22:20.5248714Z #89 CANCELED
2023-06-23T10:22:20.5249271Z ------
2023-06-23T10:22:20.5249745Z  > [console build-environment 53/66] RUN make -j $(nproc):
2023-06-23T10:22:20.5250140Z 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 13)), 3), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.5250536Z 282.8             ^
2023-06-23T10:22:20.5251214Z 282.8 /tmp/php/ext/mbstring/mbstring.c:5254:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.5251692Z 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 14)), 2), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.5252080Z 282.8             ^
2023-06-23T10:22:20.5252585Z 282.8 /tmp/php/ext/mbstring/mbstring.c:5257:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
2023-06-23T10:22:20.5253172Z 282.8     operand = _mm256_set_m128i(_mm_srli_si128(_mm_loadu_si128((__m128i*)(p + 15)), 1), _mm_loadu_si128((__m128i*)p));
2023-06-23T10:22:20.5253566Z 282.8             ^
2023-06-23T10:22:20.5253793Z 282.9 make: *** [ext/mbstring/mbstring.lo] Error 1
2023-06-23T10:22:20.5254077Z 282.9 make: *** Waiting for unfinished jobs....
2023-06-23T10:22:20.5254468Z ------

A full reproduction is available at brefphp/aws-lambda-layers#91.

PHP Version

8.3.0alpha2

Operating System

AL2 with oniguruma 6.9.8 installed from source.

Activity

  1. GrahamCampbell commented on Jun 23, 2023

    @GrahamCampbell
    ContributorAuthor
  2. linjialiang commented on Jun 23, 2023

    @linjialiang

    same

  3. alexdowad commented on Jun 23, 2023

    @alexdowad
    Contributor

    Interesting: /tmp/php/ext/mbstring/mbstring.c:5181:14: warning: implicit declaration of function ‘_mm256_set_m128i’; did you mean ‘_mm256_set_epi8’?

    Apparently you are building PHP for a host which supports AVX/AVX2, and your compiler knows about _mm256_set_epi8 (which is an intrinsic function for AVX) but doesn't know about _mm256_set_m128i (which is also an intrinsic function for AVX).

    References for these functions:

    https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=mm256_set_epi8&ig_expand=5847,5842

    https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=mm256_set_m128i&ig_expand=5847,5842,5849

  4. alexdowad commented on Jun 23, 2023

    @alexdowad
    Contributor

    The prototypes for both of these functions are in immintrin.h.

  5. alexdowad commented on Jun 23, 2023

    @alexdowad
    Contributor

    @GrahamCampbell Could you let me know what C compiler is used on this host?

    CC to @nielsdos in case he has any ideas.

  6. iluuu1994 commented on Jun 23, 2023

    @iluuu1994
    Member

    https://stackoverflow.com/a/32630658/1320374 This is an older answer. But I guess it's still possible that some older compilers don't support these functions. There's a suggested workaround, but we'd still need to know what compiler version to apply it to, and whether it works at all (it uses a different SIMD operation instead).

  7. GrahamCampbell commented on Jun 23, 2023

    @GrahamCampbell
    ContributorAuthor
    cmake3 version 3.13.1
    gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-15)
    
  8. ndossche commented on Jun 23, 2023

    @ndossche
    Member

    I can reproduce this with GCC 7.x, but not with GCC 8.x. It seems indeed that GCC 7.x is missing some intrinsics. I'd suggest applying the workaround from the SO post for versions of GCC <= 7.x. I'll check whether the suggested intrinsics are equivalent. This should be fairly easy to do.
    Because I already have a setup that allows me to test this, I'll submit a PR soon-ish.

  9. alexdowad commented on Jun 23, 2023

    @alexdowad
    Contributor

    I can reproduce this with GCC 7.x, but not with GCC 8.x. It seems indeed that GCC 7.x is missing some intrinsics. I'd suggest applying the workaround from the SO post for versions of GCC <= 7.x. I'll check whether the suggested intrinsics are equivalent. This should be fairly easy to do. Because I already have a setup that allows me to test this, I'll submit a PR soon-ish.

    Awesome!! Thank you!

  10. alexdowad commented on Jun 23, 2023

    @alexdowad
    Contributor

    @nielsdos So I guess it means the entire PHP codebase should avoid the intrinsics which are not implemented in GCC 7.

  11. ndossche commented on Jun 23, 2023

    @ndossche
    Member

    @nielsdos So I guess it means the entire PHP codebase should avoid the intrinsics which are not implemented in GCC 7.

    Avoid, or maybe polyfill like what I'm going to do here.
    We could also create a common header for the polyfills if we encounter more of those cases.
    I checked, and only mbstring uses _mm256_set_m128i.

  12. ndossche commented on Jun 23, 2023

    @ndossche
    Member

    Just checked the equivalence. The solution on SO is equivalent.

  13. added a commit that references this issue on Jun 23, 2023
    6e5199e
  14. alexdowad commented on Jun 23, 2023

    @alexdowad
    Contributor

    @nielsdos 👏 Excellent work, sir. I tip my hat to you.

  15. GrahamCampbell commented on Jun 23, 2023

    @GrahamCampbell
    ContributorAuthor

    Thank you everyone!

  16. SjonHortensius commented on Oct 19, 2023

    @SjonHortensius
    Contributor

    I'm having the same issue (on master), but my gcc version is 13.2 ...

    ext/mbstring/mbstring.c: In function ‘mb_fast_check_utf8_avx2’:
    ext/mbstring/mbstring.c:5179:14: warning: implicit declaration of function ‘_mm256_set_m128i’ [-Wimplicit-function-declaration]
        operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 10)), 10));
                  ^~~~~~~~~~~~~~~~
    ext/mbstring/mbstring.c:5179:12: error: incompatible types when assigning to type ‘__m256i {aka __vector(4) long long int}’ from type ‘int’
        operand = _mm256_set_m128i(_mm_setzero_si128(), _mm_srli_si128(_mm_loadu_si128((__m128i*)(p - 10)), 10));
                ^
    
  17. ndossche commented on Oct 19, 2023

    @ndossche
    Member

    @SjonHortensius What distro + distro version do you use? And does your CPU support AVX2 ?

  18. SjonHortensius commented on Oct 19, 2023

    @SjonHortensius
    Contributor

    @nielsdos sorry I just realized this runs in a debian chroot with gcc 6.3. The cpu supports avx2. Should that work?

  19. ndossche commented on Oct 19, 2023

    @ndossche
    Member

    @SjonHortensius That should work. But I'm not seeing that instrinsic on line 5179: https://github.com/php/php-src/blob/master/ext/mbstring/mbstring.c#L5179
    Are you sure you got the latest sources?
    Also given that Debian dropped the gcc-6 package, I'd suggest to upgrade anyway

  20. added a commit that references this issue on Jan 31, 2024
    14a868b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions