Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

nxt_ruby incompatible pointer type #371

@KawaiDesu

Description

@KawaiDesu

Hello!
Can't build ruby module because of error:

...
cc -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -g  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -I src -I build -I/usr/include/ruby-2.7.0/x86_64-linux -I/usr/include/ruby-2.7.0 \
-MMD -MF build/src/ruby/nxt_ruby-ruby.dep -MT build/src/ruby/nxt_ruby-ruby.o \
-o build/src/ruby/nxt_ruby-ruby.o src/ruby/nxt_ruby.c
src/ruby/nxt_ruby.c: In function ‘nxt_ruby_rack_result_body’:
src/ruby/nxt_ruby.c:714:23: error: passing argument 5 of ‘rb_block_call’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  714 |                       nxt_ruby_rack_result_body_each, 0);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                       |
      |                       VALUE (*)(VALUE) {aka long unsigned int (*)(long unsigned int)}
In file included from /usr/include/ruby-2.7.0/ruby.h:33,
                 from src/ruby/nxt_ruby.h:11,
                 from src/ruby/nxt_ruby.c:6:
/usr/include/ruby-2.7.0/ruby/ruby.h:1985:47: note: expected ‘rb_block_call_func_t’ {aka ‘long unsigned int (*)(long unsigned int,  long unsigned int,  int,  const long unsigned int *, long unsigned int)’} but argument is of type ‘VALUE (*)(VALUE)’ {aka ‘long unsigned int (*)(long unsigned int)’}
 1985 | VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
      |                                               ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [build/Makefile:1825: build/src/ruby/nxt_ruby-ruby.o] Error 1

Building like this:

./configure --prefix=/usr \
            --sbindir=/usr/bin \
            --modules="/usr/lib/$pkgbase" \
            --state="/var/lib/$pkgbase" \
            --pid="/run/$pkgbase.pid" \
            --log="/var/log/$pkgbase.log" \
            --control="/run/$pkgbase.control.sock" \
            --openssl
./configure python --config=python3-config
./configure python --config=python2-config
./configure php
./configure perl
./configure ruby
./configure nodejs
./configure go --go-path=/usr/lib/go
make all

Unit version 1.14.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions