Solaris2.5.1, ruby-1.8.0 snapshot 19-MAR-2003

I have just tried to build the nightly snapshot I picked up
yesterday under Solaris 2.5.1, with GCC-3.2.2 (which seemed to build
OK), and I get this:

brains hgs 22 %> gmake
/usr/local/bin/gcc -g -O2 -I. -I. -c array.c
In file included from ruby.h:655,
from array.c:15:
missing.h:122: parse error before “va_list”
gmake: *** [array.o] Error 1
brains hgs 23 %> uname -a
SunOS brains 5.5.1 Generic_103640-29 sun4m sparc SUNW,SPARCstation-10
brains hgs 24 %> head -5 ChangeLog

    * lib/pp.rb (object_address_group): use to_s instead of name
      to get name of class.

brains hgs 25 ns hgs 28 %> nl missing.h | tail
90 #ifndef HAVE_STRTOUL
91 extern unsigned long strtoul _((char *, char **, int));
92 #endif

93  #ifndef HAVE_VSNPRINTF
94  extern snprintf __((char *, size_t n, char const *, ...));
95  extern vsnprintf _((char *, size_t n, char const *, va_list));
96  #endif

97  #endif /* MISSING_H */

brains hgs 29 %> gcc --version
gcc (GCC) 3.2.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

That va_list doesn’t have a type, I think. Is that the problem?
Hugh

···

Sun Mar 16 12:29:55 2003 Tanaka Akira akr@m17n.org

How about this?

