[sage-devel] Re: Finite dimensional algebra generated by matrices

2022-06-12 Thread 'Travis Scrimshaw' via sage-devel
Yes, you have. To better integrate it into Sage, I would expand the 
existing functionality of FiniteDimensionalAlgebra (and ideally it would do 
the basis and multiplication table lazily) . This class would likely need 
some additional work to get it to do what you eventually want, but it would 
make for a good project. Note that FiniteDimensionalAlgebra already has a 
class for ideals.

Sage, in principle, should also be able to construct any subalgebra of a 
finite-dimensional algebra given by generators using some of its generic 
code (i.e., not just from a subalgebra of all matrices) through a simple 
modification of your code. (In practice, I think the matrices are 
essentially compatible up to dealing with issues of mutability. I don't 
know how much this has been tested though...)

Some general coding advice: Python is an object-oriented programming 
language. This means you can organize your code into logical groupings 
called "classes" that give additional information about what the data 
represents. So rather than having a bunch of unrelated functions, they can 
become more tied together (of course, when this appropriate). It is wise to 
take advantage of this.

Best,
Travis

On Sunday, June 12, 2022 at 12:30:27 PM UTC+9 Yingdong Li wrote:

> Dear Travis,
>
> I think my code already has the function you mentioned(the function named 
> "basis_of_algebra" is used to build a basis, and we can plug it in the 
> "ideal" function to get the ideal we want, see line 53-139). I'm not sure 
> whether I misunderstood your advice. Anyway, thanks for your advice and 
> welcome to point out more  problem about my code(we can still discuss it 
> here)!
>
> Best wishes,
> Li Yingdong
>
> 在2022年6月10日星期五 UTC+8 08:38:41 写道:
>
>> One thing you could consider doing is adding an option for the input of 
>> the finite dimensional algebra code to take the generators as input and 
>> then use that to generate a basis and feed that back into the finite 
>> dimensional algebra. I am sure I have written code to compute a basis from 
>> a generating set in at least one form somewhere in Sage. It seems like this 
>> code needs to be factored out to be used for purposes like this.
>>
>> Best,
>> Travis
>>
>>
>> On Thursday, May 26, 2022 at 4:12:41 PM UTC+9 Yingdong Li wrote:
>>
>>> Dear all,
>>>
>>> I have put my code in GitHub(with some explanation of it) so that you 
>>> can clearly see it. 
>>>
>>> Here's a link of my code in GitHub(see the code called "Finite generated 
>>> algebra as a ring")
>>> Dongulas/Dongulas: Config files for my GitHub profile. 
>>> 
>>>
>>> Best wishes,
>>> Li Yingdong
>>>
>>> 在2022年5月17日星期二 UTC+8 21:37:06 写道:
>>>
 Dear Travis,

 Thanks for your advice! The finite dimensional algebra code in Sage 
 need a multiplication table, so the second part of our code is used to 
 find 
 the multiplication table with the basis of the algebra. And the first part 
 of our code is used to find the basis with the generators of the 
 algebra(along with a ideal of the polynomial ring). Our aim is to find the 
 ring structure of the algebra generated by a list of commuting matrices.

 Best wishes,
 Li Yingdong

 在2022年5月15日星期日 UTC+8 11:16:24 写道:

> I would advise against having it as an external package if you plan to 
> integrate it into Sage. It further fragments the code and makes it more 
> likely to bitrot from what I have seen. I would instead create a ticket 
> and 
> upload the code to that.
>
> Is this a finite dimensional commutative algebra? We already have 
> finite dimensional algebras (with no assumptions, e.g., associativity) in 
> Sage. How does your code compare with this code? Could they be combined?
>
> Best,
> Travis
>
>
> On Thursday, May 12, 2022 at 9:55:55 PM UTC+9 davida...@gmail.com 
> wrote:
>
>> Hello,
>>
>> Most of the SageMath developpment is explained in this guide:
>>
>>   https://doc.sagemath.org/html/en/developer/index.html
>>
>> Also, I don't know exactly what is the scale of your code, but I 
>> would advise you to first upload your code to Github (if it isn't 
>> already 
>> done) as an external package. Github is very convenient for sharing 
>> code, 
>> so it would be easier to share it with the community. Next, I think to 
>> contribute to SageMath it is better to start with small contribution. 
>> For 
>> example, review some tickets or fix some bugs. Then, it becomes easier 
>> to 
>> contribute to bigger projects. 
>>
>> Anyway, welcome to the community and good job on your research 
>> project!
>>
>> David Ayotte
>>
>> Le jeudi 12 mai 2022 à 05:45:53 UTC-4, Yingdong Li a écrit :
>>
>>> Dear all,
>>>
>>> I have written some codes in Sage to compute the finite-dimensional 
>>> 

Re: [sage-devel] Developing in Sage for high school math education

2022-06-12 Thread Tanmay Kulkarni
Hello TB,

Thank you so much for the detailed response - these links are really 
helpful!
I had a few follow-up questions:

   - If I do stumble onto documentation that lacks usage examples, how 
   would I go about adding examples?
   - Is it possible to write more thematic tutorials for Sage or would that 
   have to be on my own site? I think my ideas for this would best be 
   explained through tutorials with embedded Sage computations that (a) 
   explain concepts and guide students to discovering things like the 
   inclusion-exclusion principle and (b) teach the fundamentals of Sage (and 
   Python too).
   - Are there any avenues where Sage education is explored and used beyond 
   the Sage Education Days?
   
Thank you!

Sincerely,
Tanmay

On Sunday, June 12, 2022 at 9:26:26 AM UTC-7 mathzeta2 wrote:

> Hello Tanmay,
>
> On 11/06/2022 6:16, Tanmay Kulkarni wrote:
>
> Hello all,
>
> My name is Tanmay Kulkarni and I am a rising sophomore. I have also been 
> taking several extracurricular math classes with Squares & Cubes 
>  on things like number theory, group 
> theory, discrete math, and linear algebra. In these classes we have 
> utilized Sage to explore mathematical patterns. For instance, in my 
> discrete math class, I used Sage's graph functionality to take a stab at 
> graph isomorphism, which eventually lead to a magazine article 
>  on 
> using random walks on graphs to solve graph isomorphism.
>
> Very nice!
>
>
> During these various explorations, I realized that Sage was a very 
> powerful tool to explain and provide intuition for complex mathematical 
> concepts, however, (a) it is mainly used by those working in higher math, 
> and (b) there is a high barrier of entry to implement concepts (even ones 
> in lower math) in Sage.
>
> I completely agree that Sage is a very powerful tool. Gathering intuition 
> for complex mathematical concepts in many cases includes some 
> visualization. For example, If someone never heard of Young's lattice, or 
> even what is a lattice, looking at the plot in this thematic tutorial [1] 
> can be a big step in understanding (at least in an intuitive manner) what 
> is this object. In this case, the 6 lines of Sage code that produced the 
> plot are included, so further exploration becomes easier.
>
>
> Thus, I wanted to contribute to Sage and *implement specific concepts 
> which I felt high school students like myself would find interesting*, 
> and use them for educational purposes (e.g. at my school). Two basic ideas 
> I thought of were:
>
>1. *Random walks.* I think mathematics is often far more engaging with 
>a visual component (for instance, teaching graphing skills and different 
>types of equations through a Desmos art project), and I think when talking 
>about probabilities and randomness, an excellent visual representation of 
>stochastic processes is random walks, which are currently not implemented 
>in Sage. The other advantage of this is that random walks are often 
> present 
>in other places such as physics (in Brownian motion). This could expand 
>into 
>2. *Venn diagrams.* Venn diagrams are incredibly important; however, I 
>could not find any Sage implementations of Venn diagrams beyond simply 
>plotting intersecting circles. Having a more solid implementation could 
>provide a strong, visual intution for a variety of concepts, like basic 
> set 
>theory, logical operators, probability, and even open the door for 
>Edwards-Venn diagrams! Such an implementation would utilize Sage's 2D 
>graphics (specifically the circle and text functions) as well as the 
>detailed Set implementation. 
>
> Apart from static visualizations one can find at various docs, there is a 
> page at the wiki dedicated for examples of Sage Interactions [2]. In 
> particular, the "miscellaneous" page [3] includes two simple Venn diagram 
> interactive cells, which might be what you already found. The interactions 
> at these pages can be a good example of what is possible, but I will warn 
> that some of them are quite old, and so they are not always implemented 
> with modern best practice (e.g. deprecated functions). On a side note, here 
> is a link to a beautiful interactive 7 sets Venn diagram [4] by Santiago 
> Ortiz, inspired by Newton's theories on light and color spectrum.
>
>
> At Brent Yorgey's blog there are (at least) two posts without words [5][6] 
> that try to illustrate the inclusion-exclusion principle with Venn 
> diagrams. I think the plots there were created using the diagrams [7] 
> package in Haskell. I wonder if there is a similar Python package for 
> vector graphics, as Sage usually uses matplotlib or TikZ which are 
> sometimes harder to use.
>
>
> Several people who I contacted referred me to this group, and thus I am 
> wondering if anybody would be generous enough to 

