mkmf have_header function on Windows XP

B

Blake Miller

I'm trying to get an extension built on WinXP. It's the PL/Ruby library
for writing stored procedures for PostgreSQL.

I'm posting this because it seems like a generic enough question.

I've got Ruby 1.8.6. PostgreSQL 8.2

I'm running command:

ruby extconf.rb --with-pgsql-dir="C:\PostgreSQL\8.2\"
--with-pgsql-dir="C:\PostgreSQL\8.2\lib" --ruby="C:\ruby"

And it's complaining that it can't find a header file that I know exists
where it's looking. The error is:

checking for C:\PostgreSQL\8.2\include\server/catalog/pg_proc.h... no

I've tried all sorts of paths, and have begun digging into extconf.rb,
but no matter what the path, the have_header() function always causes
the above error.
 
D

Daniel Berger

I'm trying to get an extension built on WinXP. It's the PL/Ruby library
for writing stored procedures for PostgreSQL.

I'm posting this because it seems like a generic enough question.

I've got Ruby 1.8.6. PostgreSQL 8.2

I'm running command:

ruby extconf.rb --with-pgsql-dir="C:\PostgreSQL\8.2\"
--with-pgsql-dir="C:\PostgreSQL\8.2\lib" --ruby="C:\ruby"

And it's complaining that it can't find a header file that I know exists
where it's looking. The error is:

checking for C:\PostgreSQL\8.2\include\server/catalog/pg_proc.h... no

I've tried all sorts of paths, and have begun digging into extconf.rb,
but no matter what the path, the have_header() function always causes
the above error.

You've got two "--with-pgsql-dir" directives there. I'm guessing you
wanted something else for the second one. This worked for me (sort
of):

C:\rubyVC8\src\plruby-0.5.0>c:\rubyvc8\bin\ruby extconf.rb --with-
pgsql-dir=C:\Progra~1\PostgreSQL\8.1
checking for catalog/pg_proc.h... yes
checking for rb_hash_delete() in ruby.h... yes
checking for rb_block_call()... no
checking for server/utils/array.h... yes
The system cannot find the path specified.
The filename or extension is too long.
The filename or extension is too long.
The filename or extension is too long.
The filename or extension is too long.
creating Makefile

However, even if you get past that point, the generated Makefile is
not compatible with Windows' nmake. I get this:

C:\rubyVC8\src\plruby-0.5.0>nmake

Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.

makefile(40) : fatal error U1001: syntax error : illegal character '{'
in macro
Stop.

I've mentioned this to Guy a long time ago, but he hasn't fixed it
yet.

Sorry to be a killjoy. Bug Guy about it. :)

Regards,

Dan
 
B

Blake Miller

Daniel said:
You've got two "--with-pgsql-dir" directives there.
Yes, I fixed that to no avail.
However, even if you get past that point, the generated Makefile is
not compatible with Windows' nmake. I get this:
Figured this was an uphill battle, and I really don't have time to debug
the thing. Would be cool to write procedures in Ruby though.
I've mentioned this to Guy a long time ago, but he hasn't fixed it
yet.
Yea, I did today too. He's not tested it in Windows though. Thanks for
the info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top