Package: ruby-dev
Version: 1:2.7+2
Severity: normal
X-Debbugs-Cc: alx.manpa...@gmail.com


Hi,

I'm getting warnings from ruby system headers, and I see that the pkg-config
file included with the package is using `-I` instead of `-isystem`.

$ cat ruby.c
#include <ruby.h>

int
main(void)
 {
        static const char *argv[3] = {
                "NGINX_Unit", "-rrbconfig",
                "-eprint RbConfig::CONFIG['libdir']"
        };

        RUBY_INIT_STACK;
        ruby_init();
        return ruby_run_node(ruby_options(3, (char **) argv));
 }


$ pkg-config --cflags ruby
-I/usr/include/x86_64-linux-gnu/ruby-2.7.0 -I/usr/include/ruby-2.7.0


$ clang ruby.c $(pkg-config --cflags --libs ruby)
In file included from ruby.c:1:
In file included from /usr/include/ruby-2.7.0/ruby.h:33:
/usr/include/ruby-2.7.0/ruby/ruby.h:1863:1: warning: unknown attribute 
'__error__' ignored [-Wunknown-attributes]
ERRORFUNC((" argument length doesn't match"), int 
rb_varargs_bad_length(int,int));
^
/usr/include/x86_64-linux-gnu/ruby-2.7.0/ruby/config.h:153:43: note: expanded 
from macro 'ERRORFUNC'
#define ERRORFUNC(mesg,x) __attribute__ ((__error__ mesg)) x
                                          ^


I suggest using -isystem instead of -I to silence the warnings (and also,
to fix the warnings themselves, but I'll report those upstream directly).


Thanks,

Alex


-- System Information:
Debian Release: 11.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-13-amd64 (SMP w/4 CPU threads)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ruby-dev depends on:
ii  ruby2.7-dev  2.7.4-1+deb11u1

ruby-dev recommends no packages.

ruby-dev suggests no packages.

-- no debconf information

Reply via email to