'\" t .\" Title: PERL-CROSS-DEBIAN .\" Author: Neil Williams .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 05/19/2013 .\" Manual: perl-cross-debian User Manual .\" Source: perl-cross-debian .\" Language: English .\" .TH "PERL\-CROSS\-DEBIAN" "1" "05/19/2013" "perl-cross-debian" "perl-cross-debian User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" perl-cross-debian \- Long term maintenance of cross\-build support for the Debian configuration of perl .SH "SYNOPSIS" .HP \w'\fBperl\-cross\-debian\fR\ 'u \fBperl\-cross\-debian\fR [\fB\-\-rootdir=\fR\fBDIRECTORY\fR] \fB\-\-variant=\fR\fB\fISTRING\fR\fR .HP \w'\fBperl\-cross\-debian\fR\ 'u \fBperl\-cross\-debian\fR \fB\-\-clean\fR .HP \w'\fBperl\-cross\-debian\fR\ 'u \fBperl\-cross\-debian\fR [{\fB\-h\fR\ |\ \fB\-\-help\fR} | {\fB\-v\fR\ |\ \fB\-\-version\fR}] .SH "DESCRIPTION" .PP \fBperl\-cross\-debian\fR supports the long term maintenance of cross\-build support for the Debian configuration of perl\&. .PP \fBperl\-cross\-debian\fR is not expected to be run directly on the command line, it is executed by the modified debian/rules of a Debian source package of perl, within the constraints of a cross\-build\&. \fBperl\-cross\-debian\fR uses the cross\-building environment set by \fBdpkg\-architecture \-aARCH\fR to provide essential configuration values for the requested architecture to avoid executing cross\-built binaries within the cross\-build\&. Full support is limited to specific versions of perl already packaged in Debian and only for selected architectures\&. .PP \fBperl\-cross\-debian\fR copies pre\-produced config files into the current perl build tree to prevent the build from needing to execute test binaries during the configuration stage by providing the values of the tests in advance\&. \fBperl\-cross\-debian\fR then extracts values from the cached files to update the build information and package Makefiles\&. .PP \fBperl\-cross\-debian\fR then relies on a patched Makefile\&.SH to call the host perl interpreter instead of the perl interpreter being built internally\&. .PP See \fIRunning the cross build\fR for details of how to prepare the Debian packages of perl for cross\-building for the one of the currently supported host architectures\&. (Patches to apply to supported Debian versions of perl are included in /usr/share/perl\-cross\-debian/patches)\&. .PP See \fIperl\-cross\-staging (1)\fR for information on how to extend \fBperl\-cross\-debian\fR to other host architectures and other versions of perl\&. .SH "COMMAND" .PP \fB\-\-variant \fR\fB\fIVARIANT\fR\fR .RS 4 Name of the current perl build variant (static, debug or shared), passed in via debian/rules, must be specified once for each iteration\&. .RE .PP \fB\-\-clean\fR .RS 4 Runs the \fBperl\-cross\-debian\fR clean target and exits zero\&. \fB\-\-clean\fR overrides any \fB\-\-variant\fR command \- the clean operation does not depend on the current variant\&. .RE .SH "OPTIONS" .PP \fB\-\-rootdir \fR\fB\fIDIRECTORY\fR\fR .RS 4 Debug support for testing with unreleased config files, uses the files from the rootdir instead of looking in the /usr/share/perl\-cross\-debian/$(DEB_HOST_GNU_TYPE)/$(PERL_VERSION) directory\&. ($(PERL_VERSION) in this instance is the output of \fB/bin/bash debian/config\&.debian \-\-full\-version\fR\&.) .RE .PP \fB\-?\fR, \fB\-h\fR, \fB\-\-help\fR, \fB\-\-version\fR .RS 4 Show summary of options and the version information\&. .RE .SH "LIMITATIONS" .PP \fBperl\-cross\-debian\fR implements a safeguard that the perl interpreter to be used during the cross\-build is the same upstream version as the perl interpreter to be cross\-built due to limitations of DynaLoader\&.pm : .sp .if n \{\ .RS 4 .\} .nf arm\-linux\-gnueabi\-gcc \-c \-D_REENTRANT \-D_GNU_SOURCE \-DDEBIAN \-D_FORTIFY_SOURCE=2 \-g \-O2 \-fstack\-protector \-\-param=ssp\-buffer\-size=4 \-Wformat \-Werror=format\-security \-fno\-strict\-aliasing \-pipe \-I/usr/local/include \-D_LARGEFILE_SOURCE \-D_FILE_OFFSET_BITS=64 \-O2 \-g \-DVERSION=\e"3\&.39_02\e" \-DXS_VERSION=\e"3\&.39_02\e" \-fPIC "\-I\&.\&./\&.\&." Cwd\&.c Running Mkbootstrap for Cwd () DynaLoader object version 1\&.13 does not match $DynaLoader::VERSION 1\&.14 at \&.\&./\&.\&./lib/DynaLoader\&.pm line 86\&. Compilation failed in require at \&.\&./\&.\&./lib/ExtUtils/Mkbootstrap\&.pm line 27\&. .fi .if n \{\ .RE .\} .PP Instead, \fBperl\-cross\-debian\fR dies with a version mismatch and fails the cross\-build\&. Ensure that the installed perl interpreter is upgraded before testing a cross\-build of the updated perl source code (or use a chroot)\&. When using a chroot and old\-style dpkg\-cross dependencies, consider preparing at least the zlib and bzip2 dependencies outside the chroot as a new version of perl is frequently not installable with lots of perl modules such as those used by dpkg\-cross\&. e\&.g\&. zlib1g\-dev\-armel\-cross and libbz2\-dev\-armel\-cross as well as libdb\-dev\-armel\-cross and libgdbm\-dev\-armel\-cross\&. .sp .if n \{\ .RS 4 .\} .nf sudo xapt \-a armel \-b zlib1g\-dev libbz2\-dev libdb\-dev libgdbm\-dev .fi .if n \{\ .RE .\} .PP The \-cross packages are in /var/lib/xapt/output and need to be copied into the chroot and installed with \fBdpkg \-i \&./*\fR .PP \fBperl\-cross\-debian\fR also implements a safeguard to prevent cross\-builds when \fBDEB_BUILD_OPTIONS="nocheck"\fR has not been set prior to starting the build\&. Cross\-build failures due to the running of test code within the perl build are not always easy to identify, so \fBperl\-cross\-debian\fR checks for this build option and fails the cross\-build if it is not set\&. (The check occurs inside \fBperl\-cross\-debian\fR so the clean target will have been run before the check is made\&.) .SH "RUNNING THE CROSS BUILD" .PP \fBperl\-cross\-debian\fR needs some changes to the perl package before cross\-building, so ensure that Makefile\&.SH and debian/rules are both patched and that the cross dependencies and cross compiler are installed\&. .PP Patches are carried in the \fBperl\-cross\-debian\fR package in /usr/share/perl\-cross\-debian/patches\&. .PP \fBdebuild\fR is preferred as this will provide a build log and run lintian (by default) which means that the built packages will be checked to ensure that the binaries have been correctly compiled for the cross architecture (amongst the normal checks)\&. Run the cross build with: .sp .if n \{\ .RS 4 .\} .nf DEB_BUILD_OPTIONS="nocheck" debuild \-aarmel \-us \-uc \-d .fi .if n \{\ .RE .\} .PP Note the use of \fIthe \-d option\fR as dpkg cannot check cross\-build dependencies until MutiArch \-dev packages are in use and the requirement for DEB_BUILD_OPTIONS to disable the test suite\&. .SH "SUPPORTED VERSIONS AND ARCHITECTURES" .PP \fBperl\-cross\-debian\fR support is patchy but can be improved\&. Only specific architectures at specific versions are supported \- if you do not find the files for the requested version in the directory of the architecture required, see perl\-cross\-staging (1) for information on how this information can be added and also for details of ongoing work with perl upstream\&. .SH "CLEAN TARGET SUPPORT" .PP \fBperl\-cross\-debian\fR includes support for a custom clean target for cross\-builds to ensure that version\-specific content generated during the cross\-build is cleaned up before dpkg\-source tries to verify the source package\&. If there are additional files which need to be cleaned, file a bug against \fBperl\-cross\-debian\fR\&. .SH "EXTENSION INSTALLATION" .PP The current method of building and installing the extensions does need testing and improvement\&. Whilst the main emphasis for a perl cross build is to support bootstrapping by having the normal perl interpreter available instead of just miniperl, there may be less emphasis on the correct functioning of the extensions and modules normally packaged by a native perl build\&. Problems relating to any use of perl extensions and modules when the cross built perl packages are installed should be reported as bugs in \fBperl\-cross\-debian\fR\&. .SH "EXTENDING PERL-CROSS-DEBIAN" .PP \fBperl\-cross\-debian\fR provides some POD documentation of how to extend support to new architectures and how to update existing support for new versions of perl\&. .PP See /usr/share/doc/perl\-cross\-debian/converting\-native\&.pod and /usr/share/doc/perl\-cross\-debian/new\-arch\&.pod .SH "AUTHOR" .PP \fBNeil Williams\fR <\&codehelp@debian\&.org\&> .RS 4 Wrote this manpage for the Debian system\&. .RE .SH "COPYRIGHT" .br Copyright \(co 2012 Neil Williams .br .PP This manual page was written for the Debian system (and may be used by others)\&. .PP Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation\&. .PP On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common\-licenses/GPL\&. .sp