Opened 16 months ago
Closed 15 months ago
#31365 closed enhancement (fixed)
Add NTL to cython_aliases and sage.misc.cython library search dirs
Reported by:  mkoeppe  Owned by:  

Priority:  major  Milestone:  sage9.3 
Component:  build: configure  Keywords:  
Cc:  ghzlscherr, dimpase, mjo, vdelecroix, ghkliem, jhpalmieri, fbissey  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  Jonathan Kliem 
Report Upstream:  N/A  Work issues:  
Branch:  dbcbf79 (Commits, GitHub, GitLab)  Commit:  dbcbf792927c4aa92fb2a60c528c830a2920c175 
Dependencies:  #30770, #31344  Stopgaps: 
Description (last modified by )
(from #31348)
... using SAGE_NTL_PREFIX
via sage_conf
.
This is for macOS with configurations in which Python extensions no longer have access to /usr/local
due to the use of isysroot
in the compiler configuration from sysconfig.
In particular, we add handling for ntl
to the .homebrewbuildenv
script  so that after brew install ntl; brew unlink ntl
, our ./configure
still finds NTL.
Change History (24)
comment:1 Changed 16 months ago by
 Dependencies set to #30770
comment:2 Changed 16 months ago by
 Dependencies changed from #30770 to #30770, #31344
comment:3 Changed 16 months ago by
 Summary changed from Add NTL to cython_aliases to Add NTL to cython_aliases and sage.misc.cython library search dirs
comment:4 Changed 16 months ago by
 Branch set to u/mkoeppe/add_ntl_to_cython_aliases
comment:5 Changed 16 months ago by
 Commit set to 32576b43a0415a9e15d1cbe6beac2dd4c300a745
comment:6 Changed 16 months ago by
Actually spkgconfigure.m4
needs some work too  need to use AX_ABSOLUTE_HEADER
to set SAGE_NTL_PREFIX
comment:7 Changed 15 months ago by
 Commit changed from 32576b43a0415a9e15d1cbe6beac2dd4c300a745 to 7b1e27b96e143d6d44b448692ba266050e667399
comment:8 Changed 15 months ago by
 Description modified (diff)
 Status changed from new to needs_review
comment:9 Changed 15 months ago by
 Status changed from needs_review to needs_work
NTL_INCDIR, NTL_LIBDIR needs more work.
NTL_INCDIR = ". . ///usr/include/NTL"
comment:10 Changed 15 months ago by
 Commit changed from 7b1e27b96e143d6d44b448692ba266050e667399 to 993c35c931f9c9f2b459e66619cac7d587a4a08f
comment:11 Changed 15 months ago by
 Status changed from needs_work to needs_review
comment:12 Changed 15 months ago by
 Cc vdelecroix ghkliem added
comment:13 Changed 15 months ago by
 Commit changed from 993c35c931f9c9f2b459e66619cac7d587a4a08f to dbcbf792927c4aa92fb2a60c528c830a2920c175
Branch pushed to git repo; I updated commit sha1. New commits:
dbcbf79  .homebrewbuildenv: Add ntl dirs

comment:14 Changed 15 months ago by
 Cc jhpalmieri added
 Description modified (diff)
comment:15 Changed 15 months ago by
 Cc fbissey added
comment:16 followup: ↓ 19 Changed 15 months ago by
You changed src/sage/rings/rational.pyx
and src/sage/matrix/matrix_rational_dense.pyx
to language c++
. Is there a reason for this?
comment:17 followup: ↓ 20 Changed 15 months ago by
I'm a bit confused:
In src/sage/misc/cython.py
we add NTL_LIBDIR
to standard_libdirs
and likewise we add NTL_INCDIR
to standard_incdirs
. Why do we need to add this to every file again that uses ntl?
comment:18 Changed 15 months ago by
 Reviewers set to Jonathan Kliem
comment:19 in reply to: ↑ 16 ; followup: ↓ 21 Changed 15 months ago by
Replying to ghkliem:
You changed
src/sage/rings/rational.pyx
andsrc/sage/matrix/matrix_rational_dense.pyx
to languagec++
. Is there a reason for this?
Ok, I see:
[sagelib9.3.beta7] cc1: warning: command line option ‘std=c++11’ is valid for C++/ObjC++ but not for C [sagelib9.3.beta7] cc1: warning: command line option ‘std=c++11’ is valid for C++/ObjC++ but not for C
Which raises a bit the question, why its called NTL_CFLAGS
and not NTL_CXXFLAGS
.
comment:20 in reply to: ↑ 17 Changed 15 months ago by
Replying to ghkliem:
In
src/sage/misc/cython.py
we addNTL_LIBDIR
tostandard_libdirs
and likewise we addNTL_INCDIR
tostandard_incdirs
. Why do we need to add this to every file again that uses ntl?
sage.misc.cython
is only for runtime use of Cython; it is not used by the sagelib build system.
comment:21 in reply to: ↑ 19 Changed 15 months ago by
Replying to ghkliem:
Which raises a bit the question, why its called
NTL_CFLAGS
and notNTL_CXXFLAGS
.
The names follow the conventions of pkgconfig
 which does not make this distinction.
comment:23 Changed 15 months ago by
Thank you!
comment:24 Changed 15 months ago by
 Branch changed from u/mkoeppe/add_ntl_to_cython_aliases to dbcbf792927c4aa92fb2a60c528c830a2920c175
 Resolution set to fixed
 Status changed from positive_review to closed
Branch pushed to git repo; I updated commit sha1. New commits:
sage.misc.cython: Add NTL aliases, cache result of cython_aliases