Project

General

Profile

Bug #10625

configure --with or --without-jemalloc fails

Added by sakuro (Sakuro OZAWA) almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
trunk@96fc310
[ruby-core:66994]

Description

I have installed jemalloc(version 3.6.0) from MacPorts on OSX Yosemite and tried building ruby trunk@96fc310.

The result were

$ ../configure --srcdir=.. --with-opt-dir=/opt/local --with-jemalloc
:
checking size of long long... configure: error: in `/Users/sakuro/Projects/github.com/sakuro/ruby/build-with-jemalloc':
configure: error: cannot compute sizeof (long long)

fails.

$ ../configure --srcdir=.. --with-opt-dir=/opt/local --without-jemalloc
:
checking size of long long... configure: error: in `/Users/sakuro/Projects/github.com/sakuro/ruby/build-without-jemalloc':
configure: error: cannot compute sizeof (long long)

fails.

$ ../configure --srcdir=.. --with-opt-dir=/opt/local
:
config.status: creating GNUmakefile
config.status: creating Makefile
config.status: creating ruby-2.2.pc

succeeds.

The header of jemalloc resides as /opt/local/include/jemalloc/jemalloc.h and seems correctly recognized by the script.

checking for malloc_conf in -ljemalloc... yes
checking jemalloc/jemalloc.h usability... yes
checking jemalloc/jemalloc.h presence... yes
checking for jemalloc/jemalloc.h... yes

Files

configure-output.tar.bz2 (73.5 KB) configure-output.tar.bz2 sakuro (Sakuro OZAWA), 12/20/2014 06:26 AM

Updated by nobu (Nobuyoshi Nakada) almost 6 years ago

This is consist of 2 issues.

  • with_jemalloc is set to yes even if --without-jemalloc is given.
  • MacPorts jemalloc's install_name has the base name only, so its runtime library needs to be located in a system standard library path, or one of DYLD_LIBRARY_PATH.

Updated by nobu (Nobuyoshi Nakada) almost 6 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r48907.


configure.in: fix jemalloc option

  • configure.in (jemalloc): fix option argument, should use $withval but not yes always. [ruby-core:66994] [Bug #10625]
  • configure.in (jemalloc): defer adding the liner option to get rid of linking contest against jemalloc, so that it works without runtime dynamic load path.

Updated by nobu (Nobuyoshi Nakada) almost 6 years ago

Fixed the former bug, so --without-jemalloc should work.
But the latter is caused by MacPorts jemalloc, it is just a workaround and you still need to set DYLD_LIBRARY_PATH to run built binaries.
OS X ld(1) seems not to provide a way to override the runtime load path for linked libraries at link time.

Also available in: Atom PDF