Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken on Ruby 1.9.2 -- rake build - no int with size 4 #48

Closed
sunaku opened this issue Jul 12, 2011 · 13 comments
Closed

Broken on Ruby 1.9.2 -- rake build - no int with size 4 #48

sunaku opened this issue Jul 12, 2011 · 13 comments

Comments

@sunaku
Copy link

sunaku commented Jul 12, 2011

Hello,

Running rake build fails on my 64-bit computer:

$ rake build
(in /home/stash/lab/rdiscount)
cd ext
/usr/bin/ruby extconf.rb
checking for random()... yes
checking for srandom()... yes
checking for rand()... yes
checking for srand()... yes
checking size of unsigned long... long
checking size of unsigned int... int
no int with size 4
*** extconf.rb failed ***

Obviously int has size 8 (bytes) on a 64-bit machine.

Thanks for your consideration.

@sunaku
Copy link
Author

sunaku commented Jul 12, 2011

I am using ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux] and in that version, the mkmf library's check_sizeof() method is returning a string (in some cases) instead of the number of bytes. In particular:

$ irb -r mkmf
### ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
>> check_sizeof("unsigned long")
checking size of unsigned long... long
"long"
>> check_sizeof("unsigned int")
checking size of unsigned int... int
"int"
>> check_sizeof("unsigned char")
checking size of unsigned char... 1
1

@sunaku
Copy link
Author

sunaku commented Jul 12, 2011

This is fixed in my fork at sunaku/rdiscount@730d12e.

@maccman
Copy link

maccman commented Jul 30, 2011

+1

@davidfstr
Copy link
Owner

Can't repro on latest Ruby 1.9.3p362.

And the patch you've submitted makes a hardcoded assumption, so I can't take it.

@dadamsuk
Copy link

dadamsuk commented Feb 4, 2013

I have the same problem using ruby 1.9.2p320. Any chance of a fix? Upgrading from 1.9.2 -> 1.9.3 is not currently an option for me. Thanks.

@davidfstr
Copy link
Owner

@dadamsuk Please try sunaku's patch sunaku/rdiscount@730d12e.

Ruby 1.9.2 won't compile on the current or last major releases of OS X (Mtn. Lion or Lion), so it is not easy for me to test or debug.

@dadamsuk
Copy link

dadamsuk commented Feb 5, 2013

I tried the patch and it compiled okay, though it threw some other errors when in use, so I am afraid to say I moved to another (albeit slower) markdown processor. 1.9.2-p320 compiles on Mountain Lion - I have it installed with RVM. Would love to move back to RDiscount if you are able to fix.

@davidfstr
Copy link
Owner

1.9.2-p320 compiles on Mountain Lion

Hmm. You must have overridden the default llvm-gcc with real gcc. I'll take another look either today or Thursday.

@davidfstr davidfstr reopened this Feb 6, 2013
@davidfstr
Copy link
Owner

I think it is bad policy to support anything less than the latest stable Ruby on 1.9.x, so I won't be taking this bug. Please upgrade your Ruby to 1.9.3 or greater when you are able.

For more information about Ruby versions I will support, please see the Support Matrix.

Closing as Unsupported.

@davidfstr
Copy link
Owner

Reopening to track while I reevaluate 1.9.2 support.

@davidfstr davidfstr reopened this Apr 3, 2013
@gdelfino
Copy link

gdelfino commented May 2, 2013

I'm having the same problem with ruby-1.9.2-p320

@davidfstr
Copy link
Owner

I don't anticipate having time to fix this myself. If you care enough about Ruby 1.9.2, submit me a patch. Otherwise upgrade to Ruby 1.9.3 or later.

Marking for Community Support.

@davidfstr
Copy link
Owner

I have received no patch for this in over a year, so I'm assuming the community does not have a strong enough desire to restore support for the old Ruby 1.9.2 version itself. Closing.

gbuesing pushed a commit to gbuesing/ruby-sdk that referenced this issue Nov 28, 2016
1.9.2 was not a stable ruby version and has problems to compile
all over the place. People should move to 1.9.3 anyway. This removes
the issue with rdiscount which you can read up on here:

davidfstr/rdiscount#48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants