On Wed, 5 Sep 2007 20:20:07 +0530 Ritesh Raj Sarraf <[EMAIL PROTECTED]> wrote:
> > *libraries* not applications and even less so complete compilers. > > > > > When I do a `apt-cross -a ia64 -i gcc` > > > > gcc is not a library - gcc-ia64-cross will not provide anything useful. > > apt-cross is not able to work with that package anyway. > > > > So apt-cross doesn't do dependency tracking ? Yes it does. > At least it could do metapackage => realpackage mapping. It does - what it cannot do is actually produce a useful gcc-arm-cross because gcc is an empty package. gcc-4.2 is the only worthwhile selection. apt-cross does require some level of cross-compilation knowledge - it is not intended to do what you seem to expect. I can only think that you are unaware of the complexities of what you are actually trying to achieve. > > > If you want a cross-compiler you have to BUILD it. apt-cross / > > dpkg-cross cannot do that for you. > > > > Can this be put as a feature request ? NO. Building a cross-compiler is a non-trivial task that is FAR, FAR beyond the scope of apt-cross or dpkg-cross. > From the way I interpreted the manpage, it'd be a great feature if the user > doesn `apt-cross -i packagename` and depending upon the state of his box, > everything gets dones (fetching, building, installing) It does - for LIBRARIES. Building a cross-compiler is a separate task - see emdebian-tools for that. apt-cross -i first performs the actions of apt-cross -g then the actions of apt-cross -b and the calls dpkg to do the -i. Yet apt-cross cannot help you with a cross-compiler. It simply makes LIBRARIES accessible to a cross-compiler that you obtain separately. I think you have misunderstood cross-building and the role of a cross compiler vs the role of apt-cross and dpkg-cross. A cross-compiler is built or installed with apt-get. Emdebian has certain toolchains available but not for ia64. emdebian-tools is a package that can help in building certain cross-compilers but it is a significant task that still requires significant input from you to actually get the build to work and provide installable packages. I would not expect emdebian-tools to be able to build a cross-compiler for ia64 without you getting involved in patching gcc-4.2 and/or binutils in the process. apt-cross simply downloads existing libraries and passes them to dpkg-cross to convert them into Architecture:all packages that make the library and the development headers accessible to the cross-compiler. apt-cross moves existing files around within a .deb - creating a cross-compiler means rebuilding the binaries in the package to perform a completely different task to the Debian package AND moving those new binaries around within the .deb to not conflict with the native toolchain. Looks like I need to add some more to the manpage. The summary is this: 1. gcc exists in Debian for native compiling. No such package exists in Debian for cross-compiling. There is no prospect of Debian being able to provide such a set of packages in the foreseeable future. 2. Emdebian carries *some* cross-compiler versions of gcc-4.1 and gcc-4.2 as part of toolchains that can be installed to provide a cross-compiler for arm and a few other architectures. ia64 is not currently supported. Again, this is unlikely to change in the near future. 3. A cross-compiler is more than just another version of gcc. It is a completely rebuilt package that outputs entirely different ELF binaries and which must be installed with all the support packages like libc6 and libc6-dev. It is more like porting a package from one API to another - sometimes it needs a lot of hands-on work in the bowels of the gcc codebase. :-( 4. apt-cross (and dpkg-cross) assist in preparing the LIBRARIES for cross-compilers - in this case libc6 and libc6-dev - such that the cross-compiler (arm-linux-gnu-gcc or arm-linux-gnu-g++ etc.) can look up the correct symbols for the foreign binary. 5. There are too many permutations to make cross-compilers available in Debian. Emdebian tries to help out but only certain combinations can ever be supported. ia64 is not one of those and is unlikely to become one. 6. Cross-compilers need to be built using the native gcc using different environment settings and parameters to create new packages that can be installed alongside the native gcc. This task is as labour intensive as preparing the native gcc packages in Debian and requires significant man-hours. Only certain combinations can be automated and even then the build will fail quite often. You must accept that limitation if you are to work with any cross-compiler. -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
pgpkdPc3ZhWTg.pgp
Description: PGP signature