cvs modruby on cvs ruby...

Dick Davies <[email protected]>
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
This is probably at least partly NetBSD specific, but tonights CVS has trouble
finding some header files (this is built against latest apache 2 and today ruby from
CVS):

rasputin@lb:mod_ruby$ ./configure.rb --with-apxs=`which apxs` --with-apr-includes=/usr/pkg/include/apr-0/
checking for a BSD compatible install... /usr/bin/install -c
checking whether we are using gcc... yes
checking Ruby version... 1.9.0
checking for static Apache module support... no
checking for dynamic Apache module support... yes
checking for libapreq support... no
creating Makefile
creating libruby.module
creating doc/Makefile
rasputin@lb:mod_ruby$ make
gcc -g -O2 -pipe  -fPIC -Wall -O2 -pipe -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/db4 -I. -I/data/ruby/lib/ruby/1.9/i386-netbsdelf -I/usr/pkg/include/httpd -I/usr/pkg/include/apr-0/  -c mod_ruby.c
mod_ruby.c: In function `dso_unload':
mod_ruby.c:659: warning: implicit declaration of function `dlclose'
mod_ruby.c: In function `mod_ruby_setenv':
mod_ruby.c:838: warning: implicit declaration of function `ruby_setenv'
mod_ruby.c:840: warning: implicit declaration of function `ruby_unsetenv'
gcc -g -O2 -pipe  -fPIC -Wall -O2 -pipe -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/db4 -I. -I/data/ruby/lib/ruby/1.9/i386-netbsdelf -I/usr/pkg/include/httpd -I/usr/pkg/include/apr-0/  -c array_header.c
gcc -g -O2 -pipe  -fPIC -Wall -O2 -pipe -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/db4 -I. -I/data/ruby/lib/ruby/1.9/i386-netbsdelf -I/usr/pkg/include/httpd -I/usr/pkg/include/apr-0/  -c table.c

The first warning ( implicit declaration of function `dlclose' ) is fixed by
including dlfcn.h whether you're on netbsd or not:

rasputin@lb:mod_ruby$ cvs diff -u mod_ruby.c
Index: mod_ruby.c
===================================================================
RCS file: /src/mod_ruby/mod_ruby.c,v
retrieving revision 1.84
diff -u -r1.84 mod_ruby.c
--- mod_ruby.c  27 Jan 2004 13:53:33 -0000      1.84
+++ mod_ruby.c  28 Apr 2004 20:50:18 -0000
@@ -40,11 +40,10 @@
 #endif
 
 #ifdef USE_DLN_DLOPEN
+#  include <dlfcn.h>
 # ifdef __NetBSD__
 #  include <nlist.h>
 #  include <link.h>
-# else
-#  include <dlfcn.h>
 # endif
 #endif
 
rasputin@lb:mod_ruby$

The second pair of errors is because when you #include util.h
from mod_ruby.h, NetBSD thinks you mean /usr/include/util.h, not the 
ruby specific one.

I guess this could be fixed by putting '-I/data/ruby/lib/ruby/1.9/i386-netbsdelf'
(which I guess is returned by ruby itself) ahead of the '-I/usr/include'.

Sorry, I don't know how to do that to send a diff (I cheated and hardcoded a full
path to the header in my working copy).



-- 
The light at the end of the tunnel may be an oncoming dragon.
Rasputin :: Jack of All Trades - Master of Nuns
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.