[Debian-bootstrap] An apparent need for gcc-<triplet>, cpp-<triplet>, g++-<triplet>, etc.

P. J. McDermott pjm at nac.net
Mon Jul 2 04:00:49 MSK 2012


Thibaut and Wookey,

I think we need to either modify src:gcc-defaults or make a new package,
e.g. src:gcc-defaults-cross, to provide symbolic links to and
dependencies on default cross versions of gcc, cpp, g++, etc.

Below are two reasons for this.  Neither of these issues is unavoidable,
so having gcc-<triplet>, cpp-<triplet>, g++-<triplet>, etc. packages
isn't really necessary at the moment.  I'm just pitching an idea for
something that I think one of us should get done eventually.

Missing Symbolic Links
----------------------

I just tried to cross build src:dash in my chroot and got the following
failure:

    [...]
    checking for arm-linux-gnueabihf-gcc... arm-linux-gnueabihf-gcc
    checking whether the C compiler works... no
    configure: error: in `/«PKGBUILDDIR»/build-tmp':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    make: *** [configure-stamp] Error 77
    dpkg-buildpackage: error: debian/rules build gave error exit status 2

The following was in build-tmp/config.log:

    [...]
    configure:3182: checking whether the C compiler works
    configure:3204: arm-linux-gnueabihf-gcc -g -O2 -Wall   conftest.c  >&5
    ../configure: line 3206: arm-linux-gnueabihf-gcc: command not found
    configure:3208: $? = 127
    configure:3246: result: no
    [...]

So we need symbolic links, e.g. /usr/bin/arm-linux-gnueabihf-gcc ->
arm-linux-gnueabihf-gcc-4.7.  Working around this is of course easy, and
I've updated my sbuild setup notes [1] accordingly.

Default Versions of Cross Compilers and Preprocessors
-----------------------------------------------------

Having packages like gcc-arm-linux-gnueabihf and cpp-arm-linux-gnueabihf
would:

  * Allow users to install the default version of a cross tool (as they
    can with native tools with e.g. `apt-get install gcc`) and
  * Allow packages (especially crossbuild-essential-<target>) to depend
    on the default version of a cross tool.

Currently, the crossbuild-essential-<target> packages [2][3] have the
following dependencies (though maybe I should remove the virtual package
version requirements):

    gcc-4.7-<triplet> | c-compiler-<triplet> (>= 4:4.4.3)
    g++-4.7-<triplet> | c++-compiler-<triplet> (>= 4:4.4.3)

It would be nice to be able to make these gcc and g++ dependencies
version-independent and make another package contain the information
about Debian's default versions of these compilers.

[1]: http://bootstrap.pehjota.net/cross/sbuild-setup.txt
[2]: http://bootstrap.pehjota.net/archive/pool/main/c/cross-build-essential/
[3]:
http://bootstrap.pehjota.net/archive/dists/sid/main/binary-i386/Packages

-- 
P. J. McDermott                                        (_/@\_)    ,--.
http://www.pehjota.net/                           o    < o o >   / oo \
http://www.pehjota.net/contact.html                 o   \ `-/    | <> |.
                                                o o o    "~v    /_\--/_/


More information about the Debian-bootstrap mailing list