On Mon, 29 Jan 2001 15:19:19 +0000, Nicholas Clark <[EMAIL PROTECTED]> wrote:
> On Mon, Jan 29, 2001 at 02:32:24PM +0100, H . Merijn Brand wrote:
> 
> > 1..1440
> > # -18446744073709552000 -18446744073709552000 -9223372036854775808 
>-9223372036854775807 -1212121212121212121 -979797979797979797 -1 0 1 
>979797979797979797 1212121212121212121 9223372036854775807 9223372036854775808 
>18446744073709551615 18446744073709552000
> 
> On x86 with 64 bit perl I see
> 
> # -1.84467440737096e+19 -1.84467440737096e+19 -9.22337203685478e+18 
>-9223372036854775808 -1212121212121212121 -979797979797979797 -1 0 1 
>979797979797979797 1212121212121212121 9223372036854775808 9223372036854775809 
>18446744073709551615 1.84467440737096e+19
> 
> I do not know why you have -18446744073709552000 and 18446744073709552000
> 
> > # ok, as string ++ of max_uv is "18446744073709551616", numeric is 
>18446744073709552000
> 
> but again this is suggesting that floating point to string conversion is,
> erm, "inconsistent with I would expect"
> 
> > "cast.c", line 231.18: 1506-280 (E) Function argument assignment between types 
>"void(*)(int)" and "int(*)()" is not allowed.
> 
> Yes. Oops. Sorry. Jarkko told me there was a problem with his AIX, but I
> didn't know what I needed to do to solve it.
> 
> > # -- changed cast of blech to void (was signal_t
> > # make cast
> > xlc   -L/pro/local/lib -b32  cast.c   -o cast
> 
> -b32 means what?

Nice of you to ask: "I don't know". For -q however:

          -q32          Selects 32-bit compiler mode.
          -q64          Selects 64-bit compiler mode.

I do *not* have -b32 in my Policy.sh, it emerges after Configure ;-)

from hints/aix.sh:

            # -q32 and -b32 may have been set by uselargefiles or user.
            # Remove them.
            ccflags="`echo $ccflags | sed -e 's@-q32@@'`"
            ldflags="`echo $ldflags | sed -e 's@-b32@@'`"
and
            # linking, and it wants -q64 (-b64 is for ld only!).

AIX 4.2's ld manual does not mention -b32/-b64 option, and it took me a while
to dig up the AIX 4.3 info CD with manual pages:

        Linking Mode

        The ld command can link 32-bit objects and programs as well as 64-bit
        objects and programs, but 32-bit and 64-bit objects may not be linked
        together. To specify the mode for linking, you may use the OBJECT_MODE
        environment variable or the -b32 or -b64 options.

        Environment Variables
        :
        OBJECT_MODE If neither the -b32 nor -b64 option is used, the OBJECT_MODE
        environment variable is examined to determine the linking mode. If the
        value of OBJECT_MODE is 32 or 64, 32-bit or 64-bit mode is used,
        respectively. If the value is 32_64 or any other value, the linker
        prints an error message and exits with a non-zero return code.
        Otherwise, 32-bit mode is used.

and refering to getconf calls from aix.sh:

# getconf
Usage: getconf [ -v specification ] System_var
       getconf [ -v specification ] Path_var Pathname
# getconf XBS5_ILP32_OFFBIG_LIBS
-lc -lpthread -lm
# getconf XBS5_LP64_OFF64_CFLAGS
-q64
# getconf XBS5_LP64_OFF64_LDFLAGS
-b64
# getconf XBS5_LP64_OFF64_LIBS
-lc -lpthread -lm
#

Which obviously indicates that -b32 is a loader option. But *WHY* is it -b32
and not -b64, as my manual quest shows?

# grep b32 config.sh
ldflags='-L/pro/local/lib -b32'
ldflags_uselargefiles='-b32'
# grep q32 config.sh
ccflags='-DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 
-I/pro/local/include -q32 -D_LARGE_FILES -qlonglong'
ccflags_uselargefiles='-q32 -D_LARGE_FILES -qlonglong'
#

Try without? I'll just patch aix.sh to kill/change -[bq]{32,64} to whatever
(lets start with just drop those options).
Running ...

# make distclean
# Rsync
# cat .patch
8589
# cp ../Policy.sh .
# Configure -Dusedevel -Duseperlio -Duse64bitint -des
:
# grep '[bq]32' config.sh
# make
:
# make cast
xlc   -L/pro/local/lib   cast.c   -o cast
# make test
:
All tests successful.
u=1.48  s=0.98  cu=104.22  cs=51.18  scripts=278  tests=21469
# make distclean
# cp ../Policy.sh .
# Configure -Dusedevel -Duseperlio -Dusemorebits -des
:
# grep '[bq]32' config.sh
# make
:
# make cast
xlc   -L/pro/local/lib   cast.c   -o cast
# make test
:
op/numconvert........FAILED at test 117
:
lib/peek.............FAILED at test 7
:
# 

Hmmm, no change. Let's force q64 ...

# make distclean
# cp ../Policy.sh .
# Configure -Dusedevel -Duseperlio -Dusemorebits -des
:
Try to understand large files, if available? [y]
Rechecking to see how big your file offsets are...
exec(): 0509-036 Cannot load program ./try because of the following errors:
        0509-032 Cannot run a 64-bit program on a 32-bit machine.
Rechecking the size of fpos_t...exec(): 0509-036 Cannot load program ./try because of 
the following errors:
        0509-032 Cannot run a 64-bit program on a 32-bit machine.
(I can't execute the test program--guessing 4.)
Try to use 64-bit integers, if available? [y]
Try to use maximal 64-bit support, if available? [n]
Checking for GNU C Library...
exec(): 0509-036 Cannot load program ./gnulibc because of the following errors:
        0509-032 Cannot run a 64-bit program on a 32-bit machine.
Shall I use /usr/bin/nm to extract C symbols from the libraries? [y]
Where is your C library? [/lib/libc.a]
:^C

Back to you ...

> > Testing 9223372036854775800 9223372036854775808
> 
> Hmm. Floating point display not what I expected.
> What should %.24g be giving?
> Why does whatever perl is using also not give the answer correct to 
> digits?
> 
> > HTH
> 
> It does, thanks.

-- 
H.Merijn Brand           Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.005.03, 5.6.0, 5.6.1, 5.7.1 & 623 on HP-UX 10.20 & 11.00, AIX 4.2
   AIX 4.3, WinNT 4.0 SP-6a, and Win2000pro often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/

Reply via email to