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

Building on 32-bits failed #561

Closed
andypost opened this issue Oct 24, 2024 · 3 comments
Closed

Building on 32-bits failed #561

andypost opened this issue Oct 24, 2024 · 3 comments
Labels

Comments

@andypost
Copy link
Contributor

Description

Building 6.0.4 release I see consistent failures to build on 32-bit arches:

/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/fun.c: In function 'zif_rd_kafka_errno2err':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/fun.c:139:5: warning: 'rd_kafka_errno2err' is deprecated [-Wdeprecated-declarations]
  139 |     RETURN_LONG(rd_kafka_errno2err(errnox));
      |     ^~~~~~~~~~~
In file included from /builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/php_rdkafka.h:24,
                 from /builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/fun.c:24:
/usr/include/librdkafka/rdkafka.h:754:45: note: declared here
  754 | RD_EXPORT RD_DEPRECATED rd_kafka_resp_err_t rd_kafka_errno2err(int errnox);
      |                                             ^~~~~~~~~~~~~~~~~~
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c: In function 'zim_RdKafka_ConsumerTopic_consumeCallback':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:131:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  131 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Out of range value '%ld' for $partition", partition);
      |                                                                                          ~~^                   ~~~~~~~~~
      |                                                                                            |                   |
      |                                                                                            long int            zend_long {aka int}
      |                                                                                          %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c: In function 'zim_RdKafka_ConsumerTopic_consumeQueueStart':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:168:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  168 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Out of range value '%ld' for $partition", partition);
      |                                                                                          ~~^                   ~~~~~~~~~
      |                                                                                            |                   |
      |                                                                                            long int            zend_long {aka int}
      |                                                                                          %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c: In function 'zim_RdKafka_ConsumerTopic_consumeStart':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:226:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  226 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Out of range value '%ld' for $partition", partition);
      |                                                                                          ~~^                   ~~~~~~~~~
      |                                                                                            |                   |
      |                                                                                            long int            zend_long {aka int}
      |                                                                                          %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c: In function 'zim_RdKafka_ConsumerTopic_consumeStop':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:278:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  278 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Out of range value '%ld' for $partition", partition);
      |                                                                                          ~~^                   ~~~~~~~~~
      |                                                                                            |                   |
      |                                                                                            long int            zend_long {aka int}
      |                                                                                          %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c: In function 'zim_RdKafka_ConsumerTopic_consume':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:319:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  319 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Out of range value '%ld' for $partition", partition);
      |                                                                                          ~~^                   ~~~~~~~~~
      |                                                                                            |                   |
      |                                                                                            long int            zend_long {aka int}
      |                                                                                          %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c: In function 'zim_RdKafka_ConsumerTopic_consumeBatch':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:360:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  360 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Out of range value '%ld' for batch_size", batch_size);
      |                                                                                          ~~^                   ~~~~~~~~~~
      |                                                                                            |                   |
      |                                                                                            long int            zend_long {aka int}
      |                                                                                          %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:365:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  365 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Out of range value '%ld' for $partition", partition);
      |                                                                                          ~~^                   ~~~~~~~~~
      |                                                                                            |                   |
      |                                                                                            long int            zend_long {aka int}
      |                                                                                          %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c: In function 'zim_RdKafka_ConsumerTopic_offsetStore':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:409:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  409 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Out of range value '%ld' for $partition", partition);
      |                                                                                          ~~^                   ~~~~~~~~~
      |                                                                                            |                   |
      |                                                                                            long int            zend_long {aka int}
      |                                                                                          %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c: In function 'zim_RdKafka_ProducerTopic_produce':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:458:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  458 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Out of range value '%ld' for $partition", partition);
      |                                                                                          ~~^                   ~~~~~~~~~
      |                                                                                            |                   |
      |                                                                                            long int            zend_long {aka int}
      |                                                                                          %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:463:87: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  463 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Invalid value '%ld' for $msgflags", msgflags);
      |                                                                                     ~~^                  ~~~~~~~~
      |                                                                                       |                  |
      |                                                                                       long int           zend_long {aka int}
      |                                                                                     %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/kafka_consumer.c: In function 'zim_RdKafka_KafkaConsumer_queryWatermarkOffsets':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/kafka_consumer.c:787:74: error: passing argument 4 of 'rd_kafka_query_watermark_offsets' from incompatible pointer type [-Wincompatible-pointer-types]
  787 |     err = rd_kafka_query_watermark_offsets(intern->rk, topic, partition, &low, &high, timeout);
      |                                                                          ^~~~
      |                                                                          |
      |                                                                          long int *
In file included from /builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/php_rdkafka.h:24,
                 from /builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/kafka_consumer.c:24:
