Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 22nd, 2005, 08:53 AM
Anton Nikiforov
Guest
 
Posts: n/a
Default PL/Ruby

Dear sirs,
Does someone made PL/Ruby working on 4.7.1?
I tried alot of things. Manual install, port install and nothing happend.
Please give me the idea how to fix the problem with
plruby.c: In function `pl_tuple_put':
plruby.c:498: error: too few arguments to function `tuplestore_begin_heap'
plruby.c: In function `pl_func_handler':
plruby.c:1450: error: too few arguments to function `tuplestore_begin_heap'
*** Error code 1

Stop in /usr/ports/databases/postgresql-plruby/work/plruby-0.3.8.
*** Error code 1

Stop in /usr/ports/databases/postgresql-plruby.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match




  #2  
Old November 22nd, 2005, 08:53 AM
David Garamond
Guest
 
Posts: n/a
Default Re: PL/Ruby

Anton Nikiforov wrote:[color=blue]
> Dear sirs,
> Does someone made PL/Ruby working on 4.7.1?
> I tried alot of things. Manual install, port install and nothing happend.
> Please give me the idea how to fix the problem with
> plruby.c: In function `pl_tuple_put':
> plruby.c:498: error: too few arguments to function `tuplestore_begin_heap'
> plruby.c: In function `pl_func_handler':
> plruby.c:1450: error: too few arguments to function `tuplestore_begin_heap'
> *** Error code 1
>
> Stop in /usr/ports/databases/postgresql-plruby/work/plruby-0.3.8.
> *** Error code 1[/color]

I just experienced the same today. Apparently extconf.rb can't detect
7.4 correctly (at least on my Redhat 7.3) so it assumes your PG is 7.3
(and thus fails to build). Try using:

$ ruby extconf.rb --with-pgsql-include=... --with-pgsql-version=74

That did it for me.

--
dave


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

  #3  
Old November 22nd, 2005, 08:53 AM
Anton Nikiforov
Guest
 
Posts: n/a
Default Re: PL/Ruby

> Anton Nikiforov wrote:[color=blue]
>[color=green]
>> Dear sirs,
>> Does someone made PL/Ruby working on 4.7.1?[/color][/color]
....skipped....
David Garamond wrote:[color=blue]
>
>
> I just experienced the same today. Apparently extconf.rb can't detect
> 7.4 correctly (at least on my Redhat 7.3) so it assumes your PG is 7.3
> (and thus fails to build). Try using:
>
> $ ruby extconf.rb --with-pgsql-include=... --with-pgsql-version=74
>
> That did it for me.
>[/color]
Thanks, David, but i did try this way already and in the case i build
plruby like this i have the following in the psql:
template1=# create function plruby_call_handler () returns opaque as
'/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so' language 'C';
ERROR: could not load library
"/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so": dlopen
'/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so' failed.
(/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so: Undefined symbol
"rb_hash_delete")
template1=#

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

  #4  
Old November 22nd, 2005, 08:53 AM
David Garamond
Guest
 
Posts: n/a
Default Re: PL/Ruby

Anton Nikiforov wrote:[color=blue]
> Thanks, David, but i did try this way already and in the case i build
> plruby like this i have the following in the psql:
> template1=# create function plruby_call_handler () returns opaque as
> '/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so' language 'C';
> ERROR: could not load library
> "/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so": dlopen
> '/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so' failed.
> (/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so: Undefined symbol
> "rb_hash_delete")
> template1=#[/color]

Hm, I'm pretty clueless myself about the above, but a couple of observation:

1) the path seems strange, why does it install to
/usr/local/lib/ruby/1.6/ instead of the more usual
/usr/local/lib/ruby/site_ruby/1.6/ ...

2) what does 'ldd /usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so' say?
Does it include the line similar to:

libruby.so.1.8 => /usr/lib/libruby.so.1.8 (0x40037000)

(*.so.1.6 in your case).

3) have you tried upgrading your Ruby installation to 1.8?

--
dave


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

  #5  
Old November 22nd, 2005, 08:54 AM
Anton Nikiforov
Guest
 
Posts: n/a
Default Re: PL/Ruby

Hello David, thanks, changing to Ruby18 solved my problem after some
manual passages with woodoo around the computer :)

Best regards,
Anton Nikiforov

David Garamond wrote:[color=blue]
> Anton Nikiforov wrote:
>[color=green]
>> Thanks, David, but i did try this way already and in the case i build
>> plruby like this i have the following in the psql:
>> template1=# create function plruby_call_handler () returns opaque as
>> '/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so' language 'C';
>> ERROR: could not load library
>> "/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so": dlopen
>> '/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so' failed.
>> (/usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so: Undefined symbol
>> "rb_hash_delete")
>> template1=#[/color]
>
>
> Hm, I'm pretty clueless myself about the above, but a couple of
> observation:
>
> 1) the path seems strange, why does it install to
> /usr/local/lib/ruby/1.6/ instead of the more usual
> /usr/local/lib/ruby/site_ruby/1.6/ ...
>
> 2) what does 'ldd /usr/local/lib/ruby/1.6/i386-freebsd5/plruby.so' say?
> Does it include the line similar to:
>
> libruby.so.1.8 => /usr/lib/libruby.so.1.8 (0x40037000)
>
> (*.so.1.6 in your case).
>
> 3) have you tried upgrading your Ruby installation to 1.8?
>[/color]


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,414 network members.