Ruby 1.8.0 preview4

Ben Giddings wrote:

···

On Thu July 24 2003 4:03 am, Yukihiro Matsumoto wrote:

I’m sure we still have problems left. Braves, try and find errors, on
as many platforms as possible, please.

Compiling on RedHat 9:

gcc -fPIC -g -O2 -I. -I/usr/local/ruby-1.8.0 -I/usr/local/ruby-1.8.0
-I/usr/local/ruby-1.8.0/ext/openssl -DHAVE_OPENSSL_CRYPTO_H -DHAVE_UNISTD_H
-DHAVE_SYS_TIME_H -DHAVE_EVP_MD_CTX_CREATE -DHAVE_EVP_MD_CTX_CLEANUP
-DHAVE_EVP_MD_CTX_DESTROY -DHAVE_PEM_DEF_CALLBACK -DHAVE_EVP_MD_CTX_INIT
-DHAVE_HMAC_CTX_INIT -DHAVE_HMAC_CTX_CLEANUP -DHAVE_X509_CRL_SET_VERSION
-DHAVE_X509_CRL_SET_ISSUER_NAME -DHAVE_X509_CRL_SORT
-DHAVE_X509_CRL_ADD0_REVOKED -DHAVE_CONF_GET1_DEFAULT_CONFIG_FILE
-DHAVE_BN_MOD_SQR -DHAVE_BN_MOD_ADD -DHAVE_BN_MOD_SUB
-DHAVE_CONF_GET1_DEFAULT_CONFIG_FILE -DHAVE_VA_ARGS_MACRO
-DHAVE_OPENSSL_OCSP_H -DHAVE_ST_FLAGS -DHAVE_RB_OBJ_INIT_COPY -c ossl.c
In file included from /usr/include/openssl/ssl.h:179,
from ossl.h:34,
from ossl.c:11:
/usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
In file included from /usr/include/openssl/ssl.h:179,
from ossl.h:34,
from ossl.c:11:
/usr/include/openssl/kssl.h:132: parse error before “krb5_enctype”
/usr/include/openssl/kssl.h:134: parse error before “FAR”

ben% locate krb5.h
/usr/kerberos/include/gssapi/gssapi_krb5.h
/usr/kerberos/include/krb5.h

It looks like /usr/kerberos/include isn’t in the include path. Configure
should probably catch that, right? I configured it as ./configure
–prefix=/usr/local/ruby-1.8.0-preview4

Btw, would it make sense to change the top-level directory in the tar file to
“ruby-1.8.0-src” so that if people want to install to /usr/local/ruby-1.8.0
they can do so more easily?

This is basically RedHat’s screwup, as far as I’m concerned. Pretty well
every app I’ve tried to build under RedHat 9, which uses OpenSSL, has
broken on the build in the same fashion (and I’ve had to manually
include the kerberos include dir). I think it’s because previously
(RedHat 8.0 and under) OpenSSL did not have a dependency on Kerberos…

[errors snipped]

You can get Red Hat Linux 9 RPMs here:

http://www.caliban.org/files/redhat/RPMS/i386/

Ian

···

On Fri 25 Jul 2003 at 04:40:29 +0900, Ben Giddings wrote:

On Thu July 24 2003 4:03 am, Yukihiro Matsumoto wrote:

I’m sure we still have problems left. Braves, try and find errors, on
as many platforms as possible, please.

Compiling on RedHat 9:


Ian Macdonald | Mickey Mouse wears a Spiro Agnew watch.
System Administrator |
ian@caliban.org |
http://www.caliban.org |
>

Hi,

···

At Fri, 25 Jul 2003 04:40:29 +0900, Ben Giddings wrote:

It looks like /usr/kerberos/include isn’t in the include path. Configure
should probably catch that, right? I configured it as ./configure
–prefix=/usr/local/ruby-1.8.0-preview4

CVS HEAD uses pkg-config if available.

Or, configure with
–with-openssl-include=/usr/kerberos/include


Nobu Nakada

Brian McCallister wrote:

ossl_config.c:147: bad macro argument list
ossl_config.c:147: bad macro argument list

Hey, I recognize that! Saw it just last night!
Here’s my write-up and fix for it.

Ruby 1.8.0 preview4
Mac OS X 10.2.3

Bug in ‘ext/opensll’ extension:
It incorrectly configures HAVE_VA_ARGS_MACRO,
causing the build to fail with errors from ‘cpp’.

In ‘extconf.rb’, a test defines a macro for VA_ARGS,
but doesn’t invoke the macro, so it never gets expanded or evaluated.
Adding some dummy code to actually use the macro
is needed to test for VA_ARGS. (I think. Yes?)

Anyway, with a slight change, it configures without HAVE_VA_ARGS_MACRO,
and the extension (and everything else) builds to completion.

A one-line patch for ‘extconf.rb’ follows.

105c105
< if try_cpp("#define FOO(a, …) foo(a, ##VA_ARGS)\n int x() { FOO(1,2); }
")

···

if try_cpp(“#define FOO(a, …) foo(a, ##VA_ARGS)\n”)

(Now, to figure out how to tell ‘tcltklib’ about ‘-framework Tcl’…
and the same with ‘readline’… I think I still have the notes from last time!)

Hello,

···

In message “Re: ruby 1.8.0 preview4” on 03/07/25, Dave Fayram dfayra00@umail.ucsb.edu writes:

Mac OS X 10.3 Developer Preview has the following issue during build of
eval.c:

Fixed in the latest CVS. Wait for preview5, or you can always try the
bleeding edge repository.

See http://www.ruby-lang.org/en/cvsrepo.html.

						matz.

Hi,

···

From: Wybo Dekker wybo@servalys.nl
Subject: Re: ruby 1.8.0 preview4
Date: Fri, 25 Jul 2003 22:29:26 +0900
Message-ID: Pine.LNX.4.44.0307251518460.10978-100000@servalys.nl

/usr/local/lib/ruby/1.8/tk.rb:940: warning: method redefined;
discarding old chooseDirectory

/usr/local/lib/ruby/1.8/tk.rb:1487:in const_missing': \ uninitialized constant Tk::Encoding::INTERP (NameError) from /usr/local/lib/ruby/1.8/tk.rb:1487:in encoding=’
from /usr/local/lib/ruby/1.8/tk.rb:1522
from -e:1:in `require’
from -e:1

Thanks. I fixed on CVS.

                              Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Lyle, I tried to build 1.0.24 against the Ruby 1.8.0 pre 7 and I get a marco
error on “connect”. It appears the macro is defined in Win32.h from ruby
and conflights with the connect function in FXDatatarget.h.

Did you have this issue on earlier previews??

Yukihiro Matsumoto wrote:

I’m guessing this is known, but any script I’ve got that loads rexml
emits these warnings:

c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character
class has`-’ without escape

We already fixed them before preview4. Perhaps you need to re-install
the libraries.

Yeup - I guess the mswin32 distribution had older rexml in it.

···

Chris
http://clabs.org/blogki

Find below the results of building preview4 on HP-UX;
I fiddled a bit with those (important!!) sha2 warnings and I have a
feeling I’m missing something obvious. Can’t get it to work :frowning:

Hmm, it seems HP-UX compiler does not provide sane definition of
uint64_t. I don’t know how to fix this. Anyone?

It does define it. But somehow it doesn’t get through to sha2.c
I can compile a testfile containing
uint64_t value = (uint64_t)0x1234567812345678;
just fine. So I’m probably doing something stupid. Maybe I should try with
a fresh untar (though I’ve typed make clean and removed the Makefiles in
all ext/ directories). I’ll try again tomorrow.

Bye,
Kero.

It is. That’s what I meant… that debugging symbols are included. It gets a
lot smaller if you strip them - under FreeBSD, about half size. I guess the
end-user or packager can choose that if they wish.

Cheers,

Brian.

···

On Fri, Jul 25, 2003 at 01:42:24AM +0900, Yukihiro Matsumoto wrote:

In message “Re: ruby 1.8.0 preview4” > on 03/07/24, Brian Candler B.Candler@pobox.com writes:

ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.0-preview4.tar.gz

I notice code is compiled with -g and not stripped. Looking at 1.6.8 it
seems to be the same, so I guess this is intentional.

Strange. It has not changed since 1.6.8; it should be compiled with
“-g -O2” by default, without stripping.

That’s backwards, yes? Didn’t you add the call to FOO rather than removing it?

-Mark

···

On Fri, Jul 25, 2003 at 02:22:52PM +0000, Mike wrote:

A one-line patch for ‘extconf.rb’ follows.

105c105
< if try_cpp("#define FOO(a, …) foo(a, ##VA_ARGS)\n int x() { FOO(1,2); }
")

if try_cpp(“#define FOO(a, …) foo(a, ##VA_ARGS)\n”)

Updating to gcc 3.3 solves this problem on OS X (via Apple’s gcc 3.3
updater)

-Brian

···

On Thursday, July 24, 2003, at 03:51 PM, Brian McCallister wrote:

$gcc -v
Apple Computer, Inc. GCC version 1175, based on gcc version 3.1
20020420 (prerelease)

On Thursday, July 24, 2003, at 03:50 PM, Brian McCallister wrote:

ossl_config.c:147: bad macro argument list
ossl_config.c:147: bad macro argument list
cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode
:1:1: no macro name given in #define directive
make[1]: *** [ossl_config.o] Error 1
make: *** [all] Error 1

Darwin Kernel Version 6.6: Thu May 1 21:48:54 PDT 2003;
root:xnu/xnu-344.34.obj~1/RELEASE_PPC Power Macintosh powerpc

OS X 10.2.[whatever current is]

-Brian

On Thursday, July 24, 2003, at 04:03 AM, Yukihiro Matsumoto wrote:

Hello,

I just put preview4 archive on the ftp server.

I’m sure we still have problems left. Braves, try and find errors,
on
as many platforms as possible, please.

ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.0-preview4.tar.gz

I will submit preview5 on Monday 8:00am UTC. The final
1.8.0 will be available on either 30th or 31st, as I hope.

  					matz.

p.s.
To IA64 users: it is reported that you need to change optimize flag
to
“-O0” to compile on IA64 machines.

Hi,

···

At Fri, 25 Jul 2003 04:11:15 +0900, Aredridel wrote:

I still had to apply the patch for ncurses’ location. It’s attached –
it can probably go in the main tree without problems.

I cannot understand the reason for the patch. Even if libtinfo
is necessary to use tgetent(), ext/curses/extconf.rb already
checks it so that the library would be linked. Am I missing
something?


Nobu Nakada

Maybe I missed the answer to this, but what am I supposed to use
instead of $LDFLAGS in extconf.rb?

···

On Fri, 25 Jul 2003 01:47:22 +0900, Yukihiro Matsumoto wrote:

Hi,

In message “Re: ruby 1.8.0 preview4” > on 03/07/24, ts decoux@moulon.inra.fr writes:

This change is normal (in mkmf.rb)

1.6.8

DLDFLAGS = #{$DLDFLAGS} #{$LDFLAGS}

1.8.0

DLDFLAGS = #{CONFIG[‘DLDFLAGS’]} #$DLDFLAGS

If someone use $LDFLAGS in extconf.rb, he’ll have surprise with 1.8.0

I believe this change was made by Nobu, and was intentional. Sorry for
surprises if they happen.

  					matz.

Hello,

In message “Re: ruby 1.8.0 preview4”

···

on Jul.25,2003 02:25:10, chrismo@clabs.org wrote:

I’m guessing this is known, but any script I’ve got that loads rexml
emits these warnings:

c:/ruby/lib/ruby/site_ruby/1.8/rexml/entity.rb:21: warning: character
class has`-’ without escape

We already fixed them before preview4. Perhaps you need to re-install
the libraries.

Yeup - I guess the mswin32 distribution had older rexml in it.

Ah, my mswin32 distribution doesn’t include site_ruby/1.8/rexml :slight_smile:
Remove it and retry.

Regards,

U.Nakamura usa@osb.att.ne.jp

Hi,

···

In message “Re: ruby 1.8.0 preview4” on 03/07/25, Brian Candler B.Candler@pobox.com writes:

It is. That’s what I meant… that debugging symbols are included. It gets a
lot smaller if you strip them - under FreeBSD, about half size. I guess the
end-user or packager can choose that if they wish.

Packager can easily choose that, by modifying Makefile, or supplying
CFLAGS to configure.

						matz.

Mark J. Reed wrote:

A one-line patch for ‘extconf.rb’ follows.

105c105
< if try_cpp("#define FOO(a, …) foo(a, ##VA_ARGS)\n int x() { FOO(1,2); }
")

if try_cpp(“#define FOO(a, …) foo(a, ##VA_ARGS)\n”)

That’s backwards, yes? Didn’t you add the call to FOO rather than removing it?

Depends; “<” is new, “>” is old. Yes, I added a call to FOO.
I knew I should have used a context diff! :slight_smile:

···

On Fri, Jul 25, 2003 at 02:22:52PM +0000, Mike wrote:

Hi!

Got it, patch below (both +Z for Tk and fix for digest/sha2). I am not
sure whether this sha-fix might break sha on old HP-UX systems.

I have easy access to all extensions, except gdbm openssl readline (which
are not installed on our system). The rest at least compiles fine, but I
haven’t tested them.

Bye,
Kero.

diff -r ruby-1.8.0/configure.in ruby-1.8.0-preview4/configure.in
753c753
< hpux*) CCDLFLAGS=‘+z’;;

···
  hpux*)          CCDLFLAGS='+Z';;

diff -r ruby-1.8.0/ext/digest/sha2/sha2.c ruby-1.8.0-preview4/ext/digest/sha2/sha2.c
70c70
< #if defined(GNUC)

#if defined(GNUC) || defined(_HPUX_SOURCE)

I can confirm that it compiles fine.

···

On Sun, Jul 27, 2003 at 03:27:21AM +0900, nobu.nokada@softhome.net wrote:

Hi,

At Fri, 25 Jul 2003 04:11:15 +0900, > Aredridel wrote:

I still had to apply the patch for ncurses’ location. It’s attached –
it can probably go in the main tree without problems.

I cannot understand the reason for the patch. Even if libtinfo
is necessary to use tgetent(), ext/curses/extconf.rb already
checks it so that the library would be linked. Am I missing
something?

/ Alexander Bokovoy


the curls in your keyboard cord are losing electricity.

Hi,

···

At Wed, 30 Jul 2003 11:11:59 +0900, Tim Hunter wrote:

This change is normal (in mkmf.rb)

1.6.8

DLDFLAGS = #{$DLDFLAGS} #{$LDFLAGS}

1.8.0

DLDFLAGS = #{CONFIG[‘DLDFLAGS’]} #$DLDFLAGS

If someone use $LDFLAGS in extconf.rb, he’ll have surprise with 1.8.0

I believe this change was made by Nobu, and was intentional. Sorry for
surprises if they happen.

  					matz.

Maybe I missed the answer to this, but what am I supposed to use
instead of $LDFLAGS in extconf.rb?

It was because that DLDFLAGS includes LDFLAGS for ruby itself
was troublesome, but I’d change:

  • DLDFLAGS in Makefile includes $LDFLAGS again,
  • $LDFLAGS isn’t defaulted to LDFLAGS for ruby
  • but $DLDFLAGS is defaulted to DLDFLAGS.

Does Anyone have problem?


Nobu Nakada