MapServer / MapServer-import

3 stars 2 forks source link

Issue with Mapscript for Ruby install #1528

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: allan@nbn.co.nz Date: 2005/11/17 - 02:29

When executing ruby/extconf.rb the generated Makefile is setup incorrectly for
me while running 4.6 and 4.8beta1 on FC3 X86_64. I have attached my extconf.rb
that i  used to get the Makefile working correctly, however, i still had to
manipulate the resulting Makefile as i am unsure how to configure this correctly
in extconf.rb.

I changed line 34 of mapscript/ruby/extconf.rb to read ;

 make_file << "mapscript_wrap.c: ../mapscript.i\n\tswig -ruby -o
mapscript_wrap.c ../mapscript.i"

The bit i am unsure how to configure is i needed to make the references to
ruby.h and defines.h absolute in the Makefile. The references are in the second
to bottom line beginning with $(OPTS). I assume the path should be setup with
the mapscriptvars???

Regards
Allan Blackwell
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2005/11/22 - 23:00

Commited that change to extconf.rb, but I'm not sure how to resolve the problem
with the includes. IMO, mapscript is crying out for a Rakefile.

Can you check out the CVS HEAD and test?
tbonfort commented 12 years ago

Author: mike@gaffney.cc Date: 2006/02/06 - 13:54

I solved the problem with the includes by commenting out the $topdir = "." line.
 Here's a diff: 
19c19
< $topdir = "."
---
> #$topdir = "."

I also had to remove the Fedora Core 3 ruby package and then download and build
the ruby source for myself.

It seems the ruby 'mkmf' module from the FC3 install was outputting the
incorrect location of the ruby includes directory.  Once I built ruby from
source I had no problems.  Hope this helps.
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2006/02/23 - 21:33

Ruby mapscript really needs a go-to person ... either of you interested? I don't
use Ruby mapscript at all, and am not familiar enough with the language to know
how to write a setup script that works well for Linux and Windows. I suggested a
Rakefile before, only because everything I know about Ruby comes from Rails :)
tbonfort commented 12 years ago

Author: takubo@saruga-tondara.net Date: 2006/06/02 - 03:17

When I tryed to build Ruby Mapscript, I had same trouble with this bug.
As Michael Gaffney said, it needn't to be overwrite $topdir and $hdrdir
in the extconf.rb. If these variable are not set in extconf.rb, 
mkmf searchs automatically from Ruby's installtion information, I think.

At least, I could build Ruby Mapscript with commenting out these two variable in
extconf.rb on my Debian environment.

Ruby reference manual[1] said as below,

$hdrdir
 The directory where ruby.h is installed. 
 Generally it is /usr/local/lib/ruby/<version>/<arch> .

$topdir
 The directory where headers and libraries to make ruby extension are installed.
 Generally it is /usr/local/lib/ruby/<version>/<arch> .

[1]http://www.ruby-lang.org/ja/man/?cmd=view;name=mkmf
(only japanese, so I couldn't find English ver)
tbonfort commented 12 years ago

Author: sgillies@frii.com Date: 2006/06/02 - 04:21

reassigning.