Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Symbol not found error when requiring perftools #1

Closed
brynary opened this Issue Jun 1, 2009 · 8 comments

Comments

Projects
None yet
2 participants

brynary commented Jun 1, 2009

I'm not able to require perftools after installing. Here's what I get:

[10:35:54 bhelmkamp@fozzie] ~ ☠
$ sudo gem install -s http://gems.github.com tmm1-perftools.rb
Building native extensions. This could take a while...
Successfully installed tmm1-perftools.rb-0.1.3
1 gem installed
Installing ri documentation for tmm1-perftools.rb-0.1.3...
Installing RDoc documentation for tmm1-perftools.rb-0.1.3...

[10:37:02 bhelmkamp@fozzie] ~ ☠
$ irb
re>> require "perftools"
LoadError: dlopen(/Library/Ruby/Gems/1.8/gems/tmm1-perftools.rb-0.1.3/lib/perftools.bundle, 9): Symbol not found: ___gxx_personality_v0
Referenced from: /Library/Ruby/Gems/1.8/gems/tmm1-perftools.rb-0.1.3/lib/perftools.bundle
Expected in: dynamic lookup

  • /Library/Ruby/Gems/1.8/gems/tmm1-perftools.rb-0.1.3/lib/perftools.bundle
    from /Library/Ruby/Gems/1.8/gems/tmm1-perftools.rb-0.1.3/lib/perftools.bundle
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
    from (irb):1
Owner

tmm1 commented Jun 1, 2009

Strange that I don't see this issue on my Mac. I just changed the extconf.rb to use g++, so it should work now. Can you try the latest gem (0.1.4)?

brynary commented Jun 1, 2009

Seems like that specific error is gone now, but now I get this instead:

[11:30:33 bhelmkamp@fozzie] ~/p/weplay (master) ☠
$ sudo gem install -s http://gems.github.com tmm1-perftools.rb
Password:
Building native extensions. This could take a while...
Successfully installed tmm1-perftools.rb-0.1.4
1 gem installed
Installing ri documentation for tmm1-perftools.rb-0.1.4...
Installing RDoc documentation for tmm1-perftools.rb-0.1.4...

[14:02:06 bhelmkamp@fozzie] ~/p/weplay (master) ☠
$ irb
requi>> require "perftools"
=> true

^D
[14:03:04 bhelmkamp@fozzie] ~/p/weplay (master) ☠
$ CPUPROFILE=/tmp/my_app_profile RUBYOPT="-rgem which perftools | tail -1" ruby ./script/runner "1"
dyld: lazy symbol binding failed: Symbol not found: _rb_during_gc
Referenced from: /Library/Ruby/Gems/1.8/gems/tmm1-perftools.rb-0.1.4/lib/perftools.bundle
Expected in: dynamic lookup

dyld: Symbol not found: _rb_during_gc
Referenced from: /Library/Ruby/Gems/1.8/gems/tmm1-perftools.rb-0.1.4/lib/perftools.bundle
Expected in: dynamic lookup

Trace/BPT trap

Owner

tmm1 commented Jun 2, 2009

Strange. What ruby version (ruby -v)? Are you running Leopard? Tiger?

Owner

tmm1 commented Jun 2, 2009

Also what gcc (gcc --version)?

Owner

tmm1 commented Jun 2, 2009

Looks like rb_during_gc() was added in 1.8.6p267. I'm guessing the OSX ruby is older?

Owner

tmm1 commented Jun 2, 2009

Alright, pushed another change. Should work now, but it won't show you time spent in the garbage collector. Usually this ends up being 9-15%, but on < ruby 1.8.6p266 it will show up dispersed across various other function calls.

brynary commented Jun 2, 2009

I'm installing the new gem now. Version information for completeness:

Leopard
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5484)

Owner

tmm1 commented Oct 13, 2009

Fixed.

tmm1 added a commit that referenced this issue Aug 21, 2012

prevent explosions when stopping while paused
Breakpoint 1, CpuProfiler::DisableHandler (this=0x7fa1ce890ce0) at src/profiler.cc:271
271   RAW_CHECK(prof_handler_token_ != NULL, "SIGPROF handler is not registered");
Current language:  auto; currently c++

Program received signal SIGABRT, Aborted.
0x00007fa1d7df9ed5 in raise () from /lib/libc.so.6
(gdb) where
 #0  0x00007fa1d7df9ed5 in raise () from /lib/libc.so.6
 #1  0x00007fa1d7dfb3f3 in abort () from /lib/libc.so.6
 #2  0x00007fa1ce685634 in CpuProfiler::DisableHandler (this=0x7fa1ce890ce0) at src/profiler.cc:271
 #3  0x00007fa1ce6859b0 in CpuProfiler::Stop (this=0x7fa1ce890ce0) at src/profiler.cc:209
 #4  0x00007fa1ce685a2a in ~CpuProfiler (this=0x7fa1ce890ce0) at src/profiler.cc:196
 #5  0x00007fa1d7dfc9cd in exit () from /lib/libc.so.6
 #6  0x0000000000425310 in ruby_stop (ex=<value optimized out>) at eval.c:1689
 #7  0x000000000042dcd1 in ruby_run () at eval.c:1710
 #8  0x0000000000412063 in main (argc=9, argv=0x7fff08f9b6e8, envp=<value optimized out>) at main.c:48

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment