tmm1 / rbtrace

like strace, but for ruby code
MIT License
1.71k stars 65 forks source link

ruby 2.5.0dev (2017-11-10 trunk 60739) [x86_64-linux-gnu] breaks rbtrace #59

Open darix opened 7 years ago

darix commented 7 years ago
compiling rbtrace.c
rbtrace.c: In function ‘event_hook’:
rbtrace.c:329:5: warning: ‘rb_frame_method_id_and_class’ is deprecated [-Wdeprecated-declarations]
     rb_frame_method_id_and_class(&_mid, &_klass);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:24:0,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from rbtrace.c:24:
/usr/include/ruby-2.5.0/ruby/backward.h:53:37: note: declared here
 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_frame_method_id_and_class);
                                     ^
/usr/include/ruby-2.5.0/x86_64-linux-gnu/ruby/config.h:130:52: note: in definition of macro ‘NORETURN’
 #define NORETURN(x) __attribute__ ((__noreturn__)) x
                                                    ^
/usr/include/ruby-2.5.0/ruby/backward.h:39:14: note: in expansion of macro ‘ERRORFUNC’
     NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
              ^~~~~~~~~
/usr/include/ruby-2.5.0/ruby/backward.h:39:58: note: in expansion of macro ‘DEPRECATED’
     NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
                                                          ^~~~~~~~~~
/usr/include/ruby-2.5.0/ruby/backward.h:53:1: note: in expansion of macro ‘DECLARE_DEPRECATED_INTERNAL_FEATURE’
 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_frame_method_id_and_class);
 ^
rbtrace.c:329:5: error: too many arguments to function ‘rb_frame_method_id_and_class’
     rb_frame_method_id_and_class(&_mid, &_klass);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/ruby-2.5.0/ruby/ruby.h:24:0,
                 from /usr/include/ruby-2.5.0/ruby.h:33,
                 from rbtrace.c:24:
/usr/include/ruby-2.5.0/ruby/backward.h:53:37: note: declared here
 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_frame_method_id_and_class);
                                     ^
/usr/include/ruby-2.5.0/x86_64-linux-gnu/ruby/config.h:130:52: note: in definition of macro ‘NORETURN’
 #define NORETURN(x) __attribute__ ((__noreturn__)) x
                                                    ^
/usr/include/ruby-2.5.0/ruby/backward.h:39:14: note: in expansion of macro ‘ERRORFUNC’
     NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
              ^~~~~~~~~
/usr/include/ruby-2.5.0/ruby/backward.h:39:58: note: in expansion of macro ‘DEPRECATED’
     NORETURN(ERRORFUNC(("deprecated internal function"), DEPRECATED(void func(void))))
                                                          ^~~~~~~~~~
/usr/include/ruby-2.5.0/ruby/backward.h:53:1: note: in expansion of macro ‘DECLARE_DEPRECATED_INTERNAL_FEATURE’
 DECLARE_DEPRECATED_INTERNAL_FEATURE(rb_frame_method_id_and_class);
 ^
rbtrace.c: In function ‘sigurg’:
rbtrace.c:1084:3: warning: implicit declaration of function ‘rb_postponed_job_register_one’ [-Wimplicit-function-declaration]
   rb_postponed_job_register_one(0, rbtrace__receive, 0);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:242: rbtrace.o] Error 1
ERROR:  Error installing /home/abuild/rpmbuild/SOURCES/rbtrace-0.4.8.gem:
        ERROR: Failed to build gem native extension.

    Building has failed. See above output for more information on the failure.
make failed, exit code 2
k0kubun commented 6 years ago

I fixed this issue in https://github.com/ruby/ruby/commit/857827e3eed915543ac9d4d2541179ea4ded8eee, but this API usage should be stopped anyway. So I opened https://github.com/tmm1/rbtrace/issues/60 too (As the purpose is essentially different, I wanted to close this issue but I couldn't).