Re: [PHP-WIN] compiling rdkafka on Windows

[email protected] ("Christoph M. Becker")
Newsgroups php.windows
Message-ID <[email protected]>
Hi!

A "bit" late, but maybe this is still helpful to you or others.

On 07.03.2024 at 10:00, Jan Vávra wrote:

>  I would like to compile a rdkafka extension on Windows for php 8.2
>
> I was going through steps on
> https://wiki.php.net/internals/windows/stepbystepbuild

This is for old PHP versions.  You should (have) read:
<https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2>

> Building PECL extensions
>
> I have dirs
> c:\php-sdk\phpdev\vs16\x64\php-8.2.4
> c:\php-sdk\phpdev\vs16\x64\pecl\rdkafka\rdkafka-6.0.3
>
> And I failed with
> c:\php-sdk\phpdev\vs16\x64\php-8.2.4>configure --with-rdkafka
>
> WARNING
> The following arguments is invalid, and therefore ignored:
> configure --with-rdkafka

I haven't done this way of building PECL extensions for a long time, but
if my memory is correct, rdkafka\rdkafka-6.0.3 won't work.  Put all the
files of the folder into rdkafka directly.  Then run `buildconf`, and
the configure above should work.

However, I'd recommend building PECL extensions with `phpize`, see
<https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2#building_pecl_extensions_with_phpize>.
 This doesn't require to build the PHP core again.

> Or can I ask somebody to compile it by himself ?

PECL DLLs for rdkafka and simple_kafka_client (and many other packages)
are available again from pecl.php.net.

Cheers,
Christoph
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.