Bug #7874

multiarch support enhancements

Added by Antonio Terceiro about 1 year ago. Updated about 1 year ago.

[ruby-core:52395]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
Category:build
Target version:2.0.0
ruby -v:ruby 2.0.0dev (2013-02-17 trunk 39293) Backport:

Description

Hi, I am one the maintainers of Ruby in Debian, thanks a lot for adding multiarch support.

While preparing packages for Ruby 2.0, I found two issues:

1) On a x8664 Debian system with Linux kernel, Ruby will say that the architecture is "x8664-linux", but the standard architecture name for such a system, as used in multiarch-enabled packages, is "x86_64-linux-gnu". In order to not break other systems, I suggest adding a --with-multiarchname argument to ./configure so that the Debian package can pass in the appropriate architecture name during ./configure stage.

2) the pkg-config data also has to be installed inside multiarch paths.

I am attaching patches for both issues.

0001-Allow-setting-arch-name-in-.-configure.patch Magnifier (1.62 KB) Antonio Terceiro, 02/18/2013 03:57 AM

0002-Install-pkgconfig-data-to-architecture-specific-path.patch Magnifier (827 Bytes) Antonio Terceiro, 02/18/2013 03:57 AM

0002-Install-libraries-and-pkg-config-data-into-multiarch.patch Magnifier (1.4 KB) Antonio Terceiro, 02/18/2013 07:28 AM

Associated revisions

Revision 39333
Added by Nobuyoshi Nakada about 1 year ago

configure.in: adjust libdirname

  • configure.in (libdirname): adjust library path name which libruby files will be installed. [Bug #7874]
  • tool/rbinstall.rb (libdir): ditto.

Revision 39334
Added by Nobuyoshi Nakada about 1 year ago

configure.in: target_os suffix

  • configure.in (target_os): do not strip -gnu suffix on Linux if --target is given explicitly. [Bug #7874]

Revision 39338
Added by Nobuyoshi Nakada about 1 year ago

  • tool/rbinstall.rb (libdir): fix typo. [Bug #7874]

Revision 39345
Added by Nobuyoshi Nakada about 1 year ago

configure.in: libdirbasename for -rpath and -installname

  • configure.in (libdirbasename): also -rpath and -installname flags are affected when libruby directory changes. [Bug #7874]

Revision 39347
Added by Nobuyoshi Nakada about 1 year ago

configure.in: expand libdir_basename

  • configure.in (libdir_basename): expand with multiarch in configure, not to defer the expansion till ruby.pc.in and mkmf.rb. [Bug #7874]

Revision 39348
Added by Nobuyoshi Nakada about 1 year ago

ruby.c: fix for multiarch library

  • ruby.c (rubyinitloadpath_safe): try two levels upper for stripping libdir name. [Bug #7874]

Revision 39371
Added by Nobuyoshi Nakada about 1 year ago

mkmf.rb: adjust default library path

  • lib/mkmf.rb (MakeMakefile#init_mkmf): adjust default library path for multiarch. [Bug #7874]

Revision 40580
Added by Nobuyoshi Nakada 12 months ago

ruby.pc.in: rubyarchhdrdir

  • template/ruby.pc.in (Cflags): use rubyarchhdrdir for multiarch. [Bug #7874]

History

#1 Updated by Antonio Terceiro about 1 year ago

Hi,

there is also another problem: when --enabled-shared is used, the shared libraries are not installed in the multiarch path. I am working on a patch for that.

#2 Updated by Vit Ondruch about 1 year ago

Ad 1) You can use --host=x86_64-linux-gnu if I am not mistaken.
Ad 2) It seems to duplicate #7867

#3 Updated by Antonio Terceiro about 1 year ago

Attaching a patch that fixes the path for installing both the libraries and the pkg-config data. It supersedes 0002-Install-pkgconfig-data-to-architecture-specific-path.patch attached before.

#4 Updated by Koichi Sasada about 1 year ago

  • Category set to build
  • Assignee set to Nobuyoshi Nakada

#5 Updated by Yusuke Endoh about 1 year ago

Hello Antoino,

Doesn't Vit's comment help you?
And please attach the patch for "another issue" into the ticket #7867.

Thanks!

Yusuke Endoh mame@tsg.ne.jp

#6 Updated by Antonio Terceiro about 1 year ago

mame (Yusuke Endoh) wrote:

Hello Antoino,

Doesn't Vit's comment help you?

I tried --host= but it does not have any effect on the paths used in the installation. In this case we really need to use the standard architecture name for $arch.

And please attach the patch for "another issue" into the ticket #7867.

Fair enough - just did it. But note that such patch fixes #7867 and stuff I am reporting here (i.e. the install path for libraries (.so, .a) into multiarch paths.

#7 Updated by Nobuyoshi Nakada about 1 year ago

The arch name is taken from --target option, not --host.

#8 Updated by Nobuyoshi Nakada about 1 year ago

As for the second patch, I guess it would be:
ACSUBST(ENABLEMULTIARCH, ${multiarch:-no})
Note the colon.

#9 Updated by Nobuyoshi Nakada about 1 year ago

Sorry, I's confused a little last night.
multiarch is set to an empty string or unset, so terceiro's substitution is correct.

#10 Updated by Yusuke Endoh about 1 year ago

  • Status changed from Open to Assigned

Sorry, I don't understand the situation.
Nobu, do you think that we should import terceiro's patches?

Yusuke Endoh mame@tsg.ne.jp

#11 Updated by Nobuyoshi Nakada about 1 year ago

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

This issue was solved with changeset r39333.
Antonio, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


configure.in: adjust libdirname

  • configure.in (libdirname): adjust library path name which libruby files will be installed. [Bug #7874]
  • tool/rbinstall.rb (libdir): ditto.

#12 Updated by Nobuyoshi Nakada about 1 year ago

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

#13 Updated by Nobuyoshi Nakada about 1 year ago

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

This issue was solved with changeset r39334.
Antonio, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


configure.in: target_os suffix

  • configure.in (target_os): do not strip -gnu suffix on Linux if --target is given explicitly. [Bug #7874]

#14 Updated by Nobuyoshi Nakada about 1 year ago

I think r39334 fixes a longstanding bug, which ignores explicitly specified option, not only guessed name.

#15 Updated by Antonio Terceiro about 1 year ago

thanks!

#16 Updated by Nobuyoshi Nakada about 1 year ago

Others are libdir concerned patches, and I think they are not stable enough to backport yet.

#17 Updated by Antonio Terceiro about 1 year ago

Hi,

With the current state in trunk it does not build anymore:

$ autoreconf && ./configure --target=x86_64-linux-gnu --enable-multiarch
[...]
configure: creating ./config.status
config.status: creating Makefile
config.status: creating ruby-2.0.pc
Variable 'archlibdir' not defined in './ruby.tmp.pc'

Also available in: Atom PDF