Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Including pari and znpoly in the same file
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Roe  
View profile  
 More options Apr 17 2012, 4:56 pm
From: David Roe <roed.m...@gmail.com>
Date: Tue, 17 Apr 2012 16:56:52 -0400
Local: Tues, Apr 17 2012 4:56 pm
Subject: Including pari and znpoly in the same file

I'm working on some p-adic modular symbols code, and am writing a file that
uses zn_poly.  Unfortunately, when I try to compile, I get the following
error from gcc:

$SAGE_ROOT/local/include/zn_poly/zn_poly.h:72: error: redefinition of
typedef 'pari_ulong'
$SAGE_ROOT/local/include/pari/parigen.h:19: error: previous declaration of
'pari_ulong' was here

The relevant lines in those header files are:
zn_poly.h:
typedef unsigned long ulong;

parigen.h:
typedef unsigned long pari_ulong;
#define ulong pari_ulong

I don't even need pari in this file, but it's getting included somehow.
Any ideas for how to fix the conflict, or at least how to figure out where
parigen.h is getting included?  The cython file I'm working on is
accessible at

https://github.com/haikona/OMS/blob/master/sage/modular/overconvergen...
https://github.com/haikona/OMS/blob/master/sage/modular/overconvergen...

Thanks,
David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
François Bissey  
View profile  
 More options Apr 17 2012, 5:25 pm
From: François Bissey <francois.bis...@canterbury.ac.nz>
Date: Wed, 18 Apr 2012 09:25:55 +1200
Local: Tues, Apr 17 2012 5:25 pm
Subject: Re: [sage-devel] Including pari and znpoly in the same file
On Tue, 17 Apr 2012 16:56:52 David Roe wrote:

They are essentially the same type. In sage-on-gentoo we actually did a small
patch to zn_poly because ulong is defined in both flint and zn_poly and it gave
rise to problems. Essentially it boils to this:
-typedef unsigned long  ulong;
+#ifndef ulong
+#define ulong unsigned long
+#endif

That should solve your issue but of course it is a hack if we don't patch
zn_poly as shipped by sage.

Francois


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Roe  
View profile  
 More options Apr 17 2012, 5:30 pm
From: David Roe <roed.m...@gmail.com>
Date: Tue, 17 Apr 2012 17:30:45 -0400
Local: Tues, Apr 17 2012 5:30 pm
Subject: Re: [sage-devel] Including pari and znpoly in the same file

Patching zn_poly in Sage sounds good to me....

Does anyone know if this change has been incorporated into FLINT 2?  It's
not worth spending a lot of time on it if it will be fixed once we upgrade
to FLINT 2.
David

On Tue, Apr 17, 2012 at 17:25, François Bissey <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Hart  
View profile  
 More options Apr 17 2012, 6:44 pm
From: Bill Hart <goodwillh...@googlemail.com>
Date: Tue, 17 Apr 2012 15:44:07 -0700 (PDT)
Local: Tues, Apr 17 2012 6:44 pm
Subject: Re: Including pari and znpoly in the same file
At the present moment flint 2.3 does not use zn_poly.

We may be incorporating some code from zn_poly in flint 2.3 in the
future, but will not need to have a dependence on zn_poly proper.

Bill.

On Apr 17, 10:30 pm, David Roe <roed.m...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
leif  
View profile  
 More options Apr 19 2012, 4:27 pm
From: leif <not.rea...@online.de>
Date: Thu, 19 Apr 2012 13:27:00 -0700 (PDT)
Subject: Re: Including pari and znpoly in the same file
On 17 Apr., 23:30, David Roe <roed.m...@gmail.com> wrote:

> Patching zn_poly in Sage sounds good to me....

I could include such a patch into the zn_poly spkg at

http://trac.sagemath.org/sage_trac/ticket/12433

-leif


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
leif  
View profile  
 More options Apr 19 2012, 4:36 pm
From: leif <not.rea...@online.de>
Date: Thu, 19 Apr 2012 13:36:02 -0700 (PDT)
Local: Thurs, Apr 19 2012 4:36 pm
Subject: Re: Including pari and znpoly in the same file
On 18 Apr., 00:44, Bill Hart <goodwillh...@googlemail.com> wrote:

> At the present moment flint 2.3 does not use zn_poly.

zn_poly's 'configure' has some '--use-flint' option, but we currently
don't use that either.

-leif


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Roe  
View profile  
 More options Apr 19 2012, 4:37 pm
From: David Roe <r...@math.harvard.edu>
Date: Thu, 19 Apr 2012 13:37:06 -0700
Local: Thurs, Apr 19 2012 4:37 pm
Subject: Re: [sage-devel] Re: Including pari and znpoly in the same file

That would be great.
David


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
leif  
View profile  
 More options Apr 20 2012, 11:20 am
From: leif <not.rea...@online.de>
Date: Fri, 20 Apr 2012 08:20:44 -0700 (PDT)
Local: Fri, Apr 20 2012 11:20 am
Subject: Re: Including pari and znpoly in the same file
On 17 Apr., 23:25, François Bissey <francois.bis...@canterbury.ac.nz>
wrote:

> They are essentially the same type. In sage-on-gentoo we actually did a small
> patch to zn_poly because ulong is defined in both flint and zn_poly and it gave
> rise to problems. Essentially it boils to this:
> -typedef unsigned long  ulong;
> +#ifndef ulong
> +#define ulong unsigned long
> +#endif

I changed the typedef in zn_poly.h to

#undef ulong
#define ulong unsigned long

and then also had to fix the order of includes in profiler/profiler.c
since otherwise the build breaks on Solaris; see attached (p8) diff at

http://trac.sagemath.org/sage_trac/ticket/12433  (needs review...)

-leif


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »