Project

General

Profile

Actions

Bug #10656

closed

mkmf have_func fails if Ruby is compiled with static libruby

Added by hongli (Hongli Lai) about 10 years ago. Updated almost 10 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
[ruby-core:67152]

Description

If Ruby is compiled with static libruby, then mkmf have_func calls will fail. This is because have_func tries to compile a binary, passing -lruby-static to the compiler. However this fails because binary also needs to be linked to a bunch of libraries that ruby-static.a depends on, such as -lm, -lrt, -ldl etc.

See Phusion Passenger bug 1314 comment 68140592 for details and for an mkmf.log. Users who have a static libruby are unable to use the Phusion Passenger native extension, because a have_func('rb_thread_call_without_gvl') failed where it should have succeeded.

Updated by nobu (Nobuyoshi Nakada) about 10 years ago

  • Status changed from Open to Third Party's Issue

Updated by nobu (Nobuyoshi Nakada) about 10 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED

Updated by hongli (Hongli Lai) about 10 years ago

Hm, I see. We clear $LIBS in order to fix https://github.com/phusion/passenger/issues/168, but that may be interfering. Let me investigate this further.

Updated by hongli (Hongli Lai) almost 10 years ago

You were right. I've fixed this in Passenger 4.0.57. Thanks Nobuyoshi.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0