Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 166527 - dev-ruby/ruby-gd: questionable keywording for 64-bit arches
Summary: dev-ruby/ruby-gd: questionable keywording for 64-bit arches
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-12 17:18 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2007-04-20 05:51 UTC (History)
2 users (show)

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


Attachments
Patch to fix segmentation fault with set interlace method (ruby-gd-0.7.4-fix-interlace.patch,241 bytes, patch)
2007-04-19 20:25 UTC, Hans de Graaff
Details | Diff
ruby-gd-0.7.4-r1.ebuild (ruby-gd-0.7.4-r1.ebuild,1.58 KB, text/plain)
2007-04-19 20:25 UTC, Hans de Graaff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2007-02-12 17:18:34 UTC
Both ia64 and ppc64 have dev-ruby/ruby-gd marked as stable, but the code does not seem to be 64-bit safe. The build output hints at this already:

GD.c: In function ‘img_set_interlace’:
GD.c:1380: warning: cast to pointer from integer of different size

and trying to run the example.rb file in the distribution on amd64 results in this:

flame@enterprise ~/devel/hacking/ruby-GD-0.7.4/sample % ruby ./example.rb
./example.rb:16: [BUG] Segmentation fault
ruby 1.8.5 (2006-12-25) [x86_64-linux]

zsh: abort (core dumped)  ruby ./example.rb

the backtrace confirms the build output suggestion:

0  0x0000003000e2f7b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x0000003000e30a4e in *__GI_abort () at abort.c:88
#2  0x0000003041229c70 in rb_bug (fmt=0x30412c435b "Segmentation fault") at error.c:214
#3  0x0000003041298a6a in sigsegv (sig=11) at signal.c:537
#4  <signal handler called>
#5  rb_check_type (x=25716344, t=34) at ruby.h:678
#6  0x00002b8a02153d40 in img_set_interlace (img=<value optimized out>, val=2) at GD.c:1380
#7  0x00000030412355bb in rb_call0 (klass=47871731195360, recv=47871731197560, id=19812, oid=19812, argc=<value optimized out>,
    argv=<value optimized out>, body=0x2b8a018839a0, flags=<value optimized out>) at eval.c:5810


So the package should have likely be marked -amd64 -ia64 -ppc64 rather than ia64 and ppc64 stable.
Comment 1 Markus Rothe (RETIRED) gentoo-dev 2007-02-13 11:38:46 UTC
does work here:

markus@G5 ~ $ uname -m
ppc64
markus@G5 ~ $ ruby /usr/share/doc/ruby-gd-0.7.4/sample/example.rb > file.png
markus@G5 ~ $

and I can open that file.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-02-13 11:44:57 UTC
Compiler version? /me starts to think GCC is crazy.
Comment 3 Markus Rothe (RETIRED) gentoo-dev 2007-02-13 20:16:27 UTC
this is gcc-4.1.1-r3
Comment 4 Markus Rothe (RETIRED) gentoo-dev 2007-03-15 19:33:23 UTC
guess we're out. please CC us again, if you need further information from us.
Comment 5 Raúl Porcel (RETIRED) gentoo-dev 2007-03-26 13:53:57 UTC
In ia64 fails,

# ruby /usr/share/doc/ruby-gd-0.7.4/sample/example.rb > file.png
/usr/share/doc/ruby-gd-0.7.4/sample/example.rb:16: [BUG] Segmentation fault
ruby 1.8.5 (2006-12-04) [ia64-linux]

Marking -ia64. Closing.

Comment 6 Hans de Graaff gentoo-dev Security 2007-04-17 08:21:04 UTC
There seems to be a new upstream, so I've reported the problem there as well. See http://rubyforge.org/projects/ruby-gd/
Comment 7 Hans de Graaff gentoo-dev Security 2007-04-19 20:24:27 UTC
I'm reopening this bug as I found the cause of the segmentation fault. I'm including an updated ebuild and patch to the bug and would be happy to get feedback on this. In particular: does this solve the segmentation fault, and can you create a valid PNG file with the resulting ruby-GD?
Comment 8 Hans de Graaff gentoo-dev Security 2007-04-19 20:25:03 UTC
Created attachment 116758 [details, diff]
Patch to fix segmentation fault with set interlace method
Comment 9 Hans de Graaff gentoo-dev Security 2007-04-19 20:25:44 UTC
Created attachment 116760 [details]
ruby-gd-0.7.4-r1.ebuild
Comment 10 Raúl Porcel (RETIRED) gentoo-dev 2007-04-19 20:54:11 UTC
Yup, it works on ia64.
Comment 11 Hans de Graaff gentoo-dev Security 2007-04-20 05:51:33 UTC
Thanks for the feedback. I have committed the new ebuild and patch to CVS.