libgc: FTBFS on arm platforms

Bug #27203 reported by Debian Bug Importer on 2005-12-16
4
Affects Status Importance Assigned to Milestone
libgc (Debian)
Fix Released
Unknown
libgc (Ubuntu)
High
Unassigned

Bug Description

Automatically imported from Debian bug report #343612 http://bugs.debian.org/343612

Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #343612 http://bugs.debian.org/343612

Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Fri, 16 Dec 2005 16:07:18 +0100
From: Lennert Buytenhek <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: libgc: FTBFS on arm platforms

--===============0849979228==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: libgc
Severity: serious
Tags: patch
Justification: no longer builds from source

libgc 6.6 FTBFS on arm platforms using any current gcc/binutils combo,
bailing out with an error of the following type:

 Error: Rn must not overlap other operands -- `swp r3,r5,[r3]'

The ARM 'swp Rd, Rm, [Rn]' instruction performs a 32 bit load-and-store
on the memory address pointed to by Rn -- the old value at [Rn] is stored
in Rd, and Rm is then written to [Rn].

The ARM Architecture Reference Manual specifies that if Rd and Rn are the
same register (or if Rm and Rn are the same register), the result of the
SWP instruction is unpredictable. The assembler rightfully throws an
error when this condition occurs, which is what's happening here.

libgc implements GC_test_and_set using inline assembly, but doesn't specify
the right constraint for 'oldval'. Changing the 'oldval' constraint from
"=r" to "=&r" tells gcc not to use a register for oldval which might also
be used as an input operand, and prevents this error from occuring.

Fix provided by rmk.

-- System Information:
Debian Release: testing/unstable
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: armeb (armv5teb)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-rc1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

--===============0849979228==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="libgc-6.6-arm-swp-fix.diff"

--- libgc-6.6/include/private/gc_locks.h.orig 2005-12-16 14:46:31.000000000 +0100
+++ libgc-6.6/include/private/gc_locks.h 2005-12-16 14:47:20.000000000 +0100
@@ -244,7 +244,7 @@
            * this code will likely need to be updated. */
           /* See linuxthreads/sysdeps/arm/pt-machine.h in glibc-2.1 */
           __asm__ __volatile__("swp %0, %1, [%2]"
- : "=r"(oldval)
+ : "=&r"(oldval)
               : "r"(1), "r"(addr)
         : "memory");
           return oldval;

--===============0849979228==--

# Automatically generated email from bts, devscripts version 2.9.10
tags 343612 upstream pending

Source: libgc
Source-Version: 1:6.6-2

We believe that the bug you reported is fixed in the latest version of
libgc, which is due to be installed in the Debian FTP archive:

libgc-dev_6.6-2_i386.deb
  to pool/main/libg/libgc/libgc-dev_6.6-2_i386.deb
libgc1c2_6.6-2_i386.deb
  to pool/main/libg/libgc/libgc1c2_6.6-2_i386.deb
libgc_6.6-2.diff.gz
  to pool/main/libg/libgc/libgc_6.6-2.diff.gz
libgc_6.6-2.dsc
  to pool/main/libg/libgc/libgc_6.6-2.dsc

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ryan Murray <email address hidden> (supplier of updated libgc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 16 Dec 2005 10:53:15 -0800
Source: libgc
Binary: libgc-dev libgc1c2
Architecture: source i386
Version: 1:6.6-2
Distribution: unstable
Urgency: low
Maintainer: Ryan Murray <email address hidden>
Changed-By: Ryan Murray <email address hidden>
Description:
 libgc-dev - conservative garbage collector for C (development)
 libgc1c2 - conservative garbage collector for C and C++
Closes: 343612
Changes:
 libgc (1:6.6-2) unstable; urgency=low
 .
   * Apply libgc-6.6-arm-swp-fix.diff to fix arm build (closes: #343612)
Files:
 846f1fb597afed19d8feb0020facef4b 553 libs standard libgc_6.6-2.dsc
 f5a9a71332960a8d16806dfd2f50fb38 260410 libs standard libgc_6.6-2.diff.gz
 202ed48b959ac6029e023507b840cc6c 115316 libs standard libgc1c2_6.6-2_i386.deb
 bf23c4bee96d3e6866ff182376af1f13 160068 libdevel optional libgc-dev_6.6-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDow2xN2Dbz/1mRasRAizmAKD7uyKzZXAMA4RbRDMY16Ys2wJ5ggCg3PYj
njG0RbWvdcdIKB2tr2v9F4Y=
=gmWR
-----END PGP SIGNATURE-----

Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Fri, 16 Dec 2005 10:50:53 -0800
From: Ryan Murray <email address hidden>
To: <email address hidden>
Subject: tagging 343612

# Automatically generated email from bts, devscripts version 2.9.10
tags 343612 upstream pending

Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Fri, 16 Dec 2005 11:02:15 -0800
From: Ryan Murray <email address hidden>
To: <email address hidden>
Subject: Bug#343612: fixed in libgc 1:6.6-2

Source: libgc
Source-Version: 1:6.6-2

We believe that the bug you reported is fixed in the latest version of
libgc, which is due to be installed in the Debian FTP archive:

libgc-dev_6.6-2_i386.deb
  to pool/main/libg/libgc/libgc-dev_6.6-2_i386.deb
libgc1c2_6.6-2_i386.deb
  to pool/main/libg/libgc/libgc1c2_6.6-2_i386.deb
libgc_6.6-2.diff.gz
  to pool/main/libg/libgc/libgc_6.6-2.diff.gz
libgc_6.6-2.dsc
  to pool/main/libg/libgc/libgc_6.6-2.dsc

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ryan Murray <email address hidden> (supplier of updated libgc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 16 Dec 2005 10:53:15 -0800
Source: libgc
Binary: libgc-dev libgc1c2
Architecture: source i386
Version: 1:6.6-2
Distribution: unstable
Urgency: low
Maintainer: Ryan Murray <email address hidden>
Changed-By: Ryan Murray <email address hidden>
Description:
 libgc-dev - conservative garbage collector for C (development)
 libgc1c2 - conservative garbage collector for C and C++
Closes: 343612
Changes:
 libgc (1:6.6-2) unstable; urgency=low
 .
   * Apply libgc-6.6-arm-swp-fix.diff to fix arm build (closes: #343612)
Files:
 846f1fb597afed19d8feb0020facef4b 553 libs standard libgc_6.6-2.dsc
 f5a9a71332960a8d16806dfd2f50fb38 260410 libs standard libgc_6.6-2.diff.gz
 202ed48b959ac6029e023507b840cc6c 115316 libs standard libgc1c2_6.6-2_i386.deb
 bf23c4bee96d3e6866ff182376af1f13 160068 libdevel optional libgc-dev_6.6-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDow2xN2Dbz/1mRasRAizmAKD7uyKzZXAMA4RbRDMY16Ys2wJ5ggCg3PYj
njG0RbWvdcdIKB2tr2v9F4Y=
=gmWR
-----END PGP SIGNATURE-----

Dennis Kaarsemaker (dennis) wrote :

-EARCH

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.