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

[Bug] [PHP] broken build with OPENSSL_NO_ENGINE #12837

Open
2 of 3 tasks
remicollet opened this issue Dec 7, 2024 · 2 comments
Open
2 of 3 tasks

[Bug] [PHP] broken build with OPENSSL_NO_ENGINE #12837

remicollet opened this issue Dec 7, 2024 · 2 comments
Assignees
Labels
bug Something isn't working and you are sure it's a bug! php PHP agent related
Milestone

Comments

@remicollet
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

PHP (apache/skywalking-php)

What happened

Build fails on RHEL-10-beta where OpenSSL is built with OPENSSL_NO_ENGINE

rdkafka-sys bundles old librdkafka 1.9

  rdkafka_ssl.c:1337:24: error: implicit declaration of function ‘ENGINE_load_ssl_client_cert’ [-Wimplicit-function-declaration]
   1337 |                 r    = ENGINE_load_ssl_client_cert(
        |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from rdkafka_int.h:46,
                   from rdkafka_ssl.c:35:
  rdkafka_ssl.c: In function ‘rd_kafka_ssl_ctx_term’:
  rdkafka_ssl.c:1407:44: error: implicit declaration of function ‘ENGINE_free’ [-Wimplicit-function-declaration]
   1407 |         RD_IF_FREE(rk->rk_conf.ssl.engine, ENGINE_free);
        |                                            ^~~~~~~~~~~
  rd.h:415:25: note: in definition of macro ‘RD_IF_FREE’
    415 |                         FUNC(PTR);                                             \
        |                         ^~~~
  rdkafka_ssl.c: In function ‘rd_kafka_ssl_ctx_init_engine’:
  rdkafka_ssl.c:1427:18: error: implicit declaration of function ‘ENGINE_by_id’ [-Wimplicit-function-declaration]
   1427 |         engine = ENGINE_by_id(rk->rk_conf.ssl.engine_id);
        |                  ^~~~~~~~~~~~
  rdkafka_ssl.c:1427:16: error: assignment to ‘ENGINE *’ {aka ‘struct engine_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   1427 |         engine = ENGINE_by_id(rk->rk_conf.ssl.engine_id);
        |                ^
  rdkafka_ssl.c:1429:24: error: assignment to ‘ENGINE *’ {aka ‘struct engine_st *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   1429 |                 engine = ENGINE_by_id("dynamic");
        |                        ^
  rdkafka_ssl.c:1438:14: error: implicit declaration of function ‘ENGINE_ctrl_cmd_string’ [-Wimplicit-function-declaration]
   1438 |         if (!ENGINE_ctrl_cmd_string(engine, "SO_PATH",
        |              ^~~~~~~~~~~~~~~~~~~~~~
  rdkafka_ssl.c:1463:14: error: implicit declaration of function ‘ENGINE_init’ [-Wimplicit-function-declaration]
   1463 |         if (!ENGINE_init(engine)) {
        |              ^~~~~~~~~~~

Upcoming version 2.6.2 should be compatible
See confluentinc/librdkafka#3535

What you expected to happen

success

How to reproduce

Build on any distribution using OPENSSL_NO_ENGINE

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

@remicollet remicollet added the bug Something isn't working and you are sure it's a bug! label Dec 7, 2024
@wu-sheng wu-sheng added the php PHP agent related label Dec 7, 2024
@jmjoy
Copy link
Member

jmjoy commented Dec 7, 2024

Maybe we can change the rdkafka dependency to dynamic-linking.

@jmjoy
Copy link
Member

jmjoy commented Dec 9, 2024

rust-rdkafka has high requirements for the rdkafka version (1.9.2). If dynamic linking is used, the version in the source of the distribution is not easy to meet. Let's wait for the release of rdkafka 2.6.2.

@wu-sheng wu-sheng added this to the PHP - 1.0.0 milestone Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working and you are sure it's a bug! php PHP agent related
Projects
None yet
Development

No branches or pull requests

3 participants