# Sybase ctlib Adapter on 64 bit machine

**URL:** <https://www.ruby-forum.com/t/sybase-ctlib-adapter-on-64-bit-machine/85684>\
**Category:** Rails\
**Created:** [February 15, 2007, 3:28pm UTC](https://www.ruby-forum.com/t/sybase-ctlib-adapter-on-64-bit-machine/85684 "2007-02-15T15:28:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![burrowsm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d78d45/32.png) [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Post date:** [February 15, 2007, 3:28pm UTC](https://www.ruby-forum.com/t/sybase-ctlib-adapter-on-64-bit-machine/85684/1 "2007-02-15T15:28:08Z")

</div>

All -

We have hit a wall with trying to get our Ruby On Rails app set up and  
running on a RedHat Linux Enterprise 4 64 bit Machine. We have  
everything running fine on Fedora Core 5 x686 machines, but were asked  
to move to a more beefed up Dev env.

We got the adapter to compile fine following the README file and using  
the Sybase 64bit libraries, but when we run the example we get a Memory  
Allocation Error. The box has 2Gig of memory and practically all is  
free.

Not sure if the adapter is compatible for 64bit processors. Any help or  
direction you can provide would be greatly appreciated.

Here are the steps and error we are receiving using irb:

require ‘sybsql.rb’  
irb(main):003:0\> query =  
SybSQL.new({‘S’=\>‘ **’,‘U’=\>'** \*\*’,‘P’=\>’\*\*\*\*\*\*’})  
/pkgs/roots/software/ruby/lib/ruby/site\_ruby/1.8/x86\_64-linux/sybct.rb:27:in  
`connect': failed to allocate memory (NoMemoryError) from /pkgs/roots/software/ruby/lib/ruby/site_ruby/1.8/x86_64-linux/sybct.rb:27:in`open’  
from  
/pkgs/roots/software/ruby/lib/ruby/site\_ruby/1.8/x86\_64-linux/sybsql.rb:269:in  
`initialize' from (irb):3:in`new’  
from (irb):3:in `irb_binding' from /pkgs/roots/software/ruby/lib/ruby/1.8/irb/workspace.rb:52:in`irb\_binding’  
from /pkgs/roots/software/ruby/lib/ruby/1.8/irb/workspace.rb:52

If you need further info on the environment please let me know.

Thanks in advace for your help and direction.

Matt B.

---

<div class="post-metadata">

**Author:** ![burrowsm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d78d45/32.png) [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Post date:** [April 3, 2007, 1:36pm UTC](https://www.ruby-forum.com/t/sybase-ctlib-adapter-on-64-bit-machine/85684/2 "2007-04-03T13:36:18Z")

</div>

Hi

Are you solve this probelm?

Maybe you can build sybct adaptor on 64 bit machine

modify extconf.rb like this

$LOCAL\_LIBS = “-lct64 -lcs64 -lsybtcl64 -lcomn64 -lintl64 -rdynamic -  
ldl -lnsl -lm”  
$CFLAGS = “-g -Wall -I#{sybase\_ocs}/include -DSYB\_LP64”

% ruby extconf.rb  
% make

you need 64bit OpenClient libraries.  
– hiroyuki sato

On 2e$B7ne(B15e$BF|e(B, e$B8a8ee(B11:28, Matt B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
