Skip to content
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

monica:*-fpm-alpine fails to build on 32-bit architectures #151

Open
yosifkit opened this issue Dec 12, 2024 · 0 comments
Open

monica:*-fpm-alpine fails to build on 32-bit architectures #151

yosifkit opened this issue Dec 12, 2024 · 0 comments

Comments

@yosifkit
Copy link

Because the base images, php:8.*-fpm-alpine, recently updated to Alpine 3.21, some modules now fail to build on i386, arm32v6, and arm32v7. The memcached module is the one that is currently failing. It is caused by Alpine 3.21 using gcc 14 which changed incompatible-pointer-types to an error instead of just a warning (https://gcc.gnu.org/gcc-14/porting_to.html). Luckily php-memcached already has a fix in in 3.3.0, so just a bump to the pecl install memcached should be enough to fix it.

build logs:

/tmp/pear/temp/memcached/php_memcached.c: In function 's_compress_value':
/tmp/pear/temp/memcached/php_memcached.c:903:65: error: passing argument 2 of 'compress' from incompatible pointer type [-Wincompatible-pointer-types]
  903 |                         int status = compress((Bytef *) buffer, &compressed_size, (Bytef *) ZSTR_VAL(payload), ZSTR_LEN(payload));
      |                                                                 ^~~~~~~~~~~~~~~~
      |                                                                 |
      |                                                                 size_t * {aka unsigned int *}
In file included from /tmp/pear/temp/memcached/php_memcached.c:38:
/usr/include/zlib.h:1232:53: note: expected 'uLongf *' {aka 'long unsigned int *'} but argument is of type 'size_t *' {aka 'unsigned int *'}
 1232 | ZEXTERN int ZEXPORT compress(Bytef *dest,   uLongf *destLen,
      |                                             ~~~~~~~~^~~~~~~
/tmp/pear/temp/memcached/php_memcached.c: In function 's_decompress_value':
/tmp/pear/temp/memcached/php_memcached.c:3636:72: error: passing argument 2 of 'uncompress' from incompatible pointer type [-Wincompatible-pointer-types]
 3636 |                 decompress_status = (uncompress((Bytef *) buffer->val, &buffer->len, (Bytef *)payload, payload_len) == Z_OK);
      |                                                                        ^~~~~~~~~~~~
      |                                                                        |
      |                                                                        size_t * {aka unsigned int *}
/usr/include/zlib.h:1270:55: note: expected 'uLongf *' {aka 'long unsigned int *'} but argument is of type 'size_t *' {aka 'unsigned int *'}
 1270 | ZEXTERN int ZEXPORT uncompress(Bytef *dest,   uLongf *destLen,
      |                                               ~~~~~~~~^~~~~~~
make: *** [Makefile:210: php_memcached.lo] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant