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

Bug#644439: Bootstrap stage1 cross-compiler depends on nonexistent libgcc



Source: gcc-4.6
Version: 4.6.1-13
Severity: normal
Tags: patch

When compiling a GCC stage1 cross-compiler, the generated control file
depends on "libgcc" even when one is not built, making it impossible to
install the stage1 compiler to prepare for stage2.

The specific commands I used were:
  $ sudo apt-get build-dep gcc-4.6=4.6.1-13
  $ apt-get source gcc-4.6=4.6.1-13
  $ cd gcc-4.6-4.6.1
  $ DEB_GCC_TARGET=powerpcspe DEB_STAGE=stage1 dpkg-buildpackage -b -us -uc
  [... successful build output ...]
  $ cd ..
  $ sudo dpkg -i cpp-4.6-powerpc-linux-gnuspe_4.6.1-13_amd64.deb
  Selecting previously unselected package cpp-4.6-powerpc-linux-gnuspe.
  (Reading database ... 474927 files and directories currently installed.)
  Unpacking gcc-4.6-powerpc-linux-gnuspe (from gcc-4.6-powerpc-linux-gnuspe_4.6.1-13_amd64.deb) ...
  Setting up cpp-4.6-powerpc-linux-gnuspe (4.6.1-13) ...
  Processing triggers for icecc ...
  $ sudo dpkg -i gcc-4.6-powerpc-linux-gnuspe_4.6.1-13_amd64.deb
  Selecting previously unselected package gcc-4.6-powerpc-linux-gnuspe.
  (Reading database ... 474927 files and directories currently installed.)
  Unpacking gcc-4.6-powerpc-linux-gnuspe (from gcc-4.6-powerpc-linux-gnuspe_4.6.1-13_amd64.deb) ...
  dpkg: dependency problems prevent configuration of gcc-4.6-powerpc-linux-gnuspe:
   gcc-4.6-powerpc-linux-gnuspe depends on libgcc1-powerpcspe-cross (>= 1:4.6.1-13); however:
    Package libgcc1-powerpcspe-cross is not installed.
  dpkg: error processing gcc-4.6-powerpc-linux-gnuspe (--install):
   dependency problems - leaving unconfigured
  Processing triggers for icecc ...
  Errors were encountered while processing:
   gcc-4.6-powerpc-linux-gnuspe

The attached patch disables the libgcc dependency if with_libgcc is
unset (specifically during "stage1").  This seems to resolve the problem
and allow me to continue with building a stage2 cross-compiler.

Cheers,
Kyle Moffett

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (700, 'testing'), (700, 'stable'), (600, 'unstable'), (500, 'stable-updates'), (500, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--- rules.conf.orig	2011-10-05 17:07:10.000000000 -0400
+++ rules.conf	2011-10-05 17:09:19.000000000 -0400
@@ -483,26 +483,28 @@
   DEB_LIBGCC_VERSION := $(DEB_EVERSION)
 endif
 
-LIBGCC_DEP := libgcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
-LIBGCC_BIARCH_DEP := 
-ifeq ($(biarch64),yes)
-  LIBGCC_BIARCH_DEP := lib64gcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
-endif
-ifeq ($(biarch32),yes)
-  LIBGCC_BIARCH_DEP := lib32gcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
-endif
-ifeq ($(biarchn32),yes)
+ifeq ($(with_libgcc),yes)
+  LIBGCC_DEP := libgcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
+  LIBGCC_BIARCH_DEP := 
   ifeq ($(biarch64),yes)
-    LIBGCC_BIARCH_DEP := lib64gcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION)), libn32gcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
-  else
-    LIBGCC_BIARCH_DEP := libn32gcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
+    LIBGCC_BIARCH_DEP := lib64gcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
+  endif
+  ifeq ($(biarch32),yes)
+    LIBGCC_BIARCH_DEP := lib32gcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
+  endif
+  ifeq ($(biarchn32),yes)
+    ifeq ($(biarch64),yes)
+      LIBGCC_BIARCH_DEP := lib64gcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION)), libn32gcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
+    else
+      LIBGCC_BIARCH_DEP := libn32gcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
+    endif
+  endif
+  ifeq ($(biarchhf),yes)
+    LIBGCC_BIARCH_DEP := libhfgcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
+  endif
+  ifeq ($(biarchsf),yes)
+    LIBGCC_BIARCH_DEP := libsfgcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
   endif
-endif
-ifeq ($(biarchhf),yes)
-  LIBGCC_BIARCH_DEP := libhfgcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
-endif
-ifeq ($(biarchsf),yes)
-  LIBGCC_BIARCH_DEP := libsfgcc$(GCC_SONAME)$(LS) (>= $(DEB_LIBGCC_VERSION))
 endif
 
 GNAT_VERSION := $(BASE_VERSION)

Reply to: