Re: Bug#49: Problem with installing PARI with Suse Linux 9.1.: invalid operands for a div operation

View: New views
3 Messages — Rating Filter:   Alert me  

Re: Bug#49: Problem with installing PARI with Suse Linux 9.1.: invalid operands for a div operation

by Ilya Zakharevich :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 23 May 2006 at 13:55:44 +0200, Bill Allombert wrote:
>> On Wed, Nov 16, 2005 at 10:50:42PM +0100, Bill Allombert wrote:

>> Hello, we finally identified this bug as an instance of the bug
>> 2.2.3-F45 fixed in the development branch, and we fixed it in PARI
>> 2.1.8/CVS:
>>
>> BA  1- ix86 inline assembler compilation problem [divll] [2.2.3 F45]
>>
>> So this bug will be fixed in the next stable release.

> Since the new stable version 2.3.0 has been released and fix this
> problem, I am closing this bug report.

Do you still have this patch available?  Math::Pari is still plagued
by this problem (since it may use older PARI distributions...).

Thanks,
Ilya


Re: Bug#49: Problem with installing PARI with Suse Linux 9.1.: invalid operands for a div operation

by Bill Allombert-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 27, 2009 at 04:43:47PM -0700, Ilya Zakharevich wrote:

> On Tue, 23 May 2006 at 13:55:44 +0200, Bill Allombert wrote:
> >> On Wed, Nov 16, 2005 at 10:50:42PM +0100, Bill Allombert wrote:
>
> >> Hello, we finally identified this bug as an instance of the bug
> >> 2.2.3-F45 fixed in the development branch, and we fixed it in PARI
> >> 2.1.8/CVS:
> >>
> >> BA  1- ix86 inline assembler compilation problem [divll] [2.2.3 F45]
> >>
> >> So this bug will be fixed in the next stable release.
>
> > Since the new stable version 2.3.0 has been released and fix this
> > problem, I am closing this bug report.
>
> Do you still have this patch available?  Math::Pari is still plagued
> by this problem (since it may use older PARI distributions...).

I see: this was part of PARI 2.1.8 which had not been released.
This is still available in the branch 'release-2-1-patches'
of the SVN repository as change 7304 which you can retrieve by

svn diff -c 7304 svn://pari.math.u-bordeaux.fr/pari/branches/release-2-1-patches/

which give

Index: src/kernel/ix86/level0.h
===================================================================
--- src/kernel/ix86/level0.h (révision 7303)
+++ src/kernel/ix86/level0.h (révision 7304)
@@ -173,7 +173,7 @@
 ({ ulong __value, __arg1 = (a), __arg2 = (b); \
    __asm__ ("divl %4" \
         : "=a" /* %eax */ (__value), "=d" /* %edx */ (hiremainder) \
-        : "0" /* %eax */ (__arg1), "1" /* %edx */ (hiremainder), "g" (__arg2)); \
+        : "0" /* %eax */ (__arg1), "1" /* %edx */ (hiremainder), "mr" (__arg2)); \
    __value; \
 })

Cheers,
Bill.

Parent Message unknown Re: Bug#49: - and more Math::Pari problems

by Bill Allombert-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Nov 05, 2009 at 05:09:49PM -0800, Ilya Zakharevich wrote:
> On Wed, Oct 28, 2009 at 11:17:50PM +0100, Bill Allombert wrote:
> BTW, two recurring problems I see reported during automated testing are
>
> =======================================================
>   asm-specifier for variable `hiremainder' conflicts with asm clobber list
>
> on gcc 3.4.6 sun4u sparc SUNW,Sun-Fire-V490
>
> Was it ever fixed?  (I expect it is not Math::Pari specific).

Maybe not, but it is hard to say. Could you send the patch to the list ?

> =======================================================
>   /export/home/bob/cpantesting/perl-5.8.9/.cpan/build/Math-Pari-2.010803-6AyWtB/blib/arch/auto/Math/Pari/Pari.so:
>   symbol overflow: referenced symbol not found at
>   /export/home/bob/cpantesting/perl-5.8.9/lib/5.8.9/i86pc-solaris/DynaLoader.pm
>   line 226.
>
> This one I'm not so sure: it might be busted Math::Pari build logic...
>
> The configuration is
>
> #     DEFINE => q[ -Derr=pari_err -DSOLARIS -DDYNAMIC_PLOTTING]
> #     INC => q[ -I ../pari-2.1.7/src -I$(PARI_DIR)/src/headers -I$(PARI_DIR)/src/graph -I.]
> #     LIBS => q[-lm]
> #     macro => { ASSCPPDEFINE=>q[], ASSDEFINE=>q[$(DEFINE)], ASFLAGS=>q[], ASSCMD=>q[$(CCCMD) $(CCCDLFLAGS)], PARI_DIR=>q[../pari-2.1.7]
>
> The important part is, I think, ASSCMD = $(CCCMD) $(CCCDLFLAGS) (which
> uses -KPIC).  So the dynamic linking should be kinda OK, right?
>
> =======================================================

The symbol overflow is special, especially on sparc.
overflow can be either:
1) a local variable (through the LOCAL_OVERFLOW macro)
2) a register (%g6 on sparc)
3) a global symbol
However, option 1) only works with gcc so we also provide overflow as a global
symbol in that case. PARI 2.1. is known to have some issue with this process in
corner cases (like sparc).  PARI 2.1 is very old and completly unsupported.
PARI 2.3 fix that issue.

Cheers,
Bill.