Compiling mod_ruby 1.1.2 problems
Roman Marszalek <[email protected]>
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm trying to get my Mac OS X 10.3.2 system to use mod_ruby so I can
start making websites using .rhtml files.
I've installed apache 2.0.48 using fink, and eruby 1.0.5 from
modruby.net
I'm now trying to compile mod_ruby 1.1.2. I start with ./configure.rb
--with-apxs. Then make, but this gives the following:
cc -dynamic -bundle -L/sw/lib -o mod_ruby.so mod_ruby.o ruby_config.o
apachelib.o array_header.o table.o connection.o server.o request.o \
-lruby -ldl -lobjc
ld: Undefined symbols:
_ap_add_cgi_vars
_ap_add_common_vars
_ap_add_version_component
_ap_kill_timeout
_ap_log_error
...
_ap_setup_client_block
_ap_should_client_block
_ap_sub_req_lookup_file
_ap_sub_req_lookup_uri
_ap_table_setn
make: *** [mod_ruby.so] Error 1
My questions is, how do I get it to make? The error looks like it can't
find some things. But I _think_ that I'm pointing in the right place
looking at the Makefile.
I'm not sure what other information I should provide. Please help, I've
spent days trying to get this working. I'm sure I'll get there in the
end.
Thanks,
Roman
I've included my Makefile as that might give some clues.
# Generated automatically by configure.rb.
srcdir = /Users/roman/mod_ruby-1.1.2
topdir = $(rubylibdir)/$(arch)
hdrdir = $(rubylibdir)/$(arch)
VPATH = $(srcdir)
arch = powerpc-darwin
sitearch = powerpc-darwin
ruby_version = 1.8
DESTDIR =
prefix = $(DESTDIR)/sw
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
datadir = $(prefix)/share
libdir = $(exec_prefix)/lib
rubylibdir = $(libdir)/ruby/$(ruby_version)
archdir = $(rubylibdir)/$(arch)
sitedir = $(prefix)/lib/ruby/site_ruby
sitelibdir = $(sitedir)/$(ruby_version)
sitearchdir = $(sitelibdir)/$(sitearch)
includedir = /sw/include/apache2
mandir = $(prefix)/share/man
CC = gcc
AR = ar
LD = $(CC)
RANLIB = ranlib
RUBY = $(RUBY_INSTALL_NAME)
CFLAGS = -g -O2 -fno-common -pipe -Wall -I. -I$(hdrdir)
$(APACHE_INCLUDES) $(LIBAPREQ_INCLUDES)
LDFLAGS = -L/sw/lib
LIBS = -ldl -lobjc
XLDFLAGS = -L$(libdir)
DLDFLAGS =
LDSHARED = cc -dynamic -bundle
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DLLIB = $(INSTALL) -m 555
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DIR = $(INSTALL) -d
RUBY_INSTALL_NAME = ruby1.8
LIBRUBYARG = $(LIBRUBYARG_SHARED)
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
RUBY_SO_NAME = ruby
APACHE_SRCDIR =
APACHE_INCLUDES = -I/sw/include/apache2
APACHE_LIBEXECDIR = $(DESTDIR)/sw/lib/apache2/modules
APACHE_SRC_UID =
APACHE_SRC_GID =
LIBAPREQ_INCLUDES =
TARGET = mod_ruby.so
MAJOR = 1
MINOR = 1
TEENY = 2
VERSION = $(MAJOR).$(MINOR).$(TEENY)
TAG = release_$(MAJOR)_$(MINOR)_$(TEENY)
RUBYLIBS = apache/ruby-run.rb \
apache/registry.rb \
apache/eruby-run.rb \
apache/erb-run.rb \
apache/rd2html.rb \
apache/ruby-debug.rb \
apache/eruby-debug.rb \
apache/query.rb \
auto-reload.rb
OBJS = mod_ruby.o \
ruby_config.o \
apachelib.o \
array_header.o \
table.o \
connection.o \
server.o \
request.o \
.c.o:
$(CC) $(CFLAGS) -c $<
all: $(TARGET)
install: install-shared install-ruby
site-install: install-shared install-siteruby
install-ruby:
$(INSTALL_DIR) $(rubylibdir)/apache
for file in $(RUBYLIBS); do \
$(INSTALL_DATA) $(srcdir)/lib/$$file $(rubylibdir)/$$file; \
done
install-siteruby:
$(INSTALL_DIR) $(sitelibdir)/apache
for file in $(RUBYLIBS); do \
$(INSTALL_DATA) $(srcdir)/lib/$$file $(sitelibdir)/$$file; \
done
install-static: all
$(INSTALL_DIR) -o $(APACHE_SRC_UID) -g $(APACHE_SRC_GID) \
$(APACHE_SRCDIR)/src/modules/ruby
$(INSTALL_DATA) -o $(APACHE_SRC_UID) -g $(APACHE_SRC_GID) \
$(TARGET) $(APACHE_SRCDIR)/src/modules/ruby
$(INSTALL_DATA) -o $(APACHE_SRC_UID) -g $(APACHE_SRC_GID) \
mod_ruby.c $(APACHE_SRCDIR)/src/modules/ruby
$(INSTALL_DATA) -o $(APACHE_SRC_UID) -g $(APACHE_SRC_GID) \
Makefile.tmpl $(APACHE_SRCDIR)/src/modules/ruby
$(INSTALL_DATA) -o $(APACHE_SRC_UID) -g $(APACHE_SRC_GID) \
Makefile.libdir $(APACHE_SRCDIR)/src/modules/ruby
$(INSTALL_DATA) -o $(APACHE_SRC_UID) -g $(APACHE_SRC_GID) \
libruby.module $(APACHE_SRCDIR)/src/modules/ruby
$(INSTALL_DATA) -o $(APACHE_SRC_UID) -g $(APACHE_SRC_GID) \
ruby_shared_stub.c $(APACHE_SRCDIR)/src/modules/ruby
install-shared: all
$(INSTALL_DIR) $(APACHE_LIBEXECDIR)
$(INSTALL_DLLIB) $(TARGET) $(APACHE_LIBEXECDIR)
clean:
rm -f libruby.a
rm -f mod_ruby.so tests/mod_ruby.so
rm -f $(OBJS)
distclean: clean
rm -f Makefile
rm -f doc/Makefile
rm -f libruby.module
rm -f mod_ruby.imp
rm -f test.cfg
find . -name '*~' | xargs rm -f
tag:
cvs tag $(TAG)
force_tag:
cvs tag -F $(TAG)
dist:
cvs export -r $(TAG) -d mod_ruby-$(VERSION) mod_ruby
tar zcf ../mod_ruby-$(VERSION).tar.gz mod_ruby-$(VERSION)
rm -rf mod_ruby-$(VERSION)
libruby.a: $(OBJS)
$(AR) rcu $@ $(OBJS)
$(RANLIB) $@
mod_ruby.so: $(OBJS)
$(LDSHARED) $(DLDFLAGS) $(XLDFLAGS) -o $(TARGET) $(OBJS) \
$(LIBRUBYARG) $(LIBS)
mod_ruby.o: mod_ruby.c mod_ruby.h ruby_config.h apachelib.h
ruby_config.o: ruby_config.c mod_ruby.h ruby_config.h
apachelib.o: apachelib.c mod_ruby.h apachelib.h
array_header.o: array_header.c mod_ruby.h apachelib.h
table.o: table.c mod_ruby.h apachelib.h
connection.o: connection.c mod_ruby.h apachelib.h
server.o: server.c mod_ruby.h apachelib.h
request.o: request.c mod_ruby.h apachelib.h