Re: [sage-devel] Developing in Sage for high school math education

2022-06-12 Thread TB

  
  
Hello Tanmay,


On 11/06/2022 6:16, Tanmay Kulkarni
  wrote:


  
  Hello all,
  
  My name is Tanmay Kulkarni and I am a rising sophomore. I have
  also been taking several extracurricular math classes with Squares
& Cubes on things like number theory, group theory,
  discrete math, and linear algebra. In these classes we have
  utilized Sage to explore mathematical patterns. For instance, in
  my discrete math class, I used Sage's graph functionality to take
  a stab at graph isomorphism, which eventually lead to a magazine article on using random
  walks on graphs to solve graph isomorphism.

Very nice!

  During these various explorations, I realized that Sage was a very
  powerful tool to explain and provide intuition for complex
  mathematical concepts, however, (a) it is mainly used by those
  working in higher math, and (b) there is a high barrier of entry
  to implement concepts (even ones in lower math) in Sage.

I completely agree that Sage is a very powerful tool. Gathering
intuition for complex mathematical concepts in many cases includes
some visualization. For example, If someone never heard of Young's
lattice, or even what is a lattice, looking at the plot in this
thematic tutorial [1] can be a big step in understanding (at least
in an intuitive manner) what is this object. In this case, the 6
lines of Sage code that produced the plot are included, so further
exploration becomes easier.

  Thus, I wanted to contribute to Sage and implement specific
concepts which I felt high school students like myself would
find interesting, and use them for educational purposes
  (e.g. at my school). Two basic ideas I thought of were:
  
Random walks. I think mathematics is often far more
  engaging with a visual component (for instance, teaching
  graphing skills and different types of equations through a
  Desmos art project), and I think when talking about
  probabilities and randomness, an excellent visual
  representation of stochastic processes is random walks, which
  are currently not implemented in Sage. The other advantage of
  this is that random walks are often present in other places
  such as physics (in Brownian motion). This could expand into 
Venn diagrams. Venn diagrams are incredibly
  important; however, I could not find any Sage implementations
  of Venn diagrams beyond simply plotting intersecting circles.
  Having a more solid implementation could provide a strong,
  visual intution for a variety of concepts, like basic set
  theory, logical operators, probability, and even open the door
  for Edwards-Venn diagrams! Such an implementation would
  utilize Sage's 2D graphics (specifically the circle and text
  functions) as well as the detailed Set implementation.
  

Apart from static visualizations one can find at various docs,
  there is a page at the wiki dedicated for examples of Sage
  Interactions [2]. In particular, the "miscellaneous" page [3]
  includes two simple Venn diagram interactive cells, which might be
  what you already found. The interactions at these pages can be a
  good example of what is possible, but I will warn that some of
  them are quite old, and so they are not always implemented with
  modern best practice (e.g. deprecated functions). On a side note,
  here is a link to a beautiful interactive 7 sets Venn diagram [4]
  by Santiago Ortiz, inspired by Newton's theories on light and
  color spectrum.


