Pl-ruby detecting postgresql 7.4 under redhat


(David Garamond) #1

I hope discussion on pl-ruby is welcome in this list.

pl-ruby 0.3.8. RH7.3. postgresql 7.4.0 RPM from PGDG.

In this installation, pg_config.h is located under
/usr/include/pgsql/server/, not /usr/include/pgsql/. Thus extconf.rb
fails to detect the version automatically. I need to add
–with-pgsql-version explicitly, otherwise it will assume version is 7.3
and plruby will fail to build.

What about adding this in extconf.rb:

— extconf.rb.orig Fri Feb 6 14:22:00 2004
+++ extconf.rb Fri Feb 6 14:28:38 2004
@@ -49,6 +49,7 @@
for version_in in [
"#{include_dir}/config.h",
"#{include_dir}/pg_config.h",

  •    "#{include_dir}/server/pg_config.h",
        "#{srcdir}/version.h.in",
        "#{srcdir}/pg_config.h"
      ]
    

or perhaps adding “/usr/include/pgsql” as one of the default include_dir
to search?

···


dave


(ts) #2

What about adding this in extconf.rb:

I've applied the patch, Thanks

Guy Decoux


(David Garamond) #3

ts wrote:

“D” == David Garamond lists@zara.6.isreserved.com writes:

What about adding this in extconf.rb:

I’ve applied the patch, Thanks

Btw, someone on the pg-general list tried building pl-ruby with Ruby 1.6
on FreeBSD and it failed (IIRC, the error message was that plruby.so
can’t be loaded due to missing symbol ‘rb_hash_delete’). He upgraded to
Ruby 1.8 and succeeded. If pl-ruby now requires Ruby 1.8, perhaps the
docs need to be updated.

···


dave


(ts) #4

Btw, someone on the pg-general list tried building pl-ruby with Ruby 1.6
on FreeBSD and it failed (IIRC, the error message was that plruby.so
can't be loaded due to missing symbol 'rb_hash_delete'). He upgraded to
Ruby 1.8 and succeeded. If pl-ruby now requires Ruby 1.8, perhaps the
docs need to be updated.

I'll modify it, it must work with 1.6 -> 1.8 and PostgreSQL 6.4 -> 7.4

Guy Decoux