From the "la la la la, life goes on" department:
Here's a preliminary patch against perl patchlevel 24717 to make
64bitall perl build on Mac OS 10.4.x (Darwin 8.x):
--- perl-current-64bitall/hints/darwin.sh-as-received 2005-05-11
12:09:35.000000000 +0200
+++ perl-current-64bitall/hints/darwin.sh 2005-06-07
10:25:45.000000000 +0200
@@ -152,7 +152,12 @@
;;
esac
-cccdlflags=' '; # space, not empty, because otherwise we get -fpic
+case "$ccdlflags" in # If passed in from command line,
presume user knows best
+'')
+ cccdlflags=' '; # space, not empty, because otherwise we get -fpic
+;;
+esac
+
# Perl bundles do not expect two-level namespace, added in Darwin 1.4.
# But starting from perl 5.8.1/Darwin 7 the default is the two-level.
case "$osvers" in
@@ -190,6 +195,42 @@
esac
EOCBU
+# 64-bit addressing support. Currently strictly experimental. DFD
2005-06-06
+if [ "$use64bitall" ]
+then
+case "$osvers" in
+[1-7].*)
+ cat <<EOM >&4
+
+
+
+*** 64-bit addressing is not supported for Mac OS X versions
+*** below 10.4 ("Tiger") or Darwin versions below 8. Please try
+*** again without -D64bitall. (-D64bitint will work, however.)
+
+EOM
+ exit 1
+ ;;
+*)
+ cat <<EOM >&4
+
+
+
+*** Perl 64-bit addressing support is experimental for Mac OS X
+*** 10.4 ("Tiger") and Darwin version 8. Expect a number of test
+*** failures:
+*** ext/IO/io_* ext/IPC/sysV/t/* lib/Net/Ping/t/450_service
+*** Any test that uses sdbm
+
+EOM
+ for var in ccflags cppflags ld ldflags
+ do
+ eval $var="\$${var}\ -arch\ ppc64"
+ done
+ ;;
+esac
+fi
+
##
# System libraries
##
To build, use Configure -de -Doptimize=-g -Duse64bitall -Dusedevel
or similar.
The hints should abort configuration if -Duse64bitall is given on a
pre 10.4 Mac OS X.
As a suddenly-topical side issue I had vaguely considered working out
from here to try to build fat XSs.
However, the first thing to do is address the list of outstanding
issues for the single-architecture build, which is quite long. This
list includes only stuff which I see on a 64-bit build, but not on a
32-:
1.
perl.c: In function 'perl_construct':
perl.c:371: warning: format '%ld' expects type 'long int', but
argument 3 has type 'I32'
...
Aha! The recently-added printf format checking for gcc pays a
dividend. Any amount of this stuff results from many source files
which call out macros containing debugging printf()s when using -
Doptimize=-g. There are a few non-debugging ones too, particularly
from reg*.c. The problem is that the PPC64 architecture has 64-bit
long ints, which require %Ld or %lld formats for printing. It seems
that Configure is trying to address this issue, but gets the wrong
answer:
Checking how to print 64-bit integers...
We will use %ld.
What's more, much of the debugging code does not use the
corresponding definition, IVdf, from config.h. For example, from cop.h:
#define PUSHBLOCK(cx,t,sp) CXINC, cx = &cxstack
[cxstack_ix], \
cx->cx_type = t, \
...
DEBUG_l( PerlIO_printf(Perl_debug_log, "Entering block %ld, type
%s\n", \
(long)cxstack_ix, PL_block_type[CxTYPE(cx)]); )
2.
regcomp.c: In function 'S_regclass':
regcomp.c:4859: warning: field width should have type 'int', but
argument 3 has type 'long int'
... (3 more)
To be investigated. Appears not to result in any test failures.
3.
In file included from ../../perl.h:3970,
from SDBM_File.xs:3:
../../proto.h:48: warning: 'Perl_malloc' attribute directive
ignored
... (many more of the same warning)
I don't know what's going on here. While SDBM::File builds, it fails
in subsequent tests -- see point 6 below.
4.
ext/IO/t/io_multihomed....................Protocol not supported
at ../ext/IO/t/io_multihomed.t line 87.
FAILED--expected 8 tests, saw 0
ext/IO/t/io_sock..........................Use of uninitialized
value $type in socket at ../lib/IO/Socket.pm line 80.
Protocol not supported at ../ext/IO/t/io_sock.t line 43.
FAILED--expected 26 tests, saw 0
ext/IO/t/io_udp...........................Protocol not supported
(maybe your system does not have a localhost at all, 'localhost'
or 127.0.0.1) at ../ext/IO/t/io_udp.t line 60.
FAILED--expected 7 tests, saw 0
lib/Net/Ping/t/450_service................bind: Protocol not
supported at ../lib/Net/Ping/t/450_service.t line 29.
# Failed test 2 in ../lib/Net/Ping/t/450_service.t at line 36
# ../lib/Net/Ping/t/450_service.t line 36 is: ok !!$sock1;
bind: Protocol not supported at ../lib/Net/Ping/t/450_service.t
line 39.
FAILED at test 2
My networking set-up's OK, honest: these tests all pass with a 32-bit
build. Problem in Apple's library? To be investigated.
5.
ext/IPC/SysV/t/ipcsysv....................FAILED at test 10
ext/IPC/SysV/t/msg........................FAILED at test 4
ext/IPC/SysV/t/sem........................FAILED at test 3
Again, my first thought is that Apple's System V IPC library
functions crocked for 64-bit apps. This would not surprise me, but
further investigation is needed: the problem could equally be either
perl itself or the tests.
8.
ext/SDBM_File/t/sdbm......................dyld: lazy symbol
binding failed: Symbol not found: _sdbm_open
Referenced from: ../lib/auto/SDBM_File/SDBM_File.bundle
Expected in: dynamic lookup
... (1 more)
FAILED--no leader found
lib/DBM_Filter/t/01error..................dyld: lazy symbol
binding failed: Symbol not found: _sdbm_open
Referenced from: ../lib/auto/SDBM_File/SDBM_File.bundle
Expected in: dynamic lookup
... (1 more)
FAILED--expected 21 tests, saw 3
... (same for all lib/DBM_Filter/*)
lib/Memoize/t/errors......................dyld: lazy symbol
binding failed: Symbol not found: _sdbm_open
Referenced from: ../lib/auto/SDBM_File/SDBM_File.bundle
Expected in: dynamic lookup
... (1 more)
FAILED--expected 11 tests, saw 5
lib/Memoize/t/tie_sdbm....................dyld: lazy symbol
binding failed: Symbol not found: _sdbm_open
Referenced from: ../lib/auto/SDBM_File/SDBM_File.bundle
Expected in: dynamic lookup
... (1 more)
FAILED--no leader found
These all stem from whatever it was that went wrong in building
SDBM_File.
I'll be fighting my way through these over the next few days. But if
anybody wants to beat me to it, be my guest.
--
Dominic Dunlop