# Ruby extensions on 64 bit linux

**URL:** <https://rubytalk.org/t/ruby-extensions-on-64-bit-linux/19735>\
**Category:** ruby-talk\
**Created:** [25 July 2005 18:24 UTC](https://rubytalk.org/t/ruby-extensions-on-64-bit-linux/19735 "2005-07-25T18:24:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![J-Van](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@J-Van](https://rubytalk.org/u/J-Van)\
**Post date:** [25 July 2005 18:24 UTC](https://rubytalk.org/t/ruby-extensions-on-64-bit-linux/19735/1 "2005-07-25T18:24:26Z")

</div>

[http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/149446](http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/149446) makes  
me wonder, when writing C extensions, are there anything I should be  
watching out for when intending the code to be run on a 64 bit OS?

Thanks,  
Joe

---

<div class="post-metadata">

**Author:** ![Xavier1](https://avatars.discourse-cdn.com/v4/letter/x/f04885/32.png) [@Xavier1](https://rubytalk.org/u/Xavier1)\
**Post date:** [25 July 2005 19:06 UTC](https://rubytalk.org/t/ruby-extensions-on-64-bit-linux/19735/2 "2005-07-25T19:06:00Z")

</div>

I wrote one that works on x86, amd64 & Sparc Ultra.  
The only issue I had was my own fault. I had forgotten to declare a  
function param of type VALUE and it segfaulted on amd64.  
The compiler had not issued any warnings on x86 and it went unnoticed.  
Someone complained, I got my hands on an amd64, compiled, got the  
compiler warnings, and fixed the problem in minutes.

Hth,  
Xavier

> **···**
>
> On Tue, 26 Jul 2005 03:24:26 +0900, Joe Van Dyk wrote:
> 
> > [http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/149446](http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/149446) makes  
> > me wonder, when writing C extensions, are there anything I should be  
> > watching out for when intending the code to be run on a 64 bit OS?
> > 
> > Thanks,  
> > Joe

---

<div class="post-metadata">

**Author:** ![daz](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@daz](https://rubytalk.org/u/daz)\
**Post date:** [26 July 2005 00:26 UTC](https://rubytalk.org/t/ruby-extensions-on-64-bit-linux/19735/3 "2005-07-26T00:26:05Z")

</div>

Joe Van Dyk wrote:

> [...] when writing C extensions, are there anything I should be  
> watching out for when intending the code to be run on a 64 bit OS?

[Target 32- and 64-bit Platforms Together with a Few Simple Datatype Changes]

> **[Target 32- and 64-bit Platforms Together with a Few Simple Datatype Changes](https://www.devx.com/c-zone/27510/?pf=true)**
>
> n the early 1990s, 64-bit systems were considered “a solution waiting for a problem.” In 2005, however, this technology is rapidly gaining a critical mass of users. Even if you’re aiming at 32-bit platforms for the time being, adding 64-bit...

daz
