Project

General

Profile

Actions

Bug #18480

closed

Dtrace enabled build fails on systems with DTRACE_REBUILD=yes

Added by Kulikjak (Jakub Kulik) almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [amd64-solaris2.11]
[ruby-core:107071]

Description

When building Ruby 3.1 on Solaris, where dtrace requires a recompilation (DTRACE_REBUILD=yes), the compilation fails with the following linking error:

linking miniruby
Undefined			first referenced
 symbol  			    in file
__dtraceenabled_ruby___cmethod__return yjit.o
__dtrace_ruby___cmethod__return     yjit.o
ld: fatal: symbol referencing errors

My guess is that this is because of RUBY_DTRACE_CMETHOD_RETURN_HOOK(ec, me->owner, me->def->original_id); in yjit_codegen.c and seems to be easily fixed by adding yjit to DTRACE_DEPENDENT_OBJS:

--- ruby-3.1.0/template/Makefile.in
+++ ruby-3.1.0/template/Makefile.in
@@ -193,7 +193,8 @@ DTRACE_DEPENDENT_OBJS = array.$(OBJEXT)
            parse.$(OBJEXT) \
            string.$(OBJEXT) \
            symbol.$(OBJEXT) \
-           vm.$(OBJEXT)
+           vm.$(OBJEXT) \
+           yjit.$(OBJEXT)
 
 THREAD_MODEL  = @THREAD_MODEL@
 
Actions

Also available in: Atom PDF

Like0
Like0Like0