Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 419851 - dev-lang/ruby-1.9.3_p194-r1 fails to build on x32 ABI
Summary: dev-lang/ruby-1.9.3_p194-r1 fails to build on x32 ABI
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
: 426388 (view as bug list)
Depends on:
Blocks: x32
  Show dependency tree
 
Reported: 2012-06-06 06:57 UTC by Tim Harder
Modified: 2015-09-13 06:15 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
add x32 support (ruby-1.9.3_p194-x32.patch,412 bytes, patch)
2012-06-06 06:57 UTC, Tim Harder
Details | Diff
ruby-1.9.3_p448-asm-ilp32+volatile.diff (ruby-1.9.3_p448-asm-ilp32+volatile.diff,811 bytes, patch)
2013-08-09 13:27 UTC, Bertrand Jacquin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Harder gentoo-dev 2012-06-06 06:57:42 UTC
Created attachment 314383 [details, diff]
add x32 support

The attached patch is needed to make the assembly syntax work with x32. Otherwise the build fails and outputs errors similar to:

gc.c:1316: Error: operand type mismatch for `movq'
Comment 1 Hans de Graaff gentoo-dev Security 2012-06-09 08:07:23 UTC
Could you report this upstream?
Comment 2 Tim Harder gentoo-dev 2012-06-09 08:08:04 UTC
(In reply to comment #1)
> Could you report this upstream?

Yep, I was going to do that shortly. :)
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-06-19 12:50:20 UTC
Tim are you sure that suffices to have Ruby _work_? I'm sure it suffices for it to _build_ but that's a different problem.

There are other uses of __x86_64__ around the place — I wouldn't be surprised if there were more hardcoding of "the system is 64-bit" on that situation, so I'd really be tempted to say "report this to upstream and we won't bother until a new release is made"...
Comment 4 Tim Harder gentoo-dev 2012-06-19 21:09:46 UTC
(In reply to comment #3)
> Tim are you sure that suffices to have Ruby _work_? I'm sure it suffices for
> it to _build_ but that's a different problem.

I have no idea since I'm not a ruby expert. I just focused on getting it to build and all the build tests to pass. 

> There are other uses of __x86_64__ around the place — I wouldn't be
> surprised if there were more hardcoding of "the system is 64-bit" on that
> situation, so I'd really be tempted to say "report this to upstream and we
> won't bother until a new release is made"...

I'm sure there probably are. In no place of my first comment did I say this patch solves every problem. I noted that it simply solves one build time issue.
Comment 5 Hans de Graaff gentoo-dev Security 2012-07-13 05:49:08 UTC
*** Bug 426388 has been marked as a duplicate of this bug. ***
Comment 6 devsk 2012-07-13 06:42:40 UTC
Why did this bug not pop when I did search for ruby?
Comment 7 Flo Gravo 2013-05-24 19:42:35 UTC
This issue still exists in dev-lang/ruby-1.9.3_p429 and hasn't been reported upstream.
Comment 8 Bertrand Jacquin 2013-08-09 13:27:17 UTC
Created attachment 355486 [details, diff]
ruby-1.9.3_p448-asm-ilp32+volatile.diff

The following commit in SVN ruby trunk fix this issue :

r39186:
 * gc.h (SET_MACHINE_STACK_END): use __volatile__ instead of volatile.

40636:
 * gc.h (SET_MACHINE_STACK_END): Add !defined(_ILP32) to a defining
   condition to avoid compilation error on x32.
   https://sites.google.com/site/x32abi/

See Also:
 https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/39186/diff
 https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/40636/diff

Here is a patch that integrated both of them in one shot. Previous patchs doesn't apply as-is as it have been some update in trunk not reported to 1.9 branches etc..
Comment 9 Tolga Dalman 2014-11-02 13:04:57 UTC
Ruby 1.9.3-p550 doesn't seem to include your patches. Do you have any feedback from upstream ?
Comment 10 Hans de Graaff gentoo-dev Security 2014-11-04 06:21:49 UTC
(In reply to Tolga Dalman from comment #9)
> Ruby 1.9.3-p550 doesn't seem to include your patches. Do you have any
> feedback from upstream ?

These patches are available in ruby 2.1.4, so I expect that version to work with x32.
Comment 11 Bertrand Jacquin 2015-02-04 22:27:03 UTC
Note that patch is still needed for dev-lang/ruby-1.9.3_p551
Comment 12 Hans de Graaff gentoo-dev Security 2015-09-13 06:15:50 UTC
We are in the process of masking ruby 1.9 for removal so we will not fix this for ruby 1.9.