[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Package dependencies in cross gcc

Dear Embedded Debain Experts,

I've recently bought myself a Linksys NSLU2; if you're not familiar with it, it's a tiny cheap ARM-based box with ethernet and USB 2.0 with at least five different ways to run Linux on it. See http://nslu2-linux.org. I've chosen to install the big-endian Debian variant called OpenDebianSlug (http://nslu2-linux.org/wiki/DebianSlug/OpenDebianSlug).

The OpenDebianSlug packages are being compiled natively by people with higher-spec hardware. I have a regular "un-fattened" NSLU2 for which cross-compilation (from my Debian PC) is a more sensible choice. I have set up a cross-compilation environment using dpkg-cross and the Debian gcc and binutils packages, which I have described at http://nslu2-linux.org/wiki/DebianSlug/CrossCompiling. Using this I can at least compile "hello world".

Now I am trying to cross-compile some more ambitious code, and I'm encountering difficulties. In particular it seems that the libstdc++ that I built built is inferior to the native one; I think that configure decided that some platform headers (sys/time.h, for example) were missing and disabled some things. But this shouldn't matter as I can just dpkg-cross the native-compiled library package and use that instead.

Trying to do this revealed another issue. It looks as if my cross-compiler packages are dependent on the native gcc-base package:

$ dpkg --info gcc-3.3-armeb-linux_3.3.5-13_i386.deb
 new debian package, version 2.0.
 size 238066 bytes: control archive= 1285 bytes.
     733 bytes,    17 lines      control
    1614 bytes,    20 lines      md5sums
     251 bytes,     7 lines   *  postinst             #!/bin/sh
     101 bytes,     5 lines   *  prerm                #!/bin/sh
 Package: gcc-3.3-armeb-linux
 Version: 1:3.3.5-13
 Section: devel
 Priority: extra
 Architecture: i386
***HERE*** Depends: gcc-3.3-base (>= 1:3.3.5-13), libgcc1-armeb-cross (>= 1:3.3.4-3), libc6 (>= 2.3.5-1), cpp-3.3-armeb-linux (>= 1:3.3.5-13), cpp-3.3-armeb-linux (<< 1:3.3.6), binutils-armeb-linux (>= 2.15-5)
 Recommends: libc6-dev-armeb-cross (>= 2.3.2.ds1-16)
 Suggests: gcc-3.3-doc (>= 1:3.3.5-13)
 Conflicts: gcc-3.2 (<= 1:3.2.3-0pre8)
 Provides: c-compiler-armeb-linux
 Installed-Size: 520
 Maintainer: Debian GCC maintainers <debian-gcc@lists.debian.org>
 Source: gcc-3.3
 Description: The GNU C compiler
  This is the GNU C compiler, a fairly portable optimizing compiler for C.
  This package contains C cross-compiler for armeb architecture.

Question: is this correct? If you have a cross-compiler package handy, can you see what yours depends on? (What does gcc-base do, anyway?)

I noticed this because the libstdc++ packages that I've converted from the native build using dpkg-cross depend on gcc-3.3-base-armeb-cross, and so refuse to install:

$ dpkg --info libstdc++5-armeb-cross_3.3.5-13_all.deb
 new debian package, version 2.0.
 size 255222 bytes: control archive= 695 bytes.
     701 bytes,    17 lines      control
     151 bytes,     2 lines      md5sums
      38 bytes,     1 lines      shlibs
 Package: libstdc++5-armeb-cross
 Version: 1:3.3.5-13
 Section: devel
 Priority: extra
 Architecture: all
 Maintainer: Debian GCC maintainers <debian-gcc@lists.debian.org>
 Source: gcc-3.3
Depends: gcc-3.3-base-armeb-cross (>= 1:3.3.5-13), libc6-armeb-cross (>= 2.3.2.ds1-21), libgcc1-armeb-cross (>= 1:3.3.4-3)
 Description: The GNU Standard C++ Library v3 (for cross-compiling)
  This package was generated by dpkg-cross for cross compiling.
  This package contains an additional runtime library for C++ programs
  built with the GNU compiler.
  libstdc++-v3 is a complete rewrite from the previous libstdc++-v2, which
  was included up to g++-2.95. The first version of libstdc++-v3 appeared
  in g++-3.0.

I wonder if this is a problem with dpkg-cross; should it have not modified the gcc-base dependency? Or should I be forcing it using -A and/or removedeps in /etc/dpkg-cross/cross-compile?

I'm am pretty new to this stuff - I've been using Debian for years but had not looked inside a .deb until a few weeks ago. I think maybe I've jumped in at the deep end. Any suggestions would be much appreciated.



p.s. please CC any replies directly to me.

Reply to: