Debian Bug report logs - #598615
plt-scheme: FTBFS on mips/mipsel (error: impossible constraint in 'asm')

version graph

Package: plt-scheme; Maintainer for plt-scheme is Ari Pollak <ari@debian.org>; Source for plt-scheme is src:racket.

Reported by: Julien Cristau <jcristau@debian.org>

Date: Thu, 30 Sep 2010 13:27:02 UTC

Severity: serious

Found in version plt-scheme/4.2.1-1

Fixed in versions plt-scheme/4.2.1-1+squeeze1, racket/5.0.2-1

Done: James Vega <jamessan@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-mips@lists.debian.org, Ari Pollak <ari@debian.org>:
Bug#598615; Package plt-scheme. (Thu, 30 Sep 2010 13:27:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Cristau <jcristau@debian.org>:
New Bug report received and forwarded. Copy sent to debian-mips@lists.debian.org, Ari Pollak <ari@debian.org>. (Thu, 30 Sep 2010 13:27:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Julien Cristau <jcristau@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: plt-scheme: FTBFS on mips/mipsel (error: impossible constraint in 'asm')
Date: Thu, 30 Sep 2010 15:22:09 +0200
[Message part 1 (text/plain, inline)]
Package: plt-scheme
Version: 4.2.1-1
Severity: serious

Hi,

plt-scheme FTBFS on mipsen in testing:
> [...]
> gcc -I./.. -I/build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/../include   -Wall     -c /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c -o gmp.o
> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c: In function 'mpn_sb_get_str':
> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c:1858: error: impossible constraint in 'asm'
> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c:1863: error: impossible constraint in 'asm'
> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c:1915: error: impossible constraint in 'asm'
> make[7]: *** [gmp.o] Error 1

See
https://buildd.debian.org/fetch.cgi?pkg=plt-scheme&arch=mips&ver=4.2.1-1%2Bb1&stamp=1285718118&file=log&as=raw
and
https://buildd.debian.org/fetch.cgi?pkg=plt-scheme&arch=mipsel&ver=4.2.1-1%2Bb1&stamp=1285718412&file=log&as=raw

Cc:ing the debian-mips porter list.

Cheers,
Julien
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Ari Pollak <ari@debian.org>:
Bug#598615; Package plt-scheme. (Thu, 30 Sep 2010 16:18:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to James Vega <jamessan@debian.org>:
Extra info received and forwarded to list. Copy sent to Ari Pollak <ari@debian.org>. (Thu, 30 Sep 2010 16:18:07 GMT) Full text and rfc822 format available.

Message #10 received at 598615@bugs.debian.org (full text, mbox):

From: James Vega <jamessan@debian.org>
To: Julien Cristau <jcristau@debian.org>, 598615@bugs.debian.org
Cc: debian-mips@lists.debian.org
Subject: Re: Bug#598615: plt-scheme: FTBFS on mips/mipsel (error: impossible constraint in 'asm')
Date: Thu, 30 Sep 2010 12:15:05 -0400
On Thu, Sep 30, 2010 at 9:22 AM, Julien Cristau <jcristau@debian.org> wrote:
> plt-scheme FTBFS on mipsen in testing:
>> [...]
>> gcc -I./.. -I/build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/../include   -Wall     -c /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c -o gmp.o
>> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c: In function 'mpn_sb_get_str':
>> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c:1858: error: impossible constraint in 'asm'
>> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c:1863: error: impossible constraint in 'asm'
>> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c:1915: error: impossible constraint in 'asm'
>> make[7]: *** [gmp.o] Error 1

These are instances of the umul_ppmm macro being called.  It's defined
in src/mzscheme/src/gmp/gmplonglong.h as follows:

 620 #if defined (__mips) && W_TYPE_SIZE == 32
 621 #if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
 622 #define umul_ppmm(w1, w0, u, v) \
 623   __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
 624 #else
 625 #define umul_ppmm(w1, w0, u, v) \
 626   __asm__ ("multu %2,%3\n\tmflo %0\n\tmfhi %1"                          \
 627            : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
 628 #endif
 629 #define UMUL_TIME 10
 630 #define UDIV_TIME 100
 631 #endif /* __mips */
 632
 633 #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
 634 #if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
 635 #define umul_ppmm(w1, w0, u, v) \
 636   __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
 637 #else
 638 #define umul_ppmm(w1, w0, u, v) \
 639   __asm__ ("dmultu %2,%3\n\tmflo %0\n\tmfhi %1"                         \
 640            : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
 641 #endif
 642 #define UMUL_TIME 20
 643 #define UDIV_TIME 140
 644 #endif /* __mips */

As you can see, for GCC >= 2.7 it's trying to use the l and h
constraints.  The h constraint specifically is not supported[0] as of
GCC 4.4, so it looks like the mfhi command should be used[1] instead.
For older GCC versions, the macro is already defined to use mfhi/mflo
(lines 627-629 and 638-640) so I can only assume they're preferring not
to use that due to it calling more commands.

Is there anything I've missed or mistakes in my analysis?

I'll try to get some time this weekend to test a patch that simply
always uses the mfhi/mflo macros, but I'm a bit busy.  So if someone
else has some spare cycles to test it, I'd appreciate it.

[0]: http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gcc/Machine-Constraints.html#Machine-Constraints
[1]: https://secure.wikimedia.org/wikipedia/en/wiki/MIPS_architecture#Compiler_register_usage
-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan@debian.org>




Information forwarded to debian-bugs-dist@lists.debian.org, Ari Pollak <ari@debian.org>:
Bug#598615; Package plt-scheme. (Mon, 04 Oct 2010 04:51:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to James Vega <jamessan@debian.org>:
Extra info received and forwarded to list. Copy sent to Ari Pollak <ari@debian.org>. (Mon, 04 Oct 2010 04:51:04 GMT) Full text and rfc822 format available.

Message #15 received at 598615@bugs.debian.org (full text, mbox):

From: James Vega <jamessan@debian.org>
To: Julien Cristau <jcristau@debian.org>, 598615@bugs.debian.org
Cc: debian-release@lists.debian.org
Subject: Pre-approval for plt-scheme (Was: Re: Bug#598615: plt-scheme: FTBFS on mips/mipsel (error: impossible constraint in 'asm')
Date: Mon, 4 Oct 2010 00:48:11 -0400
[Message part 1 (text/plain, inline)]
On Thu, Sep 30, 2010 at 12:15:05PM -0400, James Vega wrote:
> On Thu, Sep 30, 2010 at 9:22 AM, Julien Cristau <jcristau@debian.org> wrote:
> > plt-scheme FTBFS on mipsen in testing:
> >> [...]
> >> gcc -I./.. -I/build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/../include   -Wall     -c /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c -o gmp.o
> >> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c: In function 'mpn_sb_get_str':
> >> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c:1858: error: impossible constraint in 'asm'
> >> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c:1863: error: impossible constraint in 'asm'
> >> /build/buildd-plt-scheme_4.2.1-1+b1-mips-JD2ADc/plt-scheme-4.2.1/src/mzscheme/src/gmp/gmp.c:1915: error: impossible constraint in 'asm'
> >> make[7]: *** [gmp.o] Error 1
> 
> These are instances of the umul_ppmm macro being called.  It's defined
> in src/mzscheme/src/gmp/gmplonglong.h as follows:
> 
> [snip]
> 
> I'll try to get some time this weekend to test a patch that simply
> always uses the mfhi/mflo macros, but I'm a bit busy.  So if someone
> else has some spare cycles to test it, I'd appreciate it.

I found a patch from upstream that, with a little massaging to backport
cleanly, fixes the issue.  Would this be acceptable to upload to t-p-u?

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan@debian.org>
[plt-scheme-4.2.1.diff (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Reply sent to James Vega <jamessan@debian.org>:
You have taken responsibility. (Fri, 08 Oct 2010 03:51:10 GMT) Full text and rfc822 format available.

Notification sent to Julien Cristau <jcristau@debian.org>:
Bug acknowledged by developer. (Fri, 08 Oct 2010 03:51:10 GMT) Full text and rfc822 format available.

Message #20 received at 598615-close@bugs.debian.org (full text, mbox):

From: James Vega <jamessan@debian.org>
To: 598615-close@bugs.debian.org
Subject: Bug#598615: fixed in plt-scheme 4.2.1-1+squeeze1
Date: Fri, 08 Oct 2010 03:47:07 +0000
Source: plt-scheme
Source-Version: 4.2.1-1+squeeze1

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

plt-scheme-doc_4.2.1-1+squeeze1_all.deb
  to main/p/plt-scheme/plt-scheme-doc_4.2.1-1+squeeze1_all.deb
plt-scheme_4.2.1-1+squeeze1.diff.gz
  to main/p/plt-scheme/plt-scheme_4.2.1-1+squeeze1.diff.gz
plt-scheme_4.2.1-1+squeeze1.dsc
  to main/p/plt-scheme/plt-scheme_4.2.1-1+squeeze1.dsc
plt-scheme_4.2.1-1+squeeze1_i386.deb
  to main/p/plt-scheme/plt-scheme_4.2.1-1+squeeze1_i386.deb



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 598615@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
James Vega <jamessan@debian.org> (supplier of updated plt-scheme 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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Format: 1.8
Date: Mon, 04 Oct 2010 00:45:31 -0400
Source: plt-scheme
Binary: plt-scheme plt-scheme-doc
Architecture: source all i386
Version: 4.2.1-1+squeeze1
Distribution: testing
Urgency: low
Maintainer: Ari Pollak <ari@debian.org>
Changed-By: James Vega <jamessan@debian.org>
Description: 
 plt-scheme - PLT Scheme Programming Environment
 plt-scheme-doc - PLT Scheme Documentation
Closes: 598615
Changes: 
 plt-scheme (4.2.1-1+squeeze1) testing-proposed-updates; urgency=low
 .
   * Backport patch from upstream to fix mips FTBFS. (Closes: #598615)
     + debian/rules: Pass --enable-cgcdefault to configure to use alternate
       garbage collector on alpha/mips(el).
   * debian/control:
     + Add myself to Uploaders.
     + Point Vcs-* to git.
Checksums-Sha1: 
 306f7a60dcf35cf48b7fc2b1274a20ed22d6ec2e 1449 plt-scheme_4.2.1-1+squeeze1.dsc
 72851abe525c2be77c5836275138fd0a5a4440b3 17114 plt-scheme_4.2.1-1+squeeze1.diff.gz
 86ef7970b415396d0be3814a539842c6745ebf17 8436054 plt-scheme-doc_4.2.1-1+squeeze1_all.deb
 591ccc66835128f34a667291f8d3b39fc1365bc8 34742708 plt-scheme_4.2.1-1+squeeze1_i386.deb
Checksums-Sha256: 
 4f7c92f689484bd41ea87d5027202226e3c68349193e823ee5cf994a8ba09494 1449 plt-scheme_4.2.1-1+squeeze1.dsc
 4d5194a2905a26297f139565f30efac20aed19d19f3246298fed4fd2f2e260b7 17114 plt-scheme_4.2.1-1+squeeze1.diff.gz
 25cbab081d0d87f91d5d338ca98a1d5844100e78327ff702fe1fb744bb03e684 8436054 plt-scheme-doc_4.2.1-1+squeeze1_all.deb
 cb723601ff999ce696fbc365905092a7c4a87a6ce420f1c26a9edb62fbd98844 34742708 plt-scheme_4.2.1-1+squeeze1_i386.deb
Files: 
 be831d3a7198886862e1c562ee031469 1449 lisp optional plt-scheme_4.2.1-1+squeeze1.dsc
 0886630dcde828654b4efd6db83deb88 17114 lisp optional plt-scheme_4.2.1-1+squeeze1.diff.gz
 641b7da012cf9097f48766d17860c949 8436054 doc optional plt-scheme-doc_4.2.1-1+squeeze1_all.deb
 7df4146c646978d3fb7fe12bc0f7aeec 34742708 lisp optional plt-scheme_4.2.1-1+squeeze1_i386.deb

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

iEYEAREDAAYFAkyrvQcACgkQDb3UpmEybUAwUwCdG2kNNHKm/MJ7sJ8SJJ2jvg59
zCsAn1eLsb+sxgmLma6pRK0gIsrq4HLT
=KN17
-----END PGP SIGNATURE-----





Added tag(s) pending. Request was from Anibal Monsalve Salazar <anibal@debian.org> to control@bugs.debian.org. (Sat, 20 Nov 2010 07:06:06 GMT) Full text and rfc822 format available.

Reply sent to James Vega <jamessan@debian.org>:
You have taken responsibility. (Wed, 20 Apr 2011 02:15:07 GMT) Full text and rfc822 format available.

Notification sent to Julien Cristau <jcristau@debian.org>:
Bug acknowledged by developer. (Wed, 20 Apr 2011 02:15:07 GMT) Full text and rfc822 format available.

Message #27 received at 598615-done@bugs.debian.org (full text, mbox):

From: James Vega <jamessan@debian.org>
To: 592688-done@bugs.debian.org, 598615-done@bugs.debian.org, 615765-done@bugs.debian.org, 601525-done@bugs.debian.org
Subject: fixed in racket 5.0.2-1
Date: Tue, 19 Apr 2011 22:13:33 -0400
[Message part 1 (text/plain, inline)]
Source: racket
Source-Version: 5.0.2-1

This bug was closed by the recent upload, but we forgot to add the closes to
the changelog (or use the proper -v flag when building).  Below are the
changelogs for the uploads.

racket (5.1+dfsg1-1) unstable; urgency=low

  * New upstream version, plus DFSG compliance modifications.
    + Thanks to Eli Barzilay of the PLT Scheme team for making a big effort
      of contacting people and updating licensing.
  * Build with HOME=/nonexistant. This prevents collects installed in user
    home directories from interfering with the build.
  * Use parallel=n to control collects build parallelism.

 -- David Bremner <bremner@debian.org>  Thu, 31 Mar 2011 19:34:19 -0300

racket (5.0.2-1) experimental; urgency=low

  [ David Bremner ]
  * New Upsteam version (Closes: #592688)
    + Fix FTBFS on mips with recent GCC. (Closes: #598615)

  [ James Vega ]
  * Update watch file with new upstream URL.
  * debian/rules:
    + Show which garbage collector the racket package was built with.
    + Use correct name for mzdyn based on which garbage collector was used.

 -- James Vega <jamessan@debian.org>  Fri, 19 Nov 2010 21:22:13 -0500

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan@debian.org>
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 18 May 2011 07:34:23 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 14:10:01 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.