Project

General

Profile

Bug #6766

dtrace probes in ruby

Added by Sergey Avseyev over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
OI-Userland
Target version:
-
Start date:
2016-03-19
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

sudo dtrace -l  | grep ruby

does not show any custom probes defined by ruby,

$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-solaris2.11]
$ ruby -rrbconfig -e "puts RbConfig::CONFIG['configure_args']" 
 'CC=/usr/gcc/4.8/bin/gcc' 'CXX=/usr/gcc/4.8/bin/g++' 'F77=/usr/gcc/4.8/bin/gfortran' 'FC=/usr/gcc/4.8/bin/gfortran' 'CXXFLAGS= -m32' 'FFLAGS= -m32' 'FCFLAGS=-m32' 'LDFLAGS=-m32' 'PKG_CONFIG_PATH=/usr/lib/pkgconfig' '--prefix=/usr/ruby/2.2' '--mandir=/usr/ruby/2.2/share/man' '--bindir=/usr/ruby/2.2/bin' '--libdir=/usr/ruby/2.2/lib' '--sbindir=/usr/ruby/2.2/sbin' '--with-rubylibprefix=/usr/ruby/2.2/lib/ruby' '--enable-shared' '--enable-rpath' '--disable-install-capi' '--disable-option-checking' '--with-openssl' 'CFLAGS=-m32 -O3  -DFFI_NO_RAW_API'

The upstream configure script seems like trying to detect dtrace automatically for ruby 2.2.3 (I haven't checked others)
https://github.com/ruby/ruby/blob/v2_2_3/configure.in#L618-L627


Files

config.log (960 KB) config.log Sergey Avseyev, 2016-03-20 09:40 AM

History

#1

Updated by Sergey Avseyev over 4 years ago

I've tried to rebuild package with the following change to force dtrace support

diff --git c/components/ruby/ruby-22/Makefile w/components/ruby/ruby-22/Makefile
index 39e1cf4..0df40b7 100644
--- c/components/ruby/ruby-22/Makefile
+++ w/components/ruby/ruby-22/Makefile
@@ -87,20 +87,21 @@ LD_B_DIRECT=

 # don't use LD_Z_IGNORE: causes ruby linker problems with 
 # unreferenced symbol tgetent in libreadline, similar to bug #15617172
 LD_Z_IGNORE=

 CONFIGURE_PREFIX = $(USRDIR)/$(COMPONENT_NAME)/$(RUBY_VER)

 CONFIGURE_OPTIONS +=   --with-rubylibprefix=$(CONFIGURE_LIBDIR.32)/ruby
 CONFIGURE_OPTIONS +=   --enable-shared
 CONFIGURE_OPTIONS +=   --enable-rpath
+CONFIGURE_OPTIONS +=   --enable-dtrace
 # Don't need docs for ruby C source files
 CONFIGURE_OPTIONS +=   --disable-install-capi
 CONFIGURE_OPTIONS +=   --disable-option-checking
 CONFIGURE_OPTIONS +=   --with-openssl
 CONFIGURE_OPTIONS +=   CFLAGS="$(CFLAGS)" 

 # fiddle.so (ext/fiddle) links to libffi, which does not define
 # ffi_raw_size(), although its prototype is in libffi's 
 # /usr/lib/libffi-3.0/include/ffi.h header file.  
 # Defining FFI_NO_RAW_API avoids use of ffi_raw_size().

And it fails to build with this error:

configure: error: dtrace(1) is missing
/home/avsej/code/oi-userland/make-rules/configure.mk:130: recipe for target '/home/avsej/code/oi-userland/components/ruby/ruby-22/build/i86/.configured' failed
make: *** [/home/avsej/code/oi-userland/components/ruby/ruby-22/build/i86/.configured] Error 1
#2

Updated by Sergey Avseyev over 4 years ago

Probably because as you can see in config.log

PATH: /usr/bin
PATH: /usr/gnu/bin
#4

Updated by Alexander Pyhalov over 4 years ago

  • Category changed from PKG (Image Packaging System) to OI-Userland
  • Status changed from New to Resolved
  • Assignee changed from OI PKG to OI Userland

Also available in: Atom PDF