#10252: ecm does not compile on some 32-bit Linux systems
------------------------+---------------------------------------------------
   Reporter:  jdemeyer  |       Owner:  tbd                                     
    
       Type:  defect    |      Status:  needs_review                            
    
   Priority:  major     |   Milestone:  sage-4.6.1                              
    
  Component:  packages  |    Keywords:  ecm spkg-install                        
    
     Author:            |    Upstream:  Fixed upstream, but not in a stable 
release.
   Reviewer:            |      Merged:                                          
    
Work_issues:            |  
------------------------+---------------------------------------------------
Changes (by leif):

  * status:  needs_work => needs_review
  * upstream:  N/A => Fixed upstream, but not in a stable release.


Old description:

> On the Skynet machine cicero and on a 32-bit Gentoo Linux Pentium D
> machine of my own, the ecm package from #5847 does not install in Sage.
>
> The problem is with Sage's {{{spkg-install}}} as the pure upstream
> sources in {{{src/}}} work fine.
>
> The following works:
> {{{
> $ ./configure
> $ make
> }}}
>
> The following (emulating {{{spkg-install}}}) does NOT work:
> {{{
> $ export CFLAGS="-g -O3 -fPIC"
> $ ./configure
> $ make
> }}}
>
> It fails with the error
> {{{
> spv.c: In function 'spv_pwmul':
> spv.c:157: error: unknown register name '%xmm7' in 'asm'
> spv.c:157: error: unknown register name '%xmm6' in 'asm'
> spv.c:157: error: unknown register name '%xmm5' in 'asm'
> spv.c:157: error: unknown register name '%xmm3' in 'asm'
> spv.c:157: error: unknown register name '%xmm2' in 'asm'
> spv.c:157: error: unknown register name '%xmm1' in 'asm'
> spv.c:157: error: unknown register name '%xmm0' in 'asm'
> }}}
>
> It doesn't actually matter what CFLAGS is set to, it fails even with
> {{{
> $ export CFLAGS=" "
> }}}
>
> This is probably because Sage's CFLAGS overrides ecm's CFLAGS.  I think
> the easiest solution is simply not set any CFLAGS in ecm's {{{spkg-
> install}}}.  Since ecm really wants to optimize for a particular machine,
> I think the fact that ecm's CFLAGS are not used has also bad consequences
> for speed.

New description:

 On the Skynet machine cicero and on a 32-bit Gentoo Linux Pentium D
 machine of my own, the ecm package from #5847 does not install in Sage.

 The problem is with Sage's {{{spkg-install}}} as the pure upstream sources
 in {{{src/}}} work fine.

 The following works:
 {{{
 $ ./configure
 $ make
 }}}

 The following (emulating {{{spkg-install}}}) does NOT work:
 {{{
 $ export CFLAGS="-g -O3 -fPIC"
 $ ./configure
 $ make
 }}}

 It fails with the error
 {{{
 spv.c: In function 'spv_pwmul':
 spv.c:157: error: unknown register name '%xmm7' in 'asm'
 spv.c:157: error: unknown register name '%xmm6' in 'asm'
 spv.c:157: error: unknown register name '%xmm5' in 'asm'
 spv.c:157: error: unknown register name '%xmm3' in 'asm'
 spv.c:157: error: unknown register name '%xmm2' in 'asm'
 spv.c:157: error: unknown register name '%xmm1' in 'asm'
 spv.c:157: error: unknown register name '%xmm0' in 'asm'
 }}}

 It doesn't actually matter what CFLAGS is set to, it fails even with
 {{{
 $ export CFLAGS=" "
 }}}

 This is probably because Sage's CFLAGS overrides ecm's CFLAGS.  I think
 the easiest solution is simply not set any CFLAGS in ecm's {{{spkg-
 install}}}.  Since ecm really wants to optimize for a particular machine,
 I think the fact that ecm's CFLAGS are not used has also bad consequences
 for speed.

 ----

 Actually an upstream bug... (And not setting `CFLAGS` or `CC` is not an
 option. There are different ways to let the compiler produce processor-
 specific optimized code. Note that this anyway doesn't affect optimized
 assembly code, which ECM also comes with.)

 '''New spkg (ecm-6.3.p2) fixing this''' (including the upstream patch)
 '''at #5847.'''

--

Comment:

 Replying to [comment:15 leif]:
 > Just for the record: I'll upload a new spkg that also fixes this issue
 at #5847 (hopefully) soon...

 Did so...

 Setting this ticket to "needs review" too, can be closed as duplicate when
 #5847 gets a positive review / merged.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10252#comment:22>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to