At Brent Yorgey's blog there are (at least) two posts without
  words [5][6] that try to illustrate the inclusion-exclusion
  principle with Venn diagrams. I think the plots there were created
  using the diagrams [7] package in Haskell. I wonder if there is a
  similar Python package for vector graphics, as Sage usually uses
  matplotlib or TikZ which are sometimes harder to use.


  Several people who I contacted referred me to this group, and thus
  I am wondering if anybody would be generous enough to (a) provide
  thoughts on the feasibility and usefulness of such an
  endeavor, (b) provide some direction or guidance as to
  where to begin, and (c) offer any potential avenues where
  this could be used.
  
  Until then, I will be beginning to work on any very simple bug fix
  I can find to familiarize myself with developing in Sage.

It is always good to hear about people interested in Sage
  development. The Sage documentation [8] contains a lot: The
  reference manual alone will be thousands of pages long if printed!
  If you find a function or object you are familiar with that is
 

[sage-devel] Re: Vector power operator not implemented

2022-06-12 Thread Nils Bruin
On Saturday, 11 June 2022 at 11:09:45 UTC-7 erent...@gmail.com wrote:

> sage -c "vector([1,2,3])^2" returns with a NotImplementedError, when in 
> other mathematics software, the same expression will operate element-wise. 
>
> python: 
> >>> import numpy; numpy.array([1,2,3])**2 
> array([1, 4, 9]) 
>
> This perhaps illustrates it best:
   numpy.matrix([1,2,3])**2 
doesn't work either. A sage "vector" is a lot more like a 1-dimensional 
matrix, where multiplication is reserved for ... matrix multiplication! 
Since exponentiation is strongly tied to iterated multiplication, you end 
up only being able to take a power of a square matrix.

If you want array semantics, use arrays (there multiplication is 
element-wise, so element-wise exponentiation makes sense as well).

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/452f71e2-c58a-401c-9021-a2852ecc91d5n%40googlegroups.com.


Re: [sage-devel] Sage compilation

2022-06-12 Thread Dima Pasechnik
texinfo is not necessary.
Just try

make build



On Sun, 12 Jun 2022, 15:48 David Kohel,  wrote:

> This still gave the same error.  If I instead deactivate conda, I get
> further, but
> with the homebrew installation it fails to find texinfo:
>
> configure:
>
> hint: installing the following system packages, if not
> already present, may provide additional optional features:
>
>   $ brew install texinfo
>
> Homebrew can issue suggestions regarding keg-only packages.
> The following command is to automatically apply these suggestions
> for packages relevant for Sage to make them available for the build.
> Run it once to apply the suggestions for the current session.
> Add it to your shell profile to apply them for all future sessions.
>
>   $ source /usr/local/sage-9.6/.homebrew-build-env
>
> configure:
>
> hint: After installation, re-run configure using:
>
>   $ ./config.status --recheck && ./config.status
>
> Following these instructions it verifies that the texinfo is installed,
> but I get the
> same failure from configuration.
>
> Is there any chance that this would be easier to debug?  The full log is
> attached.
>
> --David
>
> On Sunday, June 12, 2022 at 3:06:45 PM UTC+2 dim...@gmail.com wrote:
>
>> On Sun, Jun 12, 2022 at 1:23 PM David Kohel 
>> wrote:
>> >
>> > I'm been unable to compile Sage on my MacOS laptop (Monterrey, x86
>> intel)
>> >
>> > I've tried installing all homebrew packages requested, but it tends to
>> > still not
>> > find them (path problem?). I switched to using conda, following the
>> > directions
>> > here:
>> >
>> > https://doc.sagemath.org/html/en/installation/conda.html
>> >
>> > but it fails with the error message below (another path problem?). The
>> > config
>> > log file is attached.
>> >
>> > Any suggestions would be appreciated.
>> >
>> > --David Kohel
>> >
>> > Checking whether SageMath should install SPKG gmp...
>> > checking gmp.h usability... yes
>> > checking gmp.h presence... no
>> > configure: WARNING: gmp.h: accepted by the compiler, rejected by the
>> > preprocessor!
>> > configure: WARNING: gmp.h: proceeding with the compiler's result
>> > checking for gmp.h... yes
>> > checking gmpxx.h usability... yes
>> > checking gmpxx.h presence... no
>> > configure: WARNING: gmpxx.h: accepted by the compiler, rejected by the
>> > preprocessor!
>> > configure: WARNING: gmpxx.h: proceeding with the compiler's result
>> > checking for gmpxx.h... yes
>> > checking for library containing __gmpq_cmp_z... -lgmp
>> > configure: will use system package and not install SPKG gmp
>> > checking absolute name of ... checking for gmp.h... (cached) yes
>> >
>> > configure: error: failed to find absolute path to gmp.h despite it
>> being
>> > reported found
>> >
>> this is due to the test in build/pkgs/gmp/spkg-configure.m4
>>
>> AX_ABSOLUTE_HEADER([gmp.h])
>> if test x$gl_cv_absolute_gmp_h = x; then
>> AC_MSG_ERROR(m4_normalize([
>> failed to find absolute path to gmp.h despite it being reported
>> found
>> ]))
>> fi
>> AC_SUBST(SAGE_GMP_INCLUDE, [`AS_DIRNAME($gl_cv_absolute_gmp_h)`])
>>
>> Replace this fragment with
>>
>> AC_SUBST(SAGE_GMP_INCLUDE, [' '])
>>
>> and re-run ./bootstrap
>>
>> this will disable this check - I also assume that any package that
>> potentially needs
>> the correct value of SAGE_GMP_INCLUDE actually comes from Conda anyway,
>> and so
>> this value, the absolute path to GMP include headers, is not relevant;
>> it can also be replaced with the value in question, say, /foo/bar, if
>> needed, by using instead
>>
>> AC_SUBST(SAGE_GMP_INCLUDE, ['/foo/bar/'])
>>
>>
>>
>>
>>
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "sage-devel" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an email to sage-devel+...@googlegroups.com.
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-devel/86561d45-63e9-69fb-9361-4142fa731a9d%40univ-amu.fr.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/c36d2ce8-7d2c-4846-aa13-41ba4a297b70n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq1%3DTCUWGfd-PH-ZjwEK7vFzJa9-xk7qeGxerTSQR6DoBg%40mail.gmail.com.


Re: [sage-devel] Re: Developing for Sage without running "./sage -br" too often?

2022-06-12 Thread Dima Pasechnik
On Sun, 12 Jun 2022, 14:13 Jing Guo,  wrote:

> Thank you, Matthias.
>
> After using this, I typed and ran "./sage -br" and for some reason it
> could not build... So I run "make" again and am waiting for it to finish.
>

make build

will be enough - unless you want to test docs build too



> 在2022年6月12日星期日 UTC+8 02:05:18 写道:
>
>> Use "./configure --enable-editable"
>>
>>
>> https://wiki.sagemath.org/ReleaseTours/sage-9.3#Editable_.28.22in-place.22.2C_.22develop.22.29_installs_of_the_Sage_library
>>
>> On Saturday, June 11, 2022 at 8:16:28 AM UTC-7 dev@gmail.com wrote:
>>
>>> Dear all,
>>>
>>> As it's written in the developer guide [0]:
>>>
>>> > Once you have made any changes you of course want to build Sage and
>>> try out your edits. As long as you only modified the Sage library (that is,
>>> Python and Cython files under src/sage/...) you just have to run: "./sage
>>> -br"
>>>
>>> Because of some issues in my old Mac, I need to compile Sage code in my
>>> Debian VM, which implies that sometimes even running "./sage -br" can take
>>> some time.
>>>
>>> So I was wondering that do you have any advice or suggetions regarding
>>> how one could compile/build newly modified code without having to run
>>> "./sage -br" too often, hence speed up the whole process? (I think I read
>>> in the documentation that Gitpod is one of possible solutions?)
>>>
>>> Thank you for your time.
>>>
>>> [0]: https://doc.sagemath.org/html/en/developer/walk_through.html
>>>
>>> Jing
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/e8eb456a-18ea-4603-94b3-80ec1210230bn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq3HzF%2BneVAYzYC_7sHLFnJi-_OVZ424ywmX97_svh7SBg%40mail.gmail.com.


[sage-devel] Re: Developing for Sage without running "./sage -br" too often?

2022-06-12 Thread Jing Guo
Thank you, Matthias.

After using this, I typed and ran "./sage -br" and for some reason it could 
not build... So I run "make" again and am waiting for it to finish.

在2022年6月12日星期日 UTC+8 02:05:18 写道:

> Use "./configure --enable-editable"
>
>
> https://wiki.sagemath.org/ReleaseTours/sage-9.3#Editable_.28.22in-place.22.2C_.22develop.22.29_installs_of_the_Sage_library
>
> On Saturday, June 11, 2022 at 8:16:28 AM UTC-7 dev@gmail.com wrote:
>
>> Dear all,
>>
>> As it's written in the developer guide [0]:
>>
>> > Once you have made any changes you of course want to build Sage and try 
>> out your edits. As long as you only modified the Sage library (that is, 
>> Python and Cython files under src/sage/...) you just have to run: "./sage 
>> -br"
>>
>> Because of some issues in my old Mac, I need to compile Sage code in my 
>> Debian VM, which implies that sometimes even running "./sage -br" can take 
>> some time.
>>
>> So I was wondering that do you have any advice or suggetions regarding 
>> how one could compile/build newly modified code without having to run 
>> "./sage -br" too often, hence speed up the whole process? (I think I read 
>> in the documentation that Gitpod is one of possible solutions?)
>>
>> Thank you for your time.
>>
>> [0]: https://doc.sagemath.org/html/en/developer/walk_through.html
>>
>> Jing
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/e8eb456a-18ea-4603-94b3-80ec1210230bn%40googlegroups.com.


Re: [sage-devel] Sage compilation

2022-06-12 Thread Dima Pasechnik
On Sun, Jun 12, 2022 at 1:23 PM David Kohel  wrote:
>
> I'm been unable to compile Sage on my MacOS laptop (Monterrey, x86 intel)
>
> I've tried installing all homebrew packages requested, but it tends to
> still not
> find them (path problem?).  I switched to using conda, following the
> directions
> here:
>
> https://doc.sagemath.org/html/en/installation/conda.html
>
> but it fails with the error message below (another path problem?). The
> config
> log file is attached.
>
> Any suggestions would be appreciated.
>
> --David Kohel
>
> Checking whether SageMath should install SPKG gmp...
> checking gmp.h usability... yes
> checking gmp.h presence... no
> configure: WARNING: gmp.h: accepted by the compiler, rejected by the
> preprocessor!
> configure: WARNING: gmp.h: proceeding with the compiler's result
> checking for gmp.h... yes
> checking gmpxx.h usability... yes
> checking gmpxx.h presence... no
> configure: WARNING: gmpxx.h: accepted by the compiler, rejected by the
> preprocessor!
> configure: WARNING: gmpxx.h: proceeding with the compiler's result
> checking for gmpxx.h... yes
> checking for library containing __gmpq_cmp_z... -lgmp
> configure: will use system package and not install SPKG gmp
> checking absolute name of ... checking for gmp.h... (cached) yes
>
> configure: error: failed to find absolute path to gmp.h despite it being
> reported found
>
this is due to the test in build/pkgs/gmp/spkg-configure.m4

AX_ABSOLUTE_HEADER([gmp.h])
if test x$gl_cv_absolute_gmp_h = x; then
AC_MSG_ERROR(m4_normalize([
failed to find absolute path to gmp.h despite it being reported
found
]))
fi
AC_SUBST(SAGE_GMP_INCLUDE, [`AS_DIRNAME($gl_cv_absolute_gmp_h)`])

Replace this fragment with

AC_SUBST(SAGE_GMP_INCLUDE, [' '])

and re-run ./bootstrap

this will disable this check - I also assume that any package that
potentially needs
the correct value of SAGE_GMP_INCLUDE actually comes from Conda anyway, and so
this value, the absolute path to GMP include headers, is not relevant;
it can also be replaced with the value in question, say, /foo/bar,  if
needed, by using instead

   AC_SUBST(SAGE_GMP_INCLUDE, ['/foo/bar/'])






> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/86561d45-63e9-69fb-9361-4142fa731a9d%40univ-amu.fr.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq2D46-ebEaaSRwK0HFxntxFGPaStoUSgo_sQnPFBySpUA%40mail.gmail.com.