— missing.h 20 Feb 2003 06:49:00 -0000 1.7
+++ missing.h 20 Mar 2003 16:26:31 -0000
@@ -120,2 +120,7 @@ extern unsigned long strtoul _((char *,
#ifndef HAVE_VSNPRINTF
+# ifdef HAVE_STDARG_PROTOTYPES
+# include <stdarg.h>
+# else
+# include <varargs.h>
+# endif
extern snprintf __((char *, size_t n, char const *, …));

						matz.
···

In message “Solaris2.5.1, ruby-1.8.0 snapshot 19-MAR-2003” on 03/03/21, Hugh Sasse Staff Elec Eng hgs@dmu.ac.uk writes:

I have just tried to build the nightly snapshot I picked up
yesterday under Solaris 2.5.1, with GCC-3.2.2 (which seemed to build
OK), and I get this:

brains hgs 22 %> gmake
/usr/local/bin/gcc -g -O2 -I. -I. -c array.c
In file included from ruby.h:655,
from array.c:15:
missing.h:122: parse error before “va_list”
gmake: *** [array.o] Error 1

I have just tried to build the nightly snapshot I picked up
yesterday under Solaris 2.5.1, with GCC-3.2.2 (which seemed to build
OK), and I get this:

brains hgs 22 %> gmake
/usr/local/bin/gcc -g -O2 -I. -I. -c array.c
In file included from ruby.h:655,
from array.c:15:
missing.h:122: parse error before “va_list”
gmake: *** [array.o] Error 1

Brian’s suggestion worked on array.c, but I have gone with this
one…

How about this?

— missing.h 20 Feb 2003 06:49:00 -0000 1.7
+++ missing.h 20 Mar 2003 16:26:31 -0000
@@ -120,2 +120,7 @@ extern unsigned long strtoul _((char *,
#ifndef HAVE_VSNPRINTF
+# ifdef HAVE_STDARG_PROTOTYPES
+# include <stdarg.h>
+# else
+# include <varargs.h>
+# endif
extern snprintf __((char *, size_t n, char const *, …));

  					matz.

This gets Much further, but I now have:

compiling digest/md5
gmake[1]: Entering directory /home/hgs/ruby/ruby-snapshot/ext/digest/md5' /usr/local/bin/gcc -fPIC -g -O2 -DHAVE_CONFIG_H -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5/.. -I. -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5 -DHAVE_INTTYPES_H -DHAVE_UNISTD_H -c md5init.c In file included from md5.h:49, from md5init.c:8: /home/hgs/ruby/ruby-snapshot/ext/digest/defs.h:20:23: inttypes.h: No such file or directory In file included from md5init.c:8: md5.h:60: parse error before "uint32_t" md5.h:60: warning: no semicolon at end of struct or union md5.h:61: warning: data definition has no type or storage class md5.h:62: parse error before "buffer" md5.h:62: warning: data definition has no type or storage class md5.h:63: parse error before '}' token md5.h:63: warning: data definition has no type or storage class md5.h:73: parse error before '*' token md5.h:74: parse error before '*' token md5.h:75: parse error before '*' token md5.h:76: parse error before '*' token md5.h:77: parse error before '*' token gmake[1]: *** [md5init.o] Error 1 gmake[1]: Leaving directory /home/hgs/ruby/ruby-snapshot/ext/digest/md5’
gmake: *** [all] Error 1
brains hgs 75 %>

brains hgs 84 %> cat -n /home/hgs/ruby/ruby-snapshot/ext/digest/defs.h | body 19 30
19 #if defined(HAVE_INTTYPES_H)
20 # include <inttypes.h>
21 #else
22 typedef unsigned char uint8_t;
23 typedef unsigned int uint32_t;
24 # if SIZEOF_LONG == 8
25 typedef unsigned long uint64_t;
26 # elif defined(GNUC)
27 typedef unsigned long long uint64_t;
28 # elif defined(_MSC_VER)
29 typedef unsigned _int64 uint64_t;
30 # elif defined(BORLANDC)
brains hgs 85 %>

brains hgs 85 %> cat -n /home/hgs/ruby/ruby-snapshot/ext/digest/md5/md5.h | body 45 80
45
46 #ifndef MD5_INCLUDED
47 # define MD5_INCLUDED
48
49 #include “defs.h”
50
51 /*
52 * This code has some adaptations for the Ghostscript environment, but it
53 * will compile and run correctly in any environment with 8-bit chars and
54 * 32-bit ints. Specifically, it assumes that if the following are
55 * defined, they have the same meaning as in Ghostscript: P1, P2, P3.
56 /
57
58 /
Define the state of the MD5 Algorithm. /
59 typedef struct md5_state_s {
60 uint32_t count[2]; /
message length in bits, lsw first /
61 uint32_t state[4]; /
digest buffer /
62 uint8_t buffer[64]; /
accumulate block */
63 } MD5_CTX;
64
65 #ifdef RUBY
66 #define MD5_Init rb_Digest_MD5_Init
67 #define MD5_Update rb_Digest_MD5_Update
68 #define MD5_Final rb_Digest_MD5_Final
69 #define MD5_End rb_Digest_MD5_End
70 #define MD5_Equal rb_Digest_MD5_Equal
71 #endif
72
73 void MD5_Init _((MD5_CTX *pms));
74 void MD5_Update _((MD5_CTX *pms, const uint8_t *data, size_t nbytes));
75 void MD5_Final _((uint8_t *digest, MD5_CTX *pms));
76 void MD5_End _((MD5_CTX *pctx, uint8_t *hexdigest));
77 int MD5_Equal _((MD5_CTX *pctx1, MD5_CTX *pctx2));
78
79 #define MD5_BLOCK_LENGTH 64
80 #define MD5_DIGEST_LENGTH 16
brains hgs 86 %>

I can’t find a definition of uint32_t in /usr/local/include, …
but it seems to be typedef’ed in /usr/include/syn/synch.h and
usr/include/pthread.h

   Hugh
···

On Fri, 21 Mar 2003, Yukihiro Matsumoto wrote:

In message “Solaris2.5.1, ruby-1.8.0 snapshot 19-MAR-2003” > on 03/03/21, Hugh Sasse Staff Elec Eng hgs@dmu.ac.uk writes:

Hi,

This gets Much further, but I now have:

compiling digest/md5
gmake[1]: Entering directory `/home/hgs/ruby/ruby-snapshot/ext/digest/md5’
/usr/local/bin/gcc -fPIC -g -O2 -DHAVE_CONFIG_H -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5/… -I. -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5 -DHAVE_INTTYPES_H -DHAVE_UNISTD_H -c md5init.c
In file included from md5.h:49,
from md5init.c:8:
/home/hgs/ruby/ruby-snapshot/ext/digest/defs.h:20:23: inttypes.h: No such file or directory

I just don’t get it. #include <inttypes.h> is wrapped by HAVE_INTTYPES_H

19 #if defined(HAVE_INTTYPES_H)
20 # include <inttypes.h>
21 #else

right? So you really shouldn’t get this error unless extconf.rb does
not work well. Can you show us mkmf.log etc?

						matz.
···

In message “Re: Solaris2.5.1, ruby-1.8.0 snapshot 19-MAR-2003” on 03/03/21, Hugh Sasse Staff Elec Eng hgs@dmu.ac.uk writes:

Hi,

This gets Much further, but I now have:

compiling digest/md5
gmake[1]: Entering directory `/home/hgs/ruby/ruby-snapshot/ext/digest/md5’
[long line pruned]
In file included from md5.h:49,
from md5init.c:8:
/home/hgs/ruby/ruby-snapshot/ext/digest/defs.h:20:23: inttypes.h: No such file or directory

I just don’t get it. #include <inttypes.h> is wrapped by HAVE_INTTYPES_H

19 #if defined(HAVE_INTTYPES_H)
20 # include <inttypes.h>
21 #else

right? So you really shouldn’t get this error unless extconf.rb does

Agreed. I have been building autoconf today to try to play with
this, but this 2.5.1 machine is rather old, so that experiment is
rather incomplete.
I was looking into adding something like…

dnl Added to sort out uint32 problem on Solaris2.5.1
AC_CREATE_STDINT_H

to the configure.in file, but seems to be the right macro to use for
uint32_t from what I can google about this. It will probably need
some arguments though…

But I digress. (And this is “meddling in the affairs of wizards”,
I am really not fluent in Autoconf.)

not work well. Can you show us mkmf.log etc?

Because I have been trying things out this has gone. I have made
distclean and restored the configure.in file and am
trying to rebuild it to give you an answer, but they are about to
lock the building and the current compilation has only reached
parse.c, so I’ll have to let you know the results of this on Monday.

Sorry.

So, what else would you like apart from mkmf.log?

  					matz.
    Hugh
···

On Sat, 22 Mar 2003, Yukihiro Matsumoto wrote:

In message “Re: Solaris2.5.1, ruby-1.8.0 snapshot 19-MAR-2003” > on 03/03/21, Hugh Sasse Staff Elec Eng hgs@dmu.ac.uk writes:

Hi,

···

In message “Re: Solaris2.5.1, ruby-1.8.0 snapshot 19-MAR-2003” on 03/03/22, Hugh Sasse Staff Elec Eng hgs@dmu.ac.uk writes:

So, what else would you like apart from mkmf.log?

<inttypes.h> detecting result, please.

						matz.

Hi,

So, what else would you like apart from mkmf.log?

<inttypes.h> detecting result, please.

Well, as I said, I’d let you know what happened on Monday. I cam in
to find that it built successfully this time!
brains hgs 89 %> $RUBY --version
ruby 1.8.0 (2003-03-12) [sparc-solaris2.5.1]

Anyway, here is ./ext/digest/md5/mkmf.log for info:
=begin

have_library: checking for main() in -lcrypto…
/usr/local/bin/gcc -o conftest -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot -g -O2 -DHAVE_CONFIG_H -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5/… conftest.c -L/home/hgs/ruby/ruby-snapshot -L/apps/hgs/RUBY-SNAPSHOT/lib -Wl,-E -lruby-static -lcrypto -ldl -lcrypt -lm -lc
/usr/local/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
checked program was:
/* begin */

int main() { return 0; }
int t() { main(); return 0; }
/* end */

/usr/local/bin/gcc -o conftest -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot -g -O2 -DHAVE_CONFIG_H -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5/… conftest.c -L/home/hgs/ruby/ruby-snapshot -L/apps/hgs/RUBY-SNAPSHOT/lib -Wl,-E -lruby-static -lcrypto -ldl -lcrypt -lm -lc
/usr/local/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
checked program was:
/* begin */

int main() { return 0; }
int t() { void ((volatile p)()); p = (void (()()))main; return 0; }
/* end */

have_header: checking for sys/cdefs.h…
/usr/local/bin/gcc -E -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot -g -O2 -DHAVE_CONFIG_H -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5/… -o conftest.i conftest.c
conftest.c:1:23: sys/cdefs.h: No such file or directory
checked program was:
/* begin /
#include <sys/cdefs.h>
/
end */

have_header: checking for inttypes.h…
/usr/local/bin/gcc -E -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot -g -O2 -DHAVE_CONFIG_H -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5/… -o conftest.i conftest.c
conftest.c:1:22: inttypes.h: No such file or directory
checked program was:
/* begin /
#include <inttypes.h>
/
end */

have_header: checking for unistd.h…
/usr/local/bin/gcc -E -I/home/hgs/ruby/ruby-snapshot -I/home/hgs/ruby/ruby-snapshot -g -O2 -DHAVE_CONFIG_H -I/home/hgs/ruby/ruby-snapshot/ext/digest/md5/… -o conftest.i conftest.c
checked program was:
/* begin /
#include <unistd.h>
/
end */

=end

which includes a test for inttypes.h.

Given that I seem to have a successful build on Solaris2.5.1 with
gcc-3.2.2 now, and it got through Rubicon, is there anything more
useful that I can do to help you with stability on this platform?
The failed Rubicon tests are below.

  					matz.
    Thank you
    Hugh
···

On Sun, 23 Mar 2003, Yukihiro Matsumoto wrote:

In message “Re: Solaris2.5.1, ruby-1.8.0 snapshot 19-MAR-2003” > on 03/03/22, Hugh Sasse Staff Elec Eng hgs@dmu.ac.uk writes:


Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/3.2.2/specs
Configured with: …/gcc-3.2.2/configure --with-as=/usr/local/bin/as --with-ld=/usr/local/bin/ld --enable-languages=ada,c,c++,f77,objc
Thread model: posix
gcc version 3.2.2
ruby 1.8.0 (2003-03-12) [sparc-solaris2.5.1]
SunOS brains 5.5.1 Generic_103640-29 sun4m sparc SUNW,SPARCstation-10

/apps/hgs/RUBY-SNAPSHOT/bin/ruby AllTests.rb

========================================================================
All Tests Test Results V0.3.5

            Array   FAIL     65      470          1
       Assignment   FAIL      4       42          2
      BlocksProcs   FAIL      3       26          1
              Dir   FAIL     21       78          2
             File   FAIL     33      298          3
         FileTest   FAIL      4      103          1
       File__Stat   FAIL     35      356          2
               IO   FAIL     53     1236          1
        LoopStuff   FAIL     15       56          1
             Math   FAIL      2       59                   1
           Module   FAIL     25       92          1
           Thread   FAIL     33      101          1
             Time   FAIL     41     1687          5

========================================================================
All 72 files FAIL 922 43934 21 1

                         Failure Report

========================================================================

TestArray:

./builtin/ArrayBase.rb:71:in `test_MINUS'(TestArray)
....Expected: "<[1]> "
....But was:  "<[1, 1, 1, 1]>"

        ------------------------------------------------------------

TestAssignment:

./language/TestAssignment.rb:35:in `testBasicAssignment'(TestAssignment)
./language/TestAssignment.rb:28:in `greater_or_equal'
./language/TestAssignment.rb:28:in `testBasicAssignment'
....Expected: "<[]> "
....But was:  "<[nil]>"
./language/TestAssignment.rb:135:in `testMultipleAssignment'(TestAssignment)
./language/TestAssignment.rb:134:in `greater_or_equal'
./language/TestAssignment.rb:134:in `testMultipleAssignment'
....Expected: "<[]> "
....But was:  "<[nil]>"

        ------------------------------------------------------------

TestBlocksProcs:

./language/TestBlocksProcs.rb:64:in `testYield'(TestBlocksProcs)
./language/TestBlocksProcs.rb:64:in `f'
./language/TestBlocksProcs.rb:64:in `testYield'
....Expected: "<[]> "
....But was:  "<[nil]>"

        ------------------------------------------------------------

TestDir:

....Expected: "<[]> "
....But was:  "<[\"builtin/_test/_file1\", \"builtin/_test/_file2\"]>"
....Expected: "<[]> "
....But was:  "<[\"builtin/_test/_file1\", \"builtin/_test/_file2\"]>"

        ------------------------------------------------------------

TestFile:

./builtin/TestFile.rb:38:in `test_s_basename'(TestFile)
....Expected: "<> "
....But was:  "<tmp>"
./builtin/TestFile.rb:88:in `test_s_dirname'(TestFile)
....Expected: "</tmp> "
....But was:  "</>"
./builtin/TestFile.rb:190:in `test_s_ftype'(TestFile)
./builtin/TestFile.rb:188:in `each'
./builtin/TestFile.rb:188:in `test_s_ftype'
....Expected: "<socket> "
....But was:  "<fifo>"

        ------------------------------------------------------------

TestFileTest:

./builtin/TestFileTest.rb:153:in `test_test'(TestFileTest)
./builtin/TestFileTest.rb:151:in `each'
./builtin/TestFileTest.rb:151:in `test_test'
....Expected: "<true> "
....But was:  "<false>"

        ------------------------------------------------------------

TestFile__Stat:

./builtin/TestFile__Stat.rb:40:in `try'(TestFile__Stat)
./builtin/TestFile__Stat.rb:133:in `test_ftype'
./builtin/TestFile__Stat.rb:132:in `each'
./builtin/TestFile__Stat.rb:132:in `test_ftype'
....Expected: "<socket> "
....But was:  "<fifo>"
./builtin/TestFile__Stat.rb:40:in `try'(TestFile__Stat)
./builtin/TestFile__Stat.rb:271:in `test_socket?'
....Expected: "<true> "
....But was:  "<false>"

        ------------------------------------------------------------

TestIO:

./builtin/TestIO.rb:654:in `test_pos='(TestIO)
./builtin/TestIO.rb:653:in `each'
./builtin/TestIO.rb:653:in `test_pos='
./builtin/TestIO.rb:649:in `open'
./builtin/TestIO.rb:649:in `test_pos='
....Expected: "<0> "
....But was:  "<95>"

        ------------------------------------------------------------

TestLoopStuff:

./language/TestLoopStuff.rb:272:in `testClassFullOfIterators'(TestLoopStuff)
....Expected: "<1> "
....But was:  "<[1]>"

        ------------------------------------------------------------

TestModule:

./builtin/TestModule.rb:199:in `test_instance_methods'(TestModule)
....Expected: "<[\"aClass\"]> "
....But was:  "<[\"aClass\", \"aClass2\"]>"

        ------------------------------------------------------------

TestThread:

./builtin/TestThread.rb:467:in `test_s_kill'(TestThread)
....Expected: "<476> "
....But was:  "<477>"

        ------------------------------------------------------------

TestTime:

./builtin/TestTime.rb:203:in `test_gmtime'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:266:in `test_localtime'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:417:in `test_s_gm'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:436:in `test_s_local'(TestTime)
....The condition is <false:FalseClass>
./builtin/TestTime.rb:458:in `test_s_mktime'(TestTime)
....The condition is <false:FalseClass>

========================================================================

                          Error Report

========================================================================

TestMath:

./builtin/TestMath.rb:118:in `log'(TestMath)
./builtin/TestMath.rb:118:in `test_fns'
....Argument out of domain - "log"

========================================================================