Project

General

Profile

Actions

Bug #15470

closed

Getting Jemalloc to work with 2.6.0

Added by kaspergrubbe (Kasper Grubbe) over 5 years ago. Updated over 5 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
[ruby-core:90744]

Description

I have a install script that installs all build requirements for Ruby together with libjemalloc, it then configures Ruby with the --with-jemalloc flag, they were all run on Debian 9 which installs jemalloc 3.6.0 from the Debian repositories.

When I run my script with Ruby 2.5, I get the following output from irb:

puts RbConfig::CONFIG['LIBS']
# -lpthread -ljemalloc -ldl -lcrypt -lm

However, if I build Ruby 2.6 in the exact same way, I do not see -ljemalloc flag:

puts RbConfig::CONFIG['LIBS']
# -lm

I've attached the output from the configure and make steps to this.

Did something change? Or do I need to change the way I do jemalloc detection with Ruby 2.6?


Files

2-6.log (71.1 KB) 2-6.log configure and make output from Ruby 2.6 kaspergrubbe (Kasper Grubbe), 12/27/2018 03:43 PM
2-5.log (62.8 KB) 2-5.log configure and make output from Ruby 2.5 kaspergrubbe (Kasper Grubbe), 12/27/2018 03:43 PM
rubyinstall.sh (1.97 KB) rubyinstall.sh install script kaspergrubbe (Kasper Grubbe), 12/27/2018 03:45 PM

Updated by mseneadza (Michael Seneadza) over 5 years ago

I ran into this the other day. Try:

irb(main):002:0> puts RbConfig::CONFIG['MAINLIBS']
-lpthread -ljemalloc -ldl -lobjc

Updated by kaspergrubbe (Kasper Grubbe) over 5 years ago

mseneadza (Michael Seneadza) wrote:

I ran into this the other day. Try:

irb(main):002:0> puts RbConfig::CONFIG['MAINLIBS']
-lpthread -ljemalloc -ldl -lobjc

Oh that did work for me too!

irb(main):001:0> puts RbConfig::CONFIG['MAINLIBS']
-lz -lpthread -lrt -lrt -ljemalloc -ldl -lcrypt -lm

Updated by shevegen (Robert A. Heiler) over 5 years ago

Nice - I did not know about MAINLIBS in RbConfig::CONFIG before either.

Updated by mame (Yusuke Endoh) over 5 years ago

  • Status changed from Open to Rejected

So, we can close this ticket, right? Let me know if you still have any trouble.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0