[sage-devel] Sage compilation

2022-06-12 Thread David Kohel

I'm been unable to compile Sage on my MacOS laptop (Monterrey, x86 intel)

I've tried installing all homebrew packages requested, but it tends to 
still not
find them (path problem?).  I switched to using conda, following the 
directions

here:

https://doc.sagemath.org/html/en/installation/conda.html

but it fails with the error message below (another path problem?). The 
config

log file is attached.

Any suggestions would be appreciated.

--David Kohel

Checking whether SageMath should install SPKG gmp...
checking gmp.h usability... yes
checking gmp.h presence... no
configure: WARNING: gmp.h: accepted by the compiler, rejected by the 
preprocessor!

configure: WARNING: gmp.h: proceeding with the compiler's result
checking for gmp.h... yes
checking gmpxx.h usability... yes
checking gmpxx.h presence... no
configure: WARNING: gmpxx.h: accepted by the compiler, rejected by the 
preprocessor!

configure: WARNING: gmpxx.h: proceeding with the compiler's result
checking for gmpxx.h... yes
checking for library containing __gmpq_cmp_z... -lgmp
configure: will use system package and not install SPKG gmp
checking absolute name of ... checking for gmp.h... (cached) yes

configure: error: failed to find absolute path to gmp.h despite it being 
reported found


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/86561d45-63e9-69fb-9361-4142fa731a9d%40univ-amu.fr.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by Sage configure 9.7.beta1, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --prefix=/Applications/anaconda3/envs/sage-build

## - ##
## Platform. ##
## - ##

hostname = bunyip.home
uname -m = x86_64
uname -r = 21.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; 
root:xnu-8020.121.3~4/RELEASE_X86_64

/usr/bin/uname -p = i386
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = Mach kernel version:
 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; 
root:xnu-8020.121.3~4/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 511 tasks, 2100 threads, 4 processors
Load average: 13.69, Mach factor: 0.29
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /Applications/anaconda3/envs/sage-build/bin
PATH: /Applications/anaconda3/condabin
PATH: /usr/local/opt/texinfo/bin
PATH: /Library/Frameworks/Python.framework/Versions/3.9/bin
PATH: /Users/kohel/.nvm/versions/node/v8.17.0/bin
PATH: /usr/local/opt
PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin
PATH: /usr/local/texlive/2019/bin/x86_64-darwin
PATH: /usr/local/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /Library/TeX/texbin
PATH: /usr/local/go/bin
PATH: /Library/Apple/usr/bin
PATH: /Applications/Magma
PATH: /Users/kohel/bin
PATH: /usr/local/go/bin


## --- ##
## Core tests. ##
## --- ##

configure:4334: checking for a BSD-compatible install
configure:4402: result: /usr/bin/install -c
configure:4413: checking whether build environment is sane
configure:4468: result: yes
configure:4614: checking for a thread-safe mkdir -p
configure:4653: result: config/install-sh -c -d
configure:4660: checking for gawk
configure:4690: result: no
configure:4660: checking for mawk
configure:4690: result: no
configure:4660: checking for nawk
configure:4690: result: no
configure:4660: checking for awk
configure:4676: found /usr/bin/awk
configure:4687: result: awk
configure:4698: checking whether make sets $(MAKE)
configure:4720: result: yes
configure:4749: checking whether make supports nested variables
configure:4766: result: yes
configure:4909: checking whether to enable maintainer-specific portions of 
Makefiles
configure:4918: result: yes
configure:4938: checking whether make supports the include directive
configure:4953: make -f confmf.GNU && cat confinc.out
this is the am__doit target
configure:4956: $? = 0
configure:4975: result: yes (GNU style)
configure:5005: checking for x86_64-apple-darwin13.4.0-gcc
configure:5032: result: x86_64-apple-darwin13.4.0-clang
configure:5301: checking for C compiler version
configure:5310: x86_64-apple-darwin13.4.0-clang --version >&5
clang version 13.0.1
Target: x86_64-apple-darwin13.4.0
Thread model: posix
InstalledDir: