Forum: Ruby on Rails Firebird issue in fb.so - ruby: symbol lookup error:

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0ae8604554b06b27f83d34d9694965ce?d=identicon&s=25 Martin Koca (koca)
on 2009-05-04 15:20
Hi,
I want to connect to firebird db via RoR application. But when I attempt
to connect then server shutdown with the following error :

ruby: symbol lookup error: /usr/lib/ruby/gems/1.8/gems/fb-0.5.9/./fb.so:
undefined symbol: isc_attach_database

I have tried to figure out the solution, but without success. I think I
don't have some library, but ....? Do you have any idea, clues ?

Thank you in advance
koca


32bit Linux (CentOS)
# rails --version
Rails 2.3.2

# ruby --version
ruby 1.8.5 (2006-08-25) [i386-linux]

# gem list

*** LOCAL GEMS ***

actionmailer (2.3.2, 2.2.2)
actionpack (2.3.2, 2.2.2)
activerecord (2.3.2, 2.2.2)
activeresource (2.3.2, 2.2.2)
activesupport (2.3.2, 2.2.2)
capistrano (2.5.5)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
diff-lcs (1.1.2)
echoe (3.1.1)
fastthread (1.0.7, 1.0.4, 1.0.1)
fb (0.5.9)
fb_adapter (0.5.8)
fireruby (0.4.3)
gem_plugin (0.2.3)
highline (1.5.0)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.7)
net-scp (1.0.2)
net-sftp (2.0.2)
net-ssh (2.0.11)
net-ssh-gateway (1.0.1)
passenger (2.2.2, 2.1.2, 2.0.6)
prawn (0.4.1)
prawn-layout (0.1.0)
rack (1.0.0, 0.9.1)
rails (2.3.2, 2.2.2)
rails-firephp (0.0.1)
rake (0.8.4)
rcov (0.8.1.2.0)
rmagick (2.9.1)
rubyforge (1.0.3)
searchlogic (1.6.6, 1.6.5)
C7141d4b9bd6ac1f4fb94220fcdd892c?d=identicon&s=25 Fidel Viegas (Guest)
on 2009-05-04 15:35
(Received via mailing list)
On Mon, May 4, 2009 at 2:20 PM, Martin Koca
<rails-mailing-list@andreas-s.net> wrote:
>
1) Install the following gems:

fb (0.5.9)
fb_adapter (0.5.8)

2) Make sure that you have libfbclient.so in your /usr/lib

3) Go to where fb-0.5.9 folder is. In mine it is found at
/usr/lib/ruby/gems/1.8/gems/fb-0.5.9
4) Type sudo make install. This will build the fb.so for the version
of firebird you are using. I have tried it with FB 2.0.x and 2.1.x

That's it.

Hope that solves your problem.

All the best,

Fidel.
0ae8604554b06b27f83d34d9694965ce?d=identicon&s=25 Martin Koca (koca)
on 2009-05-04 16:10
Hi,

Fidel Viegas wrote:
...
>
> 2) Make sure that you have libfbclient.so in your /usr/lib
>
> 3) Go to where fb-0.5.9 folder is. In mine it is found at
> /usr/lib/ruby/gems/1.8/gems/fb-0.5.9
> 4) Type sudo make install. This will build the fb.so for the version
> of firebird you are using. I have tried it with FB 2.0.x and 2.1.x
>
thanks, but the problem still persists. If I try make install then
"make: Nothing to be done for `install'."
So if I perform make clean and then make install and then try to attempt
to connect I get the same error.
ruby: symbol lookup error: /usr/lib/ruby/gems/1.8/gems/fb-0.5.9/./fb.so:
undefined symbol: isc_attach_database


Just a note that I get some warnings for make install too, eg. :
fb.c: In function ‘fb_error_check’:
fb.c:380: warning: passing argument 1 of ‘isc_sqlcode’ from incompatible
pointer type

(I'm trying to connect like :
 db = Database.new(
   :database => "x.x.x.x:d:\\database\\tesdb.gdb",
        :username => 'username',
        :password => 'password')
        conn = db.connect rescue db.create.connect
)


Thanks
koca
C7141d4b9bd6ac1f4fb94220fcdd892c?d=identicon&s=25 Fidel Viegas (Guest)
on 2009-05-04 19:19
(Received via mailing list)
On Mon, May 4, 2009 at 3:10 PM, Martin Koca
<rails-mailing-list@andreas-s.net> wrote:
>> 4) Type sudo make install. This will build the fb.so for the version
>> of firebird you are using. I have tried it with FB 2.0.x and 2.1.x
>>
> thanks, but the problem still persists. If I try make install then
> "make: Nothing to be done for `install'."
> So if I perform make clean and then make install and then try to attempt
> to connect I get the same error.
> ruby: symbol lookup error: /usr/lib/ruby/gems/1.8/gems/fb-0.5.9/./fb.so:
> undefined symbol: isc_attach_database
>
>

Which version of Firebird are you using and how did you install it?
Was it from the repository? Or from the rpm?

I have installed mine from the .tar.gz archive, and it created the
symbolic links for all the libraries in /opt/firebird/lib to /usr/lib

I know if you install from the repository (at least for Ubuntu), you
will need to install also firebird-devel.


>        conn = db.connect rescue db.create.connect
> )
>

That seems to be ok, but the path should be /database/testdb.gdb. Are
you using interbase or firebird? Or is it just a habit from interbase
to give your database files a .gdb extension?

Anyway, try to check if you have the development libraries all in
place. When I first installed the fb gem, I had the same error you
did, but then I cleaned up all the fb libraries in /usr/lib and then
created the symbolic links by hand, and that solved my problem. But,
as I said, I installed from the .tar.gz archive on Ubuntu. Don't know
if the same will resolve your issue with CentOS, but I think it
should.

Hope that helps you solve your problem.

Fidel.
0ae8604554b06b27f83d34d9694965ce?d=identicon&s=25 Martin Koca (koca)
on 2009-05-04 20:24
Fidel Viegas wrote:
> On Mon, May 4, 2009 at 3:10 PM, Martin Koca
> <rails-mailing-list@andreas-s.net> wrote:
>>> 4) Type sudo make install. This will build the fb.so for the version
>>> of firebird you are using. I have tried it with FB 2.0.x and 2.1.x
>>>
>> thanks, but the problem still persists. If I try make install then
>> "make: Nothing to be done for `install'."
>> So if I perform make clean and then make install and then try to attempt
>> to connect I get the same error.
>> ruby: symbol lookup error: /usr/lib/ruby/gems/1.8/gems/fb-0.5.9/./fb.so:
>> undefined symbol: isc_attach_database
>>
>>
>
> Which version of Firebird are you using and how did you install it?
> Was it from the repository? Or from the rpm?
>

FirebirdCS-2.1.2.18118-0.i686.rpm, but I have tried older version too.
This package is from the rpm, because in the repo is no Firebird
available. Hope this include devel too. I have checked libraries in the
/usr/lib and it looks sane. I'm going to delete them and add manually.

> I have installed mine from the .tar.gz archive, and it created the
> symbolic links for all the libraries in /opt/firebird/lib to /usr/lib
>
> I know if you install from the repository (at least for Ubuntu), you
> will need to install also firebird-devel.
>
>
>> � � � �conn = db.connect rescue db.create.connect
>> )
>>
>
> That seems to be ok, but the path should be /database/testdb.gdb. Are
> you using interbase or firebird? Or is it just a habit from interbase
> to give your database files a .gdb extension?
>
> Anyway, try to check if you have the development libraries all in
> place. When I first installed the fb gem, I had the same error you
> did, but then I cleaned up all the fb libraries in /usr/lib and then
> created the symbolic links by hand, and that solved my problem. But,
> as I said, I installed from the .tar.gz archive on Ubuntu. Don't know
> if the same will resolve your issue with CentOS, but I think it
> should.

I will try. Libraries looks sane.

>
> Hope that helps you solve your problem.
>
> Fidel.

Thanks
 koca
1a1f746fc22369344097fa9f81ebc742?d=identicon&s=25 Martijn Harder (m4rtijn)
on 2009-08-05 16:56
Hello,

I would like to know if this issue has been resolved. I have the same
problems at the moment on a opensuse 11.1 box.

Regards
M4rtijn
This topic is locked and can not be replied to.