https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112013-10-01T21:03:46ZRuby Issue Tracking SystemRuby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=421622013-10-01T21:03:46Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>Was it possible ever?</p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=421642013-10-01T21:41:01Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Open</i></li></ul><p>In Ruby 2.0, when using "--with-multiarch" together with "--with-rubyarchprefix", it used ${libdir} for libruby.so library placement (i.e. /usr/lib64/). Now it is hardcoded to ${libdir}/${arch} (i.e. /usr/lib64/x86_64-linux). Hence there is no way how to get rid of x86_64-linux folder and place the library directly into /usr/lib64.</p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=473802014-06-26T08:46:37Zlotheac (Lauri Tirkkonen)lotheac@iki.fi
<ul></ul><p>I second this patch. I was using --with-multiarch --with-archlibdir --with-rubylibprefix --with-rubyarchprefix --with-rubyarchsiteprefix on ruby 2.0.0 to get a correct directory layout on OmniOS, but on 2.1.2 that no longer works: $(arch) is "i386-solaris2.11" for both 32 and 64 bit builds on illumos, so the default behavior is the wrong thing and should be configurable. With this patch I can get the shared library placed where I want it to be.</p>
<p>Looks like there's another related issue though. Having built with this patch it looks like --with-rubyarchprefix=lib/amd64/ruby has no effect: the arch-specific libs end up in lib/ruby/2.1.0/i386-solaris2.11 anyways (rubyarchdir seems to be set explicitly to that somewhere, I'm trying to figure out where)</p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=473812014-06-26T10:06:44Zlotheac (Lauri Tirkkonen)lotheac@iki.fi
<ul></ul><p>Lauri Tirkkonen wrote:</p>
<blockquote>
<p>Looks like there's another related issue though. Having built with this patch it looks like --with-rubyarchprefix=lib/amd64/ruby has no effect: the arch-specific libs end up in lib/ruby/2.1.0/i386-solaris2.11 anyways (rubyarchdir seems to be set explicitly to that somewhere, I'm trying to figure out where)</p>
</blockquote>
<p>I'm wrong: the flag for multiarch is --enable-multiarch, not --with-multiarch, which is what caused my issue. The patch for this issue does work, sorry for the noise.</p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=979742022-06-14T06:13:26Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li><li><strong>Backport</strong> deleted (<del><i>1.9.3: UNKNOWN, 2.0.0: UNKNOWN</i></del>)</li></ul><p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/703">@vo.x (Vit Ondruch)</a> Do you still want this? I'd like to know if the patch is still need to review</p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=979772022-06-14T07:10:30Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul></ul><p>Yes please! We still carry around the patch in Fedora:</p>
<p><a href="https://src.fedoraproject.org/rpms/ruby/blob/rawhide/f/ruby-2.1.0-Enable-configuration-of-archlibdir.patch" class="external">https://src.fedoraproject.org/rpms/ruby/blob/rawhide/f/ruby-2.1.0-Enable-configuration-of-archlibdir.patch</a></p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=979782022-06-14T07:12:03Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul></ul><p>Although I have not checked what is the situation with the <code>--with-rubyarchprefix</code> for a long time.</p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=979802022-06-14T08:07:06Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Assigned</i></li></ul><p>Okay thanks for your quick answer. <a class="user active user-mention" href="https://redmine.ruby-lang.org/users/4">@nobu (Nobuyoshi Nakada)</a> Could you review the patch?</p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=980092022-06-15T03:55:13Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/703">@vo.x (Vit Ondruch)</a> With your patch and <code>--with-multiarch --with-archlibdir='${libdir}'</code>, not only libruby.so but also all standard library extensions are placed under <code>${libdir}</code> without <code>${arch}</code>.<br>
Is this intentional?</p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=980502022-06-16T08:22:14Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Feedback</i></li></ul> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=1010872023-01-06T13:55:23Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul></ul><p>nobu (Nobuyoshi Nakada) wrote in <a href="#note-9">#note-9</a>:</p>
<blockquote>
<p><a class="user active user-mention" href="https://redmine.ruby-lang.org/users/703">@vo.x (Vit Ondruch)</a> With your patch and <code>--with-multiarch --with-archlibdir='${libdir}'</code>, not only libruby.so but also all standard library extensions are placed under <code>${libdir}</code> without <code>${arch}</code>.<br>
Is this intentional?</p>
</blockquote>
<p>On Fedora, we don't use the <code>${arch}</code> anywhere. It is not assumed that we will mix e.g. aarch64 with x86_64 on one filesystem. We only mix 32/64 bit systems, i.e. i686 together with x86_64. But in that case, the 32 bit code is stored in /usr/lib while the 64 bit code is in /usr/lib64.</p>
<p>Strictly speaking, we still have troubles with headers, but we are using small platform independent wrapper for them. And the <code>${arch}</code> could be useful for some user installed gems, but that is different topic.</p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=1010922023-01-06T14:33:34Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul></ul><p>Actually, the real intention here is to get rid of the <code>${arch}</code> from the paths. The thing is that <code>--enable-multiarch</code> used to make it possible, because this is the implementation:</p>
<pre><code>rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
</code></pre>
<p>As you can see, when <code>multiarch</code> is not defined, then the <code>${arch}</code> is mandatory. With <code>multiarch</code> enabled, it is enough to modify the <code>${archlibdir}</code> and whatever is there is there. It does not impose any expectations.</p>
<p>BTW out of curiosity, assuming that upstream expect that Ruby is installed via <code>./configure && make && make install</code>, what is the reason to bother with <code>${arch}</code> for non multiarch configurations? Does anybody really use single installation directory with multiple architectures?</p> Ruby master - Bug #8973: Allow to configure archlibdir for multiarchhttps://redmine.ruby-lang.org/issues/8973?journal_id=1063502024-01-19T12:15:52Zvo.x (Vit Ondruch)v.ondruch@tiscali.cz
<ul></ul><p>Can this be reopened or should create new ticket?</p>