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

Bug#678623: libstdc++6-4.7-dev: Please make libstdc++6-4.7-dev m-a: same



On Sat, Jun 23, 2012 at 08:58:11PM +0200, Thibaut Girka wrote:
> On Sat, Jun 23, 2012 at 01:18:16PM +0200, Matthias Klose wrote:
[snip] 
> > > The attached patch should fix that, by dropping the g++-4.7 dependency and
> > > marking libstdc++6-4.7-dev m-a: same.
> > 
> > this won't help yet. you still cannot install the .o files, static libgcc.a and
> > c includes without installing the native compiler.
> 
> Hm, right, but then, libstdc++6-4.7-dev should depend on gcc-4.7, not g++-4.7.
> This wouldn't help for multiarch, though.
> I'm not sure what the right thing should be...

Actually, I disagree. You don't need the C native compiler, nor the C++ C compiler.
You need a compiler for the target, regardless of whether it being a native or a
cross-compiler (see the attached log file as an example).

IMHO, libstdc++6-4.7-dev shouldn't strictly depend on g++-4.7 anyway.
In fact, libstdc++6-4.7-dev doesn't need g++ at all to be useful (ex: clang++).
However, it might need some object files provided by gcc itself, which might
be a problem for some packages relying on this (although gcc being build-essential
anyway, I don't think that is that much of a problem).
(sid-test)root@spike:~# dpkg -l | grep gcc
ii  gcc-4.7-base:i386                4.7.1-2               i386         GCC, the GNU Compiler Collection (base package)
ii  libgcc1:i386                     1:4.7.1-2             i386         GCC support library
(sid-test)root@spike:~# dpkg -l | grep libstdc++
ii  libstdc++6:i386                  4.7.1-2               i386         GNU Standard C++ Library v3
(sid-test)root@spike:~# dpkg -I ~thib/GSoC-2012/gcc/libstdc++6-4.7-dev_4.7.1-2_armhf.deb | grep Depends
 Depends: gcc-4.7-base (= 4.7.1-2), libstdc++6 (>= 4.7.1-2), libc6-dev:armhf (>= 2.13-5)
(sid-test)root@spike:~# apt-cache show libstdc++6 | grep Multi
Multi-Arch: same
(sid-test)root@spike:~# apt-get install --no-install-recommends gcc-4.7-base:armhf libstdc++6:armhf libc6-dev:armhf
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libc-dev-bin libc6:armhf libgcc1:armhf linux-libc-dev:armhf
Suggested packages:
  glibc-doc:armhf locales:armhf manpages-dev:armhf
Recommended packages:
  manpages-dev gcc:armhf c-compiler:armhf
The following NEW packages will be installed:
  gcc-4.7-base:armhf libc-dev-bin libc6:armhf libc6-dev:armhf libgcc1:armhf libstdc++6:armhf linux-libc-dev:armhf
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/7821 kB of archives.
After this operation, 20.6 MB of additional disk space will be used.
Do you want to continue [Y/n]?
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package gcc-4.7-base:armhf.
(Reading database ... 11771 files and directories currently installed.)
Unpacking gcc-4.7-base:armhf (from .../gcc-4.7-base_4.7.1-2_armhf.deb) ...
Selecting previously unselected package libgcc1:armhf.
Unpacking libgcc1:armhf (from .../libgcc1_1%3a4.7.1-2_armhf.deb) ...
Selecting previously unselected package libc6:armhf.
Unpacking libc6:armhf (from .../libc6_2.13-34_armhf.deb) ...
Selecting previously unselected package libstdc++6:armhf.
Unpacking libstdc++6:armhf (from .../libstdc++6_4.7.1-2_armhf.deb) ...
Selecting previously unselected package libc-dev-bin.
Unpacking libc-dev-bin (from .../libc-dev-bin_2.13-34_i386.deb) ...
Selecting previously unselected package linux-libc-dev:armhf.
Unpacking linux-libc-dev:armhf (from .../linux-libc-dev_3.2.21-3_armhf.deb) ...
Selecting previously unselected package libc6-dev:armhf.
Unpacking libc6-dev:armhf (from .../libc6-dev_2.13-34_armhf.deb) ...
Setting up gcc-4.7-base:armhf (4.7.1-2) ...
Setting up libc-dev-bin (2.13-34) ...
Setting up linux-libc-dev:armhf (3.2.21-3) ...
Setting up libc6:armhf (2.13-34) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Setting up libc6-dev:armhf (2.13-34) ...
Setting up libgcc1:armhf (1:4.7.1-2) ...
Setting up libstdc++6:armhf (4.7.1-2) ...
(sid-test)root@spike:~# dpkg -i ~thib/GSoC-2012/gcc/libstdc++6-4.7-dev_4.7.1-2_armhf.deb
Selecting previously unselected package libstdc++6-4.7-dev:armhf.
(Reading database ... 13222 files and directories currently installed.)
Unpacking libstdc++6-4.7-dev:armhf (from .../libstdc++6-4.7-dev_4.7.1-2_armhf.deb) ...
Setting up libstdc++6-4.7-dev:armhf (4.7.1-2) ...
(sid-test)root@spike:~# apt-get install --no-install-recommends g++-4.7-arm-linux-gnueabihf
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  binutils binutils-arm-linux-gnueabihf cpp-4.7-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf-base
  libgomp1:armhf libmpc2
Suggested packages:
  binutils-doc gcc-4.7-locales gcc-4.7-doc libstdc++6-4.7-dbg:armhf libmudflap0-4.7-dev:armhf libgcc1-dbg:armhf libgomp1-dbg:armhf
  libitm1-dbg:armhf libquadmath-dbg:armhf libmudflap0-dbg:armhf binutils-gold
The following NEW packages will be installed:
  binutils binutils-arm-linux-gnueabihf cpp-4.7-arm-linux-gnueabihf g++-4.7-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf
  gcc-4.7-arm-linux-gnueabihf-base libgomp1:armhf libmpc2
0 upgraded, 8 newly installed, 0 to remove and 1 not upgraded.
Need to get 28.4 MB/28.5 MB of archives.
After this operation, 73.4 MB of additional disk space will be used.
Do you want to continue [Y/n]?
WARNING: The following packages cannot be authenticated!
  binutils-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf-base cpp-4.7-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf
  g++-4.7-arm-linux-gnueabihf
Install these packages without verification [y/N]? y
Get:1 http://emdebian.org/~thibg/repo/ sid/main binutils-arm-linux-gnueabihf i386 2.22-6.1 [7769 kB]
Get:2 http://ftp.fr.debian.org/debian/ unstable/main libmpc2 i386 0.9-4 [41.3 kB]
Get:3 http://ftp.fr.debian.org/debian/ unstable/main binutils i386 2.22-6.1 [4566 kB]
Get:4 http://emdebian.org/~thibg/repo/ sid/main gcc-4.7-arm-linux-gnueabihf-base i386 4.7.1-2 [141 kB]
Get:5 http://emdebian.org/~thibg/repo/ sid/main cpp-4.7-arm-linux-gnueabihf i386 4.7.1-2 [4973 kB]
Get:6 http://emdebian.org/~thibg/repo/ sid/main gcc-4.7-arm-linux-gnueabihf i386 4.7.1-2 [5527 kB]
Get:7 http://emdebian.org/~thibg/repo/ sid/main g++-4.7-arm-linux-gnueabihf i386 4.7.1-2 [5409 kB]
Fetched 28.4 MB in 40s (698 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libgomp1:armhf.
(Reading database ... 13931 files and directories currently installed.)
Unpacking libgomp1:armhf (from .../libgomp1_4.7.1-2_armhf.deb) ...
Selecting previously unselected package libmpc2:i386.
Unpacking libmpc2:i386 (from .../libmpc2_0.9-4_i386.deb) ...
Selecting previously unselected package binutils.
Unpacking binutils (from .../binutils_2.22-6.1_i386.deb) ...
Selecting previously unselected package binutils-arm-linux-gnueabihf.
Unpacking binutils-arm-linux-gnueabihf (from .../binutils-arm-linux-gnueabihf_2.22-6.1_i386.deb) ...
Selecting previously unselected package gcc-4.7-arm-linux-gnueabihf-base.
Unpacking gcc-4.7-arm-linux-gnueabihf-base (from .../gcc-4.7-arm-linux-gnueabihf-base_4.7.1-2_i386.deb) ...
Selecting previously unselected package cpp-4.7-arm-linux-gnueabihf.
Unpacking cpp-4.7-arm-linux-gnueabihf (from .../cpp-4.7-arm-linux-gnueabihf_4.7.1-2_i386.deb) ...
Selecting previously unselected package gcc-4.7-arm-linux-gnueabihf.
Unpacking gcc-4.7-arm-linux-gnueabihf (from .../gcc-4.7-arm-linux-gnueabihf_4.7.1-2_i386.deb) ...
Selecting previously unselected package g++-4.7-arm-linux-gnueabihf.
Unpacking g++-4.7-arm-linux-gnueabihf (from .../g++-4.7-arm-linux-gnueabihf_4.7.1-2_i386.deb) ...
Setting up libgomp1:armhf (4.7.1-2) ...
Setting up libmpc2:i386 (0.9-4) ...
Setting up binutils (2.22-6.1) ...
Setting up binutils-arm-linux-gnueabihf (2.22-6.1) ...
Setting up gcc-4.7-arm-linux-gnueabihf-base (4.7.1-2) ...
Setting up cpp-4.7-arm-linux-gnueabihf (4.7.1-2) ...
Setting up gcc-4.7-arm-linux-gnueabihf (4.7.1-2) ...
Setting up g++-4.7-arm-linux-gnueabihf (4.7.1-2) ...
(sid-test)root@spike:~# cat > test.cpp
#include <iostream>
#include <cmath>
int main(void) {
    std::cout << "Hello world! " << sqrt(25) << std::endl;
    return 0;
}
(sid-test)root@spike:~# arm-linux-gnueabihf-g++-4.7 test.cpp
(sid-test)root@spike:~# arm-linux-gnueabihf-g++-4.7 --static test.cpp

On another i386 system, without libstdc++6:armhf:
thib@spike:~$ qemu-arm ~/a.out
Hello world! 5

Attachment: signature.asc
Description: Digital signature


Reply to: