Hi Rene,
Thanks for the heads up.
Here (attached) are patches to get perl to cross build.
The perl cross build (on Mips) has been broken for years, back in 2011, I was just rolling
back to an earlier version to get it to work. I put some time into it, and now have the
latest version cross building.
The install process for perl now calls Porting/pod_lib.pl which makes use of the cpan/md5
modules.
Since the cross build uses a native miniperl, and not the real perl, the md5 related calls
were failing. I first tried to get the MD5 modules built into miniperl, but could not get
that to work, so I back-ported the older install method from an earlier perl version that
did not have the MD5 dependencies.
Jan
On 7/13/2013 6:28 AM, René Rebe wrote:
Hi Jan,
just a heads up: the last months we (at ExactCODE) were way too busy with projects not
related to T2. So unfortunately from our side we put less time in using and polishing T2
as we did before with certain embedded projects.
Of course that may change every other quarter as we have projects coming in and
such, …
Patches welcome! Guess I should update T2 on my G5 for the cross build test of
it, … ;-)
Rene
On Jul 12, 2013, at 18:27 , Jan Rovins wrote:
Hi,
I am going through a T2 cross build for Mips64 (octeon processor) on a 32-bit ubuntu
11.10 (Oneric) build host. The last time that I tried the mips64 build was 2011, and it
needs a lot of updating.
I will be reporting my progress as I go, and sending patches as they are
discovered.
The first thing that I ran into was that glibc stage 0 would not build. it may be
something specific to my build host, or to the mips target selection. First, I was
getting configure errors where the test for hard or soft float was failing. I had soft
float set in my T2 config file, so I modified configure to default to soft float, if it
could not determine the test, just to get through the configure stage. (looking back on
this, since it's stage 0, soft float does not matter, since it's going to build for
x86, not mips).
This allowed me to get to the build stage, but during the compile I was getting errors
that __WORDSIZE was not set. this was down in the mips specific directories. In
looking at the .h files that set this, there is an attempt to set __WODSIZE to
MIPS_SZPTR. and my native gcc on the ubuntu machine has no definition for MIPS_SZPTR.
For a stage 0 build, I am puzzled why it is going into the MIPS specific code, I
thought that it should be a straight x86 build at this point. After wasting most of the
day on this and not really getting anywhere, I decided to roll back glibc from 1.17 to
the previous 2.13. That version built OK, with some very minor tweaks. I would like to
get to the bottom of why 2.17 will not build, but for now I will stick with 2.13, an d
continue.
I am currently working on the stage 1 perl build, which is broken.
Jan
----------------------------------------------------------- If you wish to unsubscribe
from this mailing, send mail to
[email protected] <mailto:[email protected]> with a subject of:
unsubscribe t2
--
ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
DE Legal: Amtsgericht Berlin (Charlottenburg) HRB 105123B, Tax-ID#: DE251602478
Managing Director: René Rebe
http://exactcode.com <http://exactcode.com/> | http://exactscan.com
<http://exactscan.com/> | http://ocrkit.com <http://ocrkit.com/> | http://t2-project.org
<http://t2-project.org/> | http://rene.rebe.de
Index: package/perl/perl/installperl.patch.cross
===================================================================
--- package/perl/perl/installperl.patch.cross (revision 0)
+++ package/perl/perl/installperl.patch.cross (revision 0)
@@ -0,0 +1,35 @@
+--- perl-5.16.1/installperl.vanilla 2013-07-12 15:47:46.135127802 -0400
++++ perl-5.16.1/installperl 2013-07-12 15:59:31.189098047 -0400
+@@ -29,7 +29,10 @@
+ use ExtUtils::Packlist;
+ use Cwd;
+
+-require './Porting/pod_lib.pl';
++# Cross install fails because of this
++#require './Porting/pod_lib.pl';
++my @pods = $nopods ? () : (<pod/*.pod>, 'x2p/a2p.pod');
++
+
+ if ($Is_NetWare) {
+ $Is_W32 = 0;
+@@ -554,7 +557,9 @@
+ my $pod = ($Is_Cygwin || $Is_Darwin || $Is_VMS || $Is_W32) ? 'pods' :
'pod';
+ mkpath("${installprivlib}/$pod", $opts{verbose}, 0777);
+
+- for (map {$_->[1]} @{get_pod_metadata()->{master}}) {
++ # Cross install faild because of this
++ #for (map {$_->[1]} @{get_pod_metadata()->{master}}) {
++ for (@pods) {
+ # $_ is a name like pod/perl.pod
+ (my $base = $_) =~ s#.*/##;
+ copy_if_diff($_, "${installprivlib}/$pod/${base}");
+@@ -757,7 +762,8 @@
+ $name = "$dir/$name" if $dir ne '';
+
+ # ignore pods that are stand alone documentation from dual life modules.
+- return if /\.pod\z/ && is_duplicate_pod($_);
++ # cross Install breaks because of this
++ # return if /\.pod\z/ && is_duplicate_pod($_);
+
+ return if $name eq 'ExtUtils/XSSymSet.pm' and !$Is_VMS;
+
Index: package/perl/perl/utils-make.patch.cross
===================================================================
--- package/perl/perl/utils-make.patch.cross (revision 0)
+++ package/perl/perl/utils-make.patch.cross (revision 0)
@@ -0,0 +1,11 @@
+--- perl-5.16.1/utils/Makefile.SH.vanilla 2013-07-11 16:30:01.508700001
-0400
++++ perl-5.16.1/utils/Makefile.SH 2013-07-11 16:30:47.796027058 -0400
+@@ -30,7 +30,7 @@
+ # need perl, not just miniperl.
+ case "$usedl" in
+ define) perl="../miniperl" ;;
+- *) perl="../perl" ;;
++ *) perl="../miniperl" ;;
+ esac
+ cat >Makefile <<!GROK!THIS!
+ # Generated from utils/Makefile.SH. The generated file is
Index: package/perl/perl/perl.conf
===================================================================
--- package/perl/perl/perl.conf (revision 41893)
+++ package/perl/perl/perl.conf (working copy)
@@ -84,6 +84,7 @@
hook_add preconf 2 "( rm -f config.sh Policy.sh; eval sh Configure \$confopt;
)"
if ! atstage native; then
+ var_append confopt " " "-Dtargetdir=$root"
var_append confopt " " "-Ddynamic_ext=none"
var_append confopt " " "-Dstatic_ext=\"Data/Dumper Cwd IO Fcntl POSIX\""
hook_add premake 3 "perl_cross_bootstrap"
Index: package/perl/perl/x2p-make.patch.cross
===================================================================
--- package/perl/perl/x2p-make.patch.cross (revision 0)
+++ package/perl/perl/x2p-make.patch.cross (revision 0)
@@ -0,0 +1,11 @@
+--- perl-5.16.1/x2p/Makefile.SH.vanilla 2013-07-11 16:45:34.742997538
-0400
++++ perl-5.16.1/x2p/Makefile.SH 2013-07-11 16:46:07.154521026 -0400
+@@ -31,7 +31,7 @@
+ # perls, we need perl, not just miniperl.
+ case "$usedl" in
+ define) perl="../miniperl" ;;
+- *) perl="../perl" ;;
++ *) perl="../miniperl" ;;
+ esac
+
+ cat >Makefile <<!GROK!THIS!
Index: package/perl/perl/install.patch.cross
===================================================================
--- package/perl/perl/install.patch.cross (revision 41886)
+++ package/perl/perl/install.patch.cross (working copy)
@@ -1,56 +1,140 @@
-# --- T2-COPYRIGHT-NOTE-BEGIN ---
-# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
-#
-# T2 SDE: package/.../perl/install.patch.cross
-# Copyright (C) 2004 - 2010 The T2 SDE Project
-#
-# More information can be found in the files COPYING and README.
-#
-# This patch file is dual-licensed. It is available under the license the
-# patched project is licensed under, as long as it is an OpenSource license
-# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
-# of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-# --- T2-COPYRIGHT-NOTE-END ---
-
-Some cross compile hacks.
- - Rene Rebe <[email protected]>
-
-Skip man page installation, requires Fcntl extension in miniperl module
- - Michael Tross <[email protected]>
-
---- perl-5.12.0/Makefile.SH.vanilla 2010-04-18 14:15:47.820137756 +0000
-+++ perl-5.12.0/Makefile.SH 2010-04-18 14:21:24.031066801 +0000
-@@ -601,7 +601,7 @@
- \$(RUN) ./generate_uudmap\$(HOST_EXE_EXT) >uudmap.h
+--- perl-5.16.1/Makefile.SH.vanilla 2013-07-11 13:50:47.892263569 -0400
++++ perl-5.16.1/Makefile.SH 2013-07-11 13:56:29.311431169 -0400
+@@ -657,7 +657,7 @@
+ generate_uudmap$(OBJ_EXT): mg_raw.h
- generate_uudmap\$(HOST_EXE_EXT): generate_uudmap\$(OBJ_EXT)
-- \$(CC) -o generate_uudmap\$(EXE_EXT) \$(LDFLAGS)
generate_uudmap\$(OBJ_EXT) \$(libs)
-+ \$(HOSTCC) -o generate_uudmap\$(EXE_EXT) \$(LDFLAGS) generate_uudmap.c
\$(libs)
+ generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
+- $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT)
$(libs)
++ $(HOSTCC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap.c
$(libs)
- !GROK!THIS!
- $spitshell >>$Makefile <<'!NO!SUBS!'
-@@ -1003,7 +1003,7 @@
+ miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
+ $(CCCMD) $(PLDLFLAGS) $*.c
+@@ -1048,7 +1048,7 @@
# But also this ensures that all extensions are built before we try to scan
# them, which picks up Devel::PPPort's documentation.
pod/perltoc.pod: $(perltoc_pod_prereqs) $(PERL_EXE) $(ext) pod/buildtoc
-- $(RUN_PERL) -f -Ilib pod/buildtoc --build-toc -q
-+ $(MINIPERL) -f -Ilib pod/buildtoc --build-toc -q
+- $(RUN_PERL) -f -Ilib pod/buildtoc -q
++ #$(RUN_PERL) -f -Ilib pod/buildtoc -q
pod/perlapi.pod: pod/perlintern.pod
-@@ -1059,11 +1059,11 @@
+@@ -1071,13 +1071,13 @@
+ done
+
+ extras.make: $(PERL_EXE)
+- -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib"
$(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
++ -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib"
$(MINIPERLEXP) -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
+
+ extras.test: $(PERL_EXE)
+- -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib"
$(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
++ -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib"
$(MINIPERLEXP) -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
+
+ extras.install: $(PERL_EXE)
+- -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib"
$(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
++ -@test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib"
$(MINIPERLEXP) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
+
+ .PHONY: install install-strip install-all install-verbose install-silent \
+ no-install install.perl install.man install.html
+@@ -1101,17 +1101,17 @@
INSTALL_DEPENDENCE = all
install.perl: $(INSTALL_DEPENDENCE) installperl
- $(RUN_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS)
$(STRIPFLAGS)
-+ $(MINIPERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS)
$(STRIPFLAGS)
++ ./miniperl -I lib ./installperl --destdir=$(DESTDIR) $(INSTALLFLAGS)
$(STRIPFLAGS)
-@test ! -s extras.lst || $(MAKE) extras.install
install.man: all installman
- $(RUN_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
-+ $(RUN_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
++ ./miniperl -I lib ./installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
# XXX Experimental. Hardwired values, but useful for testing.
# Eventually Configure could ask for some of these values.
+ install.html: all installhtml
+ -@test -f README.vms && cd vms && $(LNS) ../README.vms README_vms.pod
&& cd ..
+- $(RUN_PERL) installhtml \
++ ./miniperl -I lib ./installhtml \
+ --podroot=. --podpath=. --recurse \
+ --htmldir=$(privlib)/html \
+ --htmlroot=$(privlib)/html \
+@@ -1180,7 +1180,7 @@
+ regen_meta regen-meta: META.yml
+
+ META.yml: FORCE
+- PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib
Porting/makemeta
++ PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(MINIPERLEXP) -Ilib
Porting/makemeta
+
+
+ regen_all regen-all: regen regen_meta
+@@ -1225,7 +1225,7 @@
+
+ .PHONY: printconfig
+ printconfig:
+- @eval `$(RUN_PERL) -Ilib -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR)
++ @eval `$(MINIPERLEXP) -Ilib -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR)
+
+ .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
+ realclean _realcleaner clobber _clobber \
+@@ -1444,7 +1444,7 @@
+
+ minitest.utf16: minitest.prep
+ - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) \
+- && $(RUN_PERL) TEST -utf16 base/*.t comp/*.t cmd/*.t run/*.t
io/*.t op/*.t uni/*.t </dev/tty
++ && $(MINIPERLEXP) TEST -utf16 base/*.t comp/*.t cmd/*.t run/*.t
io/*.t op/*.t uni/*.t </dev/tty
+
+ test.utf16 check.utf16: test_prep
+ TEST_ARGS=-utf16 $(RUN_TESTS) choose
+@@ -1513,7 +1513,7 @@
+ # is crashing.
+ minitest: $(MINIPERL_EXE) minitest.prep
+ - cd t && (rm -f $(PERL_EXE); $(LNS) ../$(MINIPERL_EXE) $(PERL_EXE)) \
+- && $(RUN_PERL) TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t
re/*.t op/*.t uni/*.t </dev/tty
++ && $(MINIPERLEXP) TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t
re/*.t op/*.t uni/*.t </dev/tty
+
+ # Test via harness
+
+@@ -1530,7 +1530,7 @@
+ # Porting tests (well-formedness of pod, manifest, etc)
+
+ test_porting test-porting: test_prep
+- cd t && $(RUN_PERL) harness porting/*.t ../lib/diagnostics.t
++ cd t && $(MINIPERLEXP) harness porting/*.t ../lib/diagnostics.t
+
+ # Handy way to run perlbug -ok without having to install and run the
+ # installed perlbug. We don't re-run the tests here - we trust the user.
+@@ -1540,28 +1540,28 @@
+ .PHONY: ok okfile oknack okfilenack nok nokfile noknack nokfilenack
+
+ ok: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
++ $(MINIPERLEXP) -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
+
+ okfile: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
++ $(MINIPERLEXP) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
+
+ oknack: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -A
++ $(MINIPERLEXP) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -A
+
+ okfilenack: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A
++ $(MINIPERLEXP) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A
+
+ nok: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
++ $(MINIPERLEXP) -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
+
+ nokfile: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
++ $(MINIPERLEXP) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
+
+ noknack: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -A
++ $(MINIPERLEXP) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -A
+
+ nokfilenack: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
++ $(MINIPERLEXP) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
-A
+
+ .PHONY: clist hlist shlist
+
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2