.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "DPKG-CROSS 1" .TH DPKG-CROSS 1 "2019-05-26" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "Name" .IX Header "Name" dpkg-cross \- manage libraries for cross compiling .SH "Copyright and Licence" .IX Header "Copyright and Licence" .Vb 7 \& Copyright (C) 1997\-2000 Roman Hodek \& Copyright (C) 2000\-2002 Colin Watson \& Copyright (C) 2002\-2004 David Schleef \& Copyright (C) 2004 Nikita Youshchenko \& Copyright (C) 2004 Raphael Bossek \& Copyright (c) 2007\-2011 Neil Williams \& Copyright (c) 2011 Wookey \& \& This program is free software; you can redistribute it and/or modify \& it 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. \& \& This program is distributed in the hope that it will be useful, \& but WITHOUT ANY WARRANTY; without even the implied warranty of \& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \& GNU General Public License for more details. \& \& You should have received a copy of the GNU General Public License \& along with this program; if not, write to the Free Software \& Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110\-1301, USA. .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 8 \& dpkg\-cross [OPTIONS] [\-\-install|\-i] \& dpkg\-cross [OPTIONS] [\-\-build|\-b] \& dpkg\-cross [OPTIONS] [\-\-remove|\-\-purge|\-r] \& dpkg\-cross [OPTIONS] [\-\-status|\-s] \& dpkg\-cross [OPTIONS] [\-\-list|\-l] \& dpkg\-cross [OPTIONS] [\-\-list\-files|\-L] \& dpkg\-cross [OPTIONS] [\-\-query|\-Q] \& dpkg\-cross [OPTIONS] [\-\-update|\-u] \& \& OPTIONS: [ \-v | \-\-verbose ] [ \-q | \-\-quiet ] \& { [ \-a | \-\-arch ] architecture } { [ \-X | \-\-exclude ] PACKAGE } \& [ \-A | \-\-convert\-anyway ] [ \-M | \-\-convert\-multiarch ] [ \-k | \-\-keep\-temp ] .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" dpkg-cross is a tool to install and manage libraries and header files for cross compiling. dpkg-cross converts native Debian packages for the target architecture to cross compiling support packages that can be installed on any architecture, but in different paths to avoid conflicts. It then calls dpkg to install the converted package. The conversion step alone can be done with the \-\-build option. Other options are wrappers around corresponding dpkg functionality. .PP dpkg-cross is intended to make it easier for you to keep your cross compiling libraries up-to-date, as it works directly on Debian packages. It saves you copying the libs and headers from a machine with your target architecture, or extracting them via dpkg-deb \-\-fsys\-tarfile. .PP dpkg-cross also collects and install the .shlibs files in \-dev packages, which are needed by dpkg-shlibdeps. .SH "CMAKE" .IX Header "CMAKE" CMake cross-building support is experimental! .PP CMake requires a little support from dpkg-cross to cross-build. The included cmake support file is an example for Linux kernels. Use: .PP .Vb 2 \& rm CMakeCache.txt \& cmake \-DCMAKE_TOOLCHAIN_FILE=/etc/dpkg\-cross/cmake/CMakeCross.txt .Ve .PP The main changes involve setting \s-1PKG_CONFIG_LIBDIR\s0 within CMake an setting the include directories to locate the cross libraries installed by dpkg-cross e.g. .PP .Vb 3 \& #Make pkg\-config look in the right place \& SET(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig/) \& ELSE (CMAKE_CROSSCOMPILING) .Ve .PP Packages using cmake may need some tweaks to debian/rules, e.g. .PP .Vb 8 \& ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) \& export CC=$(DEB_HOST_GNU_TYPE)\-gcc \& export CXX=$(DEB_HOST_GNU_TYPE)\-g++ \& export CMAKE_TOOLCHAIN_FILE=/etc/dpkg\-cross/cmake/CMakeCross.txt \& else \& export CC=gcc \& export CXX=g++ \& endif .Ve .SH "OPTIONS" .IX Header "OPTIONS" dpkg-cross follows the usual \s-1GNU\s0 command line syntax, with long options starting with two dashes ('\-'). .PP .Vb 1 \& \-h|\-\-help .Ve .PP Show summary of options. .PP .Vb 1 \& \-v|\-\-verbose .Ve .PP Be more verbose. .PP .Vb 1 \& \-q|\-\-quiet .Ve .PP Be more quiet. .PP .Vb 1 \& \-a|\-\-arch architecture .Ve .PP Install for architecture architecture. .PP .Vb 1 \& \-i|\-\-install .Ve .PP Install Debian packages (.deb) named on the command line. Only files in the directories /lib, /usr/lib and /usr/include are extracted, since only they can be relevant for cross compiling. In the lib directories, also no subdirectories are extracted. .PP .Vb 1 \& \-A|\-\-convert\-anyway .Ve .PP Convert Debian package even if it does not provide any files useful for cross-compile environment. .PP .Vb 1 \& \-M|\-\-convert\-multiarch .Ve .PP Convert package even if it is a multiarch package. If the package is not a multiarch package, processing continues as normal. .PP .Vb 1 \& \-X|\-\-exclude PACKAGE .Ve .PP Removes the specified package from the dependencies of the current package. Typically used to drop dependencies on packages that are not required within a cross-build environment, e.g. packages containing only executables or architecture independent files. .PP dpkg-cross can only check the current package and information about a dependency is not available (for that, use xapt). By default, dpkg-cross converts all dependencies to specify the cross version of the dependency package. .PP If you know that a particular dependency should not be converted (it provides no useful files or is architecture independent), that dependency can be excluded and dpkg-cross will remove that package from the dependency information of the cross package. \-X has replaced the use of keepdeps and removedeps in /etc/dpkg\-cross/cross\-compile. .PP \&\-X|\-\-exclude \s-1PACKAGE\s0 needs to be repeated for each package to be excluded. .PP .Vb 1 \& \-k|\-\-keep\-temp .Ve .PP Keep the built and installed package instead of deleting it. Requires \-\-install. .PP .Vb 1 \& \-b|\-\-build .Ve .PP Just build the converted Debian package, but do not install it with dpkg. .PP .Vb 1 \& \-r|\-\-remove .Ve .PP Remove the cross compiling packages named on the command line. .PP .Vb 1 \& \-s|\-\-status .Ve .PP Print status of the named packages. .PP .Vb 1 \& \-l|\-\-list .Ve .PP Print short version of status of named packages or package name patterns. .PP .Vb 1 \& \-L|\-\-list\-files .Ve .PP List files belonging to the named packages. .PP .Vb 1 \& \-u|\-\-update .Ve .PP Update current cross-installation with Debian packages found in/under the paths given as arguments. Will check all packages there if they are installed already as cross-compiling packages and if they are really updates. Those packages will be installed as with \-i. .PP .Vb 1 \& \-Q|\-\-query .Ve .PP Much like \-\-update, but just prints available update packages and does not install them. .SH "FILES" .IX Header "FILES" /etc/dpkg\-cross/cross\-compile defines the default_arch for dpkg-cross: .PP The default architecture for dpkg-cross is normally set by debconf. To change the system-wide value, use: .PP .Vb 1 \& $ sudo dpkg\-reconfigure dpkg\-cross .Ve .PP Alternatively, the default can be overridden on a per-user basis using the optional file in \f(CW$HOME\fR/.dpkg\-cross/ .SH "Conversion process" .IX Header "Conversion process" There is no safe way for dpkg-cross to mangle certain files in \-dev packages, particularly files in \fI/usr/share\fR or to determine precisely which of these files could be parsed and which cannot. Special cases do not help \- dpkg-cross already has too many of those. .PP It is not safe to leave files in the package nor is it safe to move files into arbitrary locations when there is no reliable and standardised way to determine the usefulness of a particular kind of file. Package specific config scripts cannot be supported and even build-system specific ones are not necessarily going to work without a lot of ongoing maintenance. .PP Therefore, \f(CW\*(C`dpkg\-cross\*(C'\fR is very restrictive on which files are retained in the \-cross package. .SS "Files to be converted" .IX Subsection "Files to be converted" All files in .PP .Vb 1 \& /usr/include/* .Ve .PP Also /usr/src and /usr/lib are searched for includes \- files with \&.h, .hh, .hpp extensions (case insensitive). .PP Library files \- *.so* and *.a and *.o files from /lib and /usr/lib (and all the multilib eqivalents (lib64, lib32, libo32, libhf, libx32 etc). Other library files are not copied. *.la files in library directories are also copied, and library and paths are modified there. Same for /usr/lib/pkgconfig/*.pc files. .PP Symlinks are copied (and modified appropriately) if their destination is copied. Also, symlinks to non-existing shared libraries are copied (this is common case for libdevel packages) .PP Directories are created only to hold some files or symlinks. No empty directories are copied. .SH "Multiarch behaviour" .IX Header "Multiarch behaviour" By default does nothing with packages from Debian which already support Multi-Arch \- the package is simply copied to the current work directory, if it does not already exist. Any package containing a Multi-Arch: field in DEBIAN/control is skipped in this manner. .PP \&\-\-convert\-multiarch can be specified to instead force the generation of a \&\-\-cross package with the files moved into the conventional dpkg-cross locations. .PP The Multiarch spec ensures that multiarch packages will only be available from Debian mirrors once dpkg itself is capable of installing the packages and installing a Multiarch package means being able to install a 32bit multiarch package alongside a 64bit multiarch package. Installing an armel multiarch package alongside an x86 multiarch package is no different to 32bit vs 64bit. (What changes is how the multiarch package itself handles the header files and pkg-config files.)