[#111712] [Ruby master Feature#19322] Support spawning "private" child processes — "kjtsanaktsidis (KJ Tsanaktsidis) via ruby-core" <ruby-core@...>
SXNzdWUgIzE5MzIyIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGtqdHNhbmFrdHNpZGlzIChLSiBUc2Fu
14 messages
2023/01/07
[ruby-core:111780] [Ruby master Bug#19331] --enable-rpath results in incorrect RPATH in Ruby 3.1.3
From:
"Kulikjak (Jakub Kulik) via ruby-core" <ruby-core@...>
Date:
2023-01-11 14:29:48 UTC
List:
ruby-core #111780
Issue #19331 has been reported by Kulikjak (Jakub Kulik).
----------------------------------------
Bug #19331: --enable-rpath results in incorrect RPATH in Ruby 3.1.3
https://bugs.ruby-lang.org/issues/19331
* Author: Kulikjak (Jakub Kulik)
* Status: Open
* Priority: Normal
* ruby -v: 3.1.3
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
I just updated Ruby from 3.1.2 to 3.1.3 and found out that all .so libraries from the enc directory have wrong RPATH/RUNPATH (when building with `--enable-rpath`). I first hit this on Solaris, but my testing on Linux resulted in the same thing. It can be easily reproduced with the following:
```
wget http://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.3.tar.gz
tar xzf ruby-3.1.3.tar.gz
cd ruby-3.1.3
./configure --prefix=/usr/ruby/3.1 --mandir=/usr/ruby/3.1/share/man --bindir=/usr/ruby/3.1/bin --sbindir=/usr/ruby/3.1/sbin --libdir=/usr/ruby/3.1/lib/amd64 --with-rubylibprefix=/usr/ruby/3.1/lib/ruby --enable-shared --enable-rpath
/usr/bin/make -j 16 -l 32
objdump -x ./.ext/x86_64-linux/enc/windows_31j.so | grep RPATH
```
While previously this resulted in the following output:
`RPATH /usr/ruby/3.1/lib/amd64`
in 3.1.3 it is wrongly set to the build directory:
`RPATH /home/jkulik/rubytest/ruby-3.1.3`
I tried looking for some obvious change but didn't find the core of this issue yet. All I found out is that generated `enc.mk` differs in `prefix` and `libdir`
```
-prefix = /usr/ruby/3.1
+prefix = /home/jkulik/rubytest/ruby-3.1.3
exec_prefix = $(prefix)
-libdir = $(exec_prefix)/lib/amd64
+libdir = /home/jkulik/rubytest/ruby-3.1.3
```
`rbconfig.rb` is similar in both versions, but when I print out `CONFIG` in `make_encmake.rb` right after `load File.expand_path("lib/mkmf.rb", dir)`, I can see the differences from above, so it's probably something in the `lib/mkmf.rb` file that changes that.
I am seeing the same issue in the current latest ruby 3.1 branch cloned from github.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/