File: perl-cross-debian.1

package info (click to toggle)
perl-cross-debian 0.0.5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 2,932 kB
  • ctags: 190
  • sloc: sh: 15,846; makefile: 1,269; ansic: 846; xml: 408; perl: 159
file content (222 lines) | stat: -rw-r--r-- 9,966 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
'\" t
.\"     Title: PERL-CROSS-DEBIAN
.\"    Author: Neil Williams <codehelp@debian.org>
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      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