Project

General

Profile

Actions

Bug #3306

closed

rbconfig.rb RPATHFLAG wrong for AIX

Added by pedz (Perry Smith) about 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
ruby 1.9.1p376 (2009-12-07 revision 26041) [powerpc-aix5.3.0.0]
Backport:
[ruby-core:30280]

Description

=begin
When I do:

gem install curb

(as an example), a shared library is created but the shared library can not load. I tracked it back to the line in rbconfig.rb which is:

CONFIG["RPATHFLAG"] = " -Wl,-blibpath:%1$-s"

This ends up producing -Wl,-blibpath:/usr/local/lib

on the final link.

This is incorrect because it does not include /usr/lib and is also a little bit dangerous for other reasons. The flag should not be necessary unless the user is doing something really strange. The libpath that was used at link time is buried into the executable. The -blibpath flag overrides this with a new value. Generally, it is not needed. But, if you decide to use it, you need to include /usr/lib or it will not be searched and the load of the shared library will fail because very often something from another library is needed.

I changed my rbconfig.rb file to simpley:

CONFIG["RPATHFLAG"] = ""

and it appears to be working for me.

I am not sure when this started. I believe with p376 but I'm not sure. My previous version was p243.
=end

Actions #1

Updated by kanemoto (Yutaka Kanemoto) about 12 years ago

=begin
Hi,

Thank you very much for reporting this issue.

I think this can be fixed by r27307. I will ask branch maintainer to
back port it to ruby_1_9_1.

After applying it:
% ruby -v -rcurb -e 'p Curl::Easy.perform("http://www.google.com/")'
ruby 1.9.1p424 (2010-05-03 revision 27598) [powerpc-aix5.3.0.0]
#<Curl::Easy http://www.google.com>

--
Yutaka KANEMOTO
http://d.hatena.ne.jp/kinpoco/

=end

Actions #2

Updated by naruse (Yui NARUSE) almost 12 years ago

  • Target version changed from 1.9.1 to 2.0.0

=begin

=end

Actions #3

Updated by naruse (Yui NARUSE) over 11 years ago

  • Status changed from Open to Closed

=begin

=end

Actions

Also available in: Atom PDF