Hi,
At Fri, 21 Oct 2005 09:57:00 +0900,
Will wrote in [ruby-talk:161771]:
export CPPFLAGS=-I/usr/local/include (for self-compiled zlib.h header -
it was not being detected without this, and zlib compilation was being
skipped with no errors).
Although you can also use
--with-opt-include=/usr/local/include or
--with-zlib-include=/usr/local/include.
But that directory should be searched in default unless you
change the prefix. Can't you show mkmf.log file under
ext/zlib?
../configure --without-gcc --disable-ipv6
When configure completed:
make ruby.imp
make
I see. ruby.imp is created automatically when enable-shared.
I didn't know that it is needed always. And I found
[ruby-talk:144239] and [ruby-talk:144427], but it has been
left because no reply after then.
Failed at socket with error above - I had to edit the ext/socket
Makefile to include -D_LINUX_SOURCE_COMPAT in the CPPFLAGS line. The
AIX 5.1 sys/socket.h will not export the CMSG_SPACE and CMSG_LEN (and
some other) symbols unless _LINUX_SOURCE_COMPAT is defined.
Is it commont to AIX?
After that, the build went pretty smoothly. I was able to install
rubygems, and install several gems as well. The only error I am seeing
now is when I run a make install-doc:
........................................
Generating RI...
/tmp/wrbriggs/ruby-1.8.3/lib/rdoc/markup/simple_markup.rb:331:in `=~':
Stack overflow in regexp matcher: /^( (RegexpError)
( \[.*?\] (?# labeled )
|\S.*:: (?# note )
)(?=\s|$)
\s*
)/x from
Unnecessary backtrack could be removed. BTW, what line it
failed against?
$ ruby18 -e 'p /^((\[.*?\]|\S.*:
(?=\s|$)\s*)/=~"::"*(1<<10)'
0
$ ruby18 -e 'p /^((\[.*?\]|\S.*:
(?=\s|$)\s*)/=~"::"*(1<<11)'
-e:1: Stack overflow in regexp matcher: /^((\[.*?\]|\S.*:
(?=\s|$)\s*)/ (RegexpError)
And, parse.c in 1.8.3 has a bug potentially, you'll want to
re-create it with bison 1.x if you have.
Index: common.mk
===================================================================
RCS file: /cvs/ruby/src/ruby/common.mk,v
retrieving revision 1.13.2.4
diff -U2 -p -r1.13.2.4 common.mk
--- common.mk 3 Aug 2005 15:27:06 -0000 1.13.2.4
+++ common.mk 21 Oct 2005 03:30:52 -0000
@@ -57,5 +57,5 @@ SCRIPT_ARGS = --dest-dir="$(DESTDIR)"
EXTMK_ARGS = $(SCRIPT_ARGS) --extout="$(EXTOUT)" --extension $(EXTS) --extstatic $(EXTSTATIC) --
-all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
+all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY) $(ARCHFILE)
@$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS)
prog: $(PROGRAM) $(WPROGRAM)
Index: configure.in
===================================================================
RCS file: /cvs/ruby/src/ruby/configure.in,v
retrieving revision 1.212.2.35
diff -U2 -p -r1.212.2.35 configure.in
--- configure.in 6 Sep 2005 23:22:56 -0000 1.212.2.35
+++ configure.in 21 Oct 2005 03:30:52 -0000
@@ -231,4 +231,22 @@ AC_CHECK_SIZEOF(double, 8)
AC_CHECK_SIZEOF(time_t, 0)
+AC_DEFUN(RUBY_TRY_CFLAGS,
+[{
+cflags_ok=
+if test "${CFLAGS+set}"; then
+ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS [$1]"
+else
+ unset save_CFLAGS; CFLAGS="[$1]"
+fi
+AC_TRY_COMPILE([], [], [cflags_ok=yes], [cflags_ok=no])
+if test "${save_CFLAGS+set}"; then
+ CFLAGS="$save_CFLAGS"
+ unset save_CFLAGS
+else
+ unset CFLAGS
+fi
+test $cflags_ok = yes
+}])
+
for id in pid_t gid_t uid_t; do
AC_CHECK_TYPE($id, [typ=$id], [typ=int])
@@ -923,6 +941,11 @@ if test "$with_dln_a_out" != yes; then
aix*) : ${LDSHARED='/usr/ccs/bin/ld'}
XLDFLAGS="$XLDFLAGS -Wl,-bE:ruby.imp"
- DLDFLAGS='-brtl -eInit_$(TARGET) -bI:$(topdir)/ruby.imp -bM:SRE -T512 -H512 '"$DLDFLAGS"
- LDFLAGS="-brtl $LDFLAGS"
+ DLDFLAGS='-eInit_$(TARGET) -bI:$(topdir)/ruby.imp -bM:SRE -T512 -H512 '"$DLDFLAGS"
+ flag=-brtl
+ test "$GCC" = yes && flag=-Wl,$flag
+ if RUBY_TRY_CFLAGS(-brtl); then
+ DLDFLAGS="-brtl $DLDFLAGS"
+ LDFLAGS="-brtl $LDFLAGS"
+ fi
: ${ARCHFILE="ruby.imp"}
TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS) $(CFLAGS)'
Index: ext/socket/extconf.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/socket/extconf.rb,v
retrieving revision 1.36.2.5
diff -U2 -p -r1.36.2.5 extconf.rb
--- ext/socket/extconf.rb 19 Jul 2005 19:04:46 -0000 1.36.2.5
+++ ext/socket/extconf.rb 21 Oct 2005 02:30:41 -0000
@@ -26,7 +26,10 @@ unless $mswin or $bccwin or $mingw
headers = %w<sys/types.h netdb.h string.h sys/socket.h netinet/in.h>
end
-if /solaris/ =~ RUBY_PLATFORM and !try_compile("")
+case RUBY_PLATFORM
+when /^solaris/
# bug of gcc 3.0 on Solaris 8 ?
- headers << "sys/feature_tests.h"
+ headers << "sys/feature_tests.h" unless try_compile("")
+when /^aix/
+ $defs << "-D_LINUX_SOURCE_COMPAT"
end
Index: lib/rdoc/markup/simple_markup.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/rdoc/markup/simple_markup.rb,v
retrieving revision 1.1.2.1
diff -U2 -p -r1.1.2.1 simple_markup.rb
--- lib/rdoc/markup/simple_markup.rb 24 Apr 2004 01:39:45 -0000 1.1.2.1
+++ lib/rdoc/markup/simple_markup.rb 21 Oct 2005 03:25:11 -0000
@@ -195,6 +195,5 @@ module SM #:nodoc:
( \[.*?\] (?# labeled )
|\S.*:: (?# note )
- )(?=\s|$)
- \s*
+ )(?:\s+|$)
)/x