On Fri, 30 Sep 2011 14:35:57 +0200 Chris Jones wrote: > Hi all, > > I hope the cross-development gurus out there might have a simple answer > to this question. Basically I've got an application here which I'd like > to cross-build to run on a Balloon board. Yes, when time allows, I need to update the docs on the Emdebian wiki about this. The issue is that the entire cross-build setup in Debian is in flux, pending the arrival of MultiArch. In the meantime, apt-cross became so broken by other changes, that it had to be removed. xapt is the interim solution. If you are using Lenny, then apt-cross still works. If you are using Squeeze, you need xapt. When Wheezy comes around, the expectation is that there will be "the final solution", based on MultiArch. > It has worked before, and > indeed cross-builds quite happily on another machine, but on the Debian > Squeeze box I've got set up here, fails because it can't find a header > file in /include/libssl. That actual path (or partial path) doesn't exist in Debian, native or cross. What I think you need is include/openssl/ which is part of the libssl-dev package. Once processed with xapt, this becomes: /usr/arm-linux-gnueabi/include/openssl/ The other possibility is that the package itself has been updated (the version in Squeeze is almost certainly different) and that version might not actually be cross-buildable at that version. Linaro are doing some cross-builds but whether this package is involved, I have no idea. Wookey? > Looking at the machine which works, the offending file is present and > correct. To be correct, it needs to be in /usr/arm-linux-gnueabi/include/ Anything in /usr/include is the build architecture, not the host architecture. (BuilD = Desktop, Host = handheld so build is i386 or amd64 usually, host is armel or armhf.) The header files themselves are often architecture-independent but the library against which the compiled code is linked must be the correct architecture and that needs to be in /usr/arm-linux-gnueabi/lib/ and is usually brought in as a dependency of the -dev package. Depends: libssl0.9.8-armel-cross (= 0.9.8o-4squeeze2) So libssl0.9.8-armel-cross contains the libraries against which the compiled code will be linked: /usr/arm-linux-gnueabi/lib/libssl.so.0.9.8 > According to dpkg -S, it's owned by libssl-dev-armel-cross. But > I can't figure out how to install that package. If dpkg -S says that the file is owned by that package, that can only be because the package IS installed. Check with: dpkg -l libssl-dev-armel-cross If the package you are trying to cross-build cannot find it, the problem is going to be in the package itself not correctly identifying that it is actually doing a cross build. If the cross package is too old, a specific file might not be found but the directory probably hasn't changed. > All the internet > searching I've done has pointed to using apt-cross, but that seems to > have gone away in Debian Squeeze. Yes, the alternative is xapt but it is NOT a drop-in replacement because apt-cross was just too broken to be replaced in that way. > What's the approved way of installing -dev package for cross-building > under Debian at the moment? $ sudo apt-get install xapt $ sudo xapt -m -a armel libssl-dev The BIG change from apt-cross is that xapt NEVER tries to work out what is currently installed as -cross packages, it simply downloads everything, crosses everything (including stuff which doesn't need to be crossed) and installs everything, old or new. It's blind, it's dumb but it doesn't get confused and it doesn't try to be clever. The -m switch is because some of the packages are part of the way through conversion to MultiArch. However, as dpkg -S knows about the file that can only mean that the -cross package is already installed. You need to check that first and work out what is going wrong there before assuming that the package is not installed. Alternatively, build it natively on a faster armel box... -- Neil Williams ============= http://www.linux.codehelp.co.uk/