/usr/include/librdkafka/rdkafka.h:3316:43: note: expected 'int64_t *' {aka 'long long int *'} but argument is of type 'long int *'
 3316 |                                  int64_t *low,
      |                                  ~~~~~~~~~^~~
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c: In function 'zim_RdKafka_ProducerTopic_producev':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:527:92: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  527 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Out of range value '%ld' for $partition", partition);
      |                                                                                          ~~^                   ~~~~~~~~~
      |                                                                                            |                   |
      |                                                                                            long int            zend_long {aka int}
      |                                                                                          %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/topic.c:532:87: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'zend_long' {aka 'int'} [-Wformat=]
  532 |         zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Invalid value '%ld' for $msgflags", msgflags);
      |                                                                                     ~~^                  ~~~~~~~~
      |                                                                                       |                  |
      |                                                                                       long int           zend_long {aka int}
      |                                                                                     %d
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/kafka_consumer.c:787:80: error: passing argument 5 of 'rd_kafka_query_watermark_offsets' from incompatible pointer type [-Wincompatible-pointer-types]
  787 |     err = rd_kafka_query_watermark_offsets(intern->rk, topic, partition, &low, &high, timeout);
      |                                                                                ^~~~~
      |                                                                                |
      |                                                                                long int *
/usr/include/librdkafka/rdkafka.h:3317:43: note: expected 'int64_t *' {aka 'long long int *'} but argument is of type 'long int *'
 3317 |                                  int64_t *high,
      |                                  ~~~~~~~~~^~~~
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/rdkafka.c: In function 'zim_RdKafka_queryWatermarkOffsets':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/rdkafka.c:743:74: error: passing argument 4 of 'rd_kafka_query_watermark_offsets' from incompatible pointer type [-Wincompatible-pointer-types]
  743 |     err = rd_kafka_query_watermark_offsets(intern->rk, topic, partition, &low, &high, timeout);
      |                                                                          ^~~~
      |                                                                          |
      |                                                                          long int *
In file included from /builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/kafka_error_exception.h:21,
                 from /builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/rdkafka.c:26:
/usr/include/librdkafka/rdkafka.h:3316:43: note: expected 'int64_t *' {aka 'long long int *'} but argument is of type 'long int *'
 3316 |                                  int64_t *low,
      |                                  ~~~~~~~~~^~~
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/rdkafka.c:743:80: error: passing argument 5 of 'rd_kafka_query_watermark_offsets' from incompatible pointer type [-Wincompatible-pointer-types]
  743 |     err = rd_kafka_query_watermark_offsets(intern->rk, topic, partition, &low, &high, timeout);
      |                                                                                ^~~~~
      |                                                                                |
      |                                                                                long int *
/usr/include/librdkafka/rdkafka.h:3317:43: note: expected 'int64_t *' {aka 'long long int *'} but argument is of type 'long int *'
 3317 |                                  int64_t *high,
      |                                  ~~~~~~~~~^~~~
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/rdkafka.c: In function 'zim_RdKafka_setLogger':
/builds/alpine/aports/community/php82-pecl-rdkafka/src/rdkafka-6.0.4/rdkafka.c:825:5: warning: 'rd_kafka_set_logger' is deprecated [-Wdeprecated-declarations]
  825 |     rd_kafka_set_logger(intern->rk, logger);
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/librdkafka/rdkafka.h:5351:1: note: declared here
 5351 | rd_kafka_set_logger(rd_kafka_t *rk,
      | ^~~~~~~~~~~~~~~~~~~
make: *** [Makefile:243: kafka_consumer.lo] Error 1

php-rdkafka Version

6.0.4

librdkafka Version

2.6.0

PHP Version

PHP 8.1-8.4

Operating System

Alpinelinux

Kafka Version

No response

@andypost andypost added the bug label Oct 24, 2024
@andypost
Copy link
Contributor Author

@arnaud-lb
Copy link
Owner

Thank you! Should be fixed by #565

@andypost
Copy link
Contributor Author

andypost commented Oct 25, 2024

Thank you! it passed all arches but I see a warning

checking for librdkafka version... >= 0.11.0
checking for rd_kafka_message_headers in -lrdkafka... yes
checking for rd_kafka_purge in -lrdkafka... yes
checking for rd_kafka_controllerid in -lrdkafka... yes
configure: WARNING: controllerid is broken on 0.11.x
checking for rd_kafka_init_transactions in -lrdkafka... yes
checking for rd_kafka_msg_partitioner_murmur2 in -lrdkafka... yes
checking for rd_kafka_oauthbearer_set_token in -lrdkafka... yes
checking for rd_kafka_incremental_assign, rd_kafka_incremental_unassign in -lrdkafka... yes
checking for a sed that does not truncate output... /bin/sed

but (27/37) Installing librdkafka (2.6.0-r0) the library version, logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants