PERL 64bit Question

S

Sparky

I've compiled PERL 5.8.2 on AIX 5.1 64bit, I think. Can someone tell
me for sure from this output. The questions I have are, how is it
possible, if this is in fact compiled as 64bit, that I can execute it
on a 32bit AIX 5.1 system? Other programs I've used would fail with
an error. How does one tell exactly that is compiled for 64bit from
this output.

../perl -Ilib -V

Summary of my perl5 (revision 5.0 version 8 subversion 2)
configuration:
Platform:
osname=aix, osvers=5.1.0.0, archname=aix-64int-ld
uname='aix s11f30n01 1 5 0029449a4c00 '
config_args='-Duse64bitint -Duselongdouble
-Aprepend:libswanted=C128 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=define
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc -qnolm', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE
-D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -qlongdouble
-DUSE_NATIVE_DLOPEN -q32 -D_LARGE_FILES -qlonglong',
optimize='-O',
cppflags=''
ccversion='6.0.0.0', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16
ivtype='long long', ivsize=8, nvtype='long double', nvsize=16,
Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -brtl -L/usr/local/lib -b32'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lC128 -lc128 -lbind -lnsl -ldbm -ldl -lld -lm -lcrypt -lc
-lbsd
perllibs=-lC128 -lc128 -lbind -lnsl -ldl -lld -lm -lcrypt -lc
-lbsd
libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-bE:/gpfs/database/dba/utilities/perl582/lib/5.8.2
/aix-64int-ld/CORE/perl.exp'
cccdlflags=' ', lddlflags=' -bhalt:4 -bM:SRE
-bI:$(PERL_INC)/perl.exp
-bE:$(BASEEXT).exp -bnoentry -lc128 -lc -L/usr/local/lib'

Characteristics of this binary (from libperl):
Compile-time options: USE_64_BIT_INT USE_LONG_DOUBLE USE_LARGE_FILES
Built under aix
Compiled at Oct 28 2004 15:32:11
@INC:
lib
/gpfs/database/dba/utilities/perl582/lib/5.8.2/aix-64int-ld
/gpfs/database/dba/utilities/perl582/lib/5.8.2

/gpfs/database/dba/utilities/perl582/lib/site_perl/5.8.2/aix-64int-ld
/gpfs/database/dba/utilities/perl582/lib/site_perl/5.8.2
/gpfs/database/dba/utilities/perl582/lib/site_perl
 
T

Tassilo v. Parseval

Also sprach Sparky:
I've compiled PERL 5.8.2 on AIX 5.1 64bit, I think. Can someone tell
me for sure from this output. The questions I have are, how is it
possible, if this is in fact compiled as 64bit, that I can execute it
on a 32bit AIX 5.1 system? Other programs I've used would fail with
an error. How does one tell exactly that is compiled for 64bit from
this output.

You have to look at two configure variables: use64bitint and
use64bitall. From the INSTALL file:

=head3 64 bit support.

If your platform does not have run natively at 64 bits, but can
simulate them with compiler flags and/or C<long long> or C<int64_t>,
you can build a perl that uses 64 bits.

There are actually two modes of 64-bitness: the first one is achieved
using Configure -Duse64bitint and the second one using Configure
-Duse64bitall. The difference is that the first one is minimal and
the second one maximal. The first works in more places than the second.

The C<use64bitint> option does only as much as is required to get
64-bit integers into Perl (this may mean, for example, using "long
longs") while your memory may still be limited to 2 gigabytes (because
your pointers could still be 32-bit). Note that the name C<64bitint>
does not imply that your C compiler will be using 64-bit C<int>s (it
might, but it doesn't have to). The C<use64bitint> simply means that
you will be able to have 64 bit-wide scalar values.

The C<use64bitall> option goes all the way by attempting to switch
integers (if it can), longs (and pointers) to being 64-bit. This may
create an even more binary incompatible Perl than -Duse64bitint: the
resulting executable may not run at all in a 32-bit box, or you may
have to reboot/reconfigure/rebuild your operating system to be 64-bit
aware.
./perl -Ilib -V

Summary of my perl5 (revision 5.0 version 8 subversion 2)
configuration:
Platform:
osname=aix, osvers=5.1.0.0, archname=aix-64int-ld
uname='aix s11f30n01 1 5 0029449a4c00 '
config_args='-Duse64bitint -Duselongdouble
-Aprepend:libswanted=C128 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=define

And here it becomes evident that you are using the 'minimal' 64bit
version.
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc -qnolm', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE
-D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -qlongdouble
-DUSE_NATIVE_DLOPEN -q32 -D_LARGE_FILES -qlonglong',
optimize='-O',
cppflags=''
ccversion='6.0.0.0', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321

This line tells that you are on a 32bit machine. 'use64bitint' will work
fine here, whereas 'use64bitall' most likely wont.

Tassilo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top