Opened 8 years ago
Closed 8 years ago
#16751 closed defect (fixed)
Singular build fail OSX109
Reported by:  Volker Braun  Owned by:  

Priority:  critical  Milestone:  sage6.3 
Component:  packages: standard  Keywords:  FLINT MacOS 
Cc:  Jan Keitel, François Bissey, Jeroen Demeyer  Merged in:  
Authors:  Volker Braun  Reviewers:  Jan Keitel, Leif Leonhardy 
Report Upstream:  N/A  Work issues:  
Branch:  fa75ea6 (Commits, GitHub, GitLab)  Commit:  fa75ea6c03a9bcf856d5f3cf9af6eab4fcd939d2 
Dependencies:  Stopgaps: 
Description
Attachments (2)
Change History (21)
comment:1 Changed 8 years ago by
Component:  PLEASE CHANGE → packages: standard 

Priority:  major → critical 
Type:  PLEASE CHANGE → defect 
comment:2 Changed 8 years ago by
Cc:  Jan Keitel added 

comment:3 Changed 8 years ago by
Branch:  → u/vbraun/singular_build_fail_osx109 

comment:4 Changed 8 years ago by
Cc:  François Bissey added 

Commit:  → d5b8fa660cb0aafef769c257a575e547bbb1b618 
There was a withoutflint
in the libfac configuration, that doesn't sound right.
New commits:
d5b8fa6  remove stray withoutflint

comment:5 Changed 8 years ago by
Hi Volker,
that alone doesn't work yet. Wasn't Francois on the right track? The Singular config.log keeps saying
/Users/kabel/sage/sage/local/include/flint/flint.h:74:2: error: #error GMP 5.0.0 or MPIR 2.6.0 or later are required /Users/kabel/sage/sage/local/include/flint/flint.h:78:2: error: #error MPFR 3.0.0 or later is required
The whole (new) config.log file is here: http://wwwth.mpp.mpg.de/members/jkeitel/config2.log
comment:6 Changed 8 years ago by
Commit:  d5b8fa660cb0aafef769c257a575e547bbb1b618 → fa75ea6c03a9bcf856d5f3cf9af6eab4fcd939d2 

Branch pushed to git repo; I updated commit sha1. New commits:
fa75ea6  Do not add /usr/local/{lib,include} to paths

comment:7 Changed 8 years ago by
Status:  new → needs_review 

Yes, looking at the configure its pretty clear that this is bad. New commit should fix it. This is gone in Singular4 as far as I can tell.
comment:8 Changed 8 years ago by
Reposting here, since apparently G00gle doesn't like it (meanwhile tried twice):
Jan Keitel wrote: > Okay, found them: > > gmp: 4.3.1 > mpfr: 2.4.1 > mpc: 0.8.1 These shouldn't get picked up (in this case, only the header files matter anyway), since $SAGE_LOCAL/{include,lib} come first in the I and L directives: configure:8898: gcc o conftest O2 g fPIC I/Users/kabel/sage/sage/local/include/flint I/Users/kabel/sage/sage/local/include I/Users/kabel/sage/sage/local/include I/Users/kabel/sage/sage/local/include I/usr/local/include L/Users/kabel/sage/sage/local/lib L/Users/kabel/sage/sage/local/lib L/usr/local/lib conftest.c lntl lgmp lreadline ltermcap lm L/Users/kabel/sage/sage/local/lib lflint lmpfr lmpir >&5 In file included from /Users/kabel/sage/sage/local/include/flint/fmpz.h:38:0, from conftest.c:94: /Users/kabel/sage/sage/local/include/flint/flint.h:74:2: error: #error GMP 5.0.0 or MPIR 2.6.0 or later are required /Users/kabel/sage/sage/local/include/flint/flint.h:78:2: error: #error MPFR 3.0.0 or later is required configure:8898: $? = 1 It would be interesting to see GCC's verbose output (in particular, the list of include folders) as well as the preprocessed source of that conftest.c, but I guess it's not that easy to add the appropriate flags there. > Is there a way to force the sage installation not to use the globally > installed versions? It shouldn't at all. You could move or remove them temporarily though.
comment:9 followup: 10 Changed 8 years ago by
Well, if there's any other information that I can provide, please let me know. In the meantime I've pulled the updated branch and am compiling again. So far it's looking good.
comment:10 Changed 8 years ago by
Replying to jkeitel:
Well, if there's any other information that I can provide, please let me know. In the meantime I've pulled the updated branch and am compiling again. So far it's looking good.
Provided Volker's patch solves the issue, probably not worth the effort.
Otherwise I'd say it's a compiler bug, if we can trust what's in config.log
(i.e., the shown command line leading to the failure).
comment:11 followup: 12 Changed 8 years ago by
Yep, it works. Thank you!
I'd like to give this a positive review, but I don't think I'm the right guy to do that, because I can't tell whether it breaks something else. Francois, leif? ;)
comment:12 followup: 13 Changed 8 years ago by
Authors:  → Volker Braun 

Reviewers:  → Jan Keitel, Leif Leonhardy 
Status:  needs_review → positive_review 
Replying to jkeitel:
I'd like to give this a positive review, but I don't think I'm the right guy to do that, because I can't tell whether it breaks something else. Francois, leif? ;)
In theory at least, the patch could of course break things on other systems (where pieces not shipped with Sage are located in /usr/local/
, and in case that's not searched by default), but there are easy workarounds for that case, and I think that'd be for another ticket if someone gets hit. (Probably the buildbots will also tell.)
I still don't get why apparently /usr/local/include/gmp.h
gets included although I${SAGE_LOCAL}/include
precedes I/usr/local/include
, according to config.log
...
comment:13 Changed 8 years ago by
Replying to leif:
I still don't get why apparently
/usr/local/include/gmp.h
gets included althoughI${SAGE_LOCAL}/include
precedesI/usr/local/include
, according toconfig.log
...
Jan, you may try whether
gcc o conftest O2 g fPIC I/Users/kabel/sage/sage/local/include/flint I/Users/kabel/sage/sage/local/include I/Users/kabel/sage/sage/local/include I/Users/kabel/sage/sage/local/include I/usr/local/include L/Users/kabel/sage/sage/local/lib L/Users/kabel/sage/sage/local/lib L/usr/local/lib conftest.c lntl lomalloc_ndebug lomalloc lsingfac lsingcf lgmp lreadline ltermcap lm L/Users/kabel/sage/sage/local/lib lflint lmpfr lmpir
or simply
gcc I/Users/kabel/sage/sage/local/include/flint I/Users/kabel/sage/sage/local/include I/usr/local/include c conftest.c
also fails for you, in a Sage subshell (./sage sh
).
I've attached the corresponding conftest.c.
comment:14 followup: 15 Changed 8 years ago by
Yep, they both do:
(sagesh) kabel@AloissMacBookAir2:sage$ gcc o conftest O2 g fPIC I/Users/kabel/sage/sage/local/include/flint I/Users/kabel/sage/sage/local/include I/Users/kabel/sage/sage/local/include I/Users/kabel/sage/sage/local/include I/usr/local/include L/Users/kabel/sage/sage/local/lib L/Users/kabel/sage/sage/local/lib L/usr/local/lib conftest.c lntl lomalloc_ndebug lomalloc lsingfac lsingcf lgmp lreadline ltermcap lm L/Users/kabel/sage/sage/local/lib lflint lmpfr lmpir In file included from /Users/kabel/sage/sage/local/include/flint/fmpz.h:38:0, from conftest.c:99: /Users/kabel/sage/sage/local/include/flint/flint.h:74:2: error: #error GMP 5.0.0 or MPIR 2.6.0 or later are required /Users/kabel/sage/sage/local/include/flint/flint.h:78:2: error: #error MPFR 3.0.0 or later is required
kabel@AloissMacBookAir2:sage$ gcc I/Users/kabel/sage/sage/local/include/flint I/Users/kabel/sage/sage/local/include I/usr/local/include c conftest.c In file included from /Users/kabel/sage/sage/local/include/flint/fmpz.h:38:0, from conftest.c:99: /Users/kabel/sage/sage/local/include/flint/flint.h:74:2: error: #error GMP 5.0.0 or MPIR 2.6.0 or later are required /Users/kabel/sage/sage/local/include/flint/flint.h:78:2: error: #error MPFR 3.0.0 or later is required
comment:15 Changed 8 years ago by
Replying to jkeitel:
Yep, they both do.
Ouch. Could you paste the output of
gcc v savetemps I/Users/kabel/sage/sage/local/include/flint I/Users/kabel/sage/sage/local/include I/usr/local/include c conftest.c
and attach the generated conftest.i
?
Changed 8 years ago by
Attachment:  conftest.i added 

comment:16 Changed 8 years ago by
Sure:
(sagesh) kabel@AloissMacBookAir2:sage$ gcc v savetemps I/Users/kabel/sage/sage/local/include/flint I/Users/kabel/sage/sage/local/include I/usr/local/include c conftest.c Using builtin specs. COLLECT_GCC=gcc Target: x86_64appledarwin13.3.0 Configured with: ../src/configure prefix=/Users/kabel/sage/sage/local withlocalprefix=/Users/kabel/sage/sage/local withgmp=/Users/kabel/sage/sage/local withmpfr=/Users/kabel/sage/sage/local withmpc=/Users/kabel/sage/sage/local withsystemzlib disablemultilib disablenls Thread model: posix gcc version 4.7.3 (GCC) COLLECT_GCC_OPTIONS='mmacosxversionmin=10.9' 'v' 'savetemps' 'I' '/Users/kabel/sage/sage/local/include/flint' 'I' '/Users/kabel/sage/sage/local/include' 'I' '/usr/local/include' 'c' 'mtune=core2' /Users/kabel/sage/sage/local/libexec/gcc/x86_64appledarwin13.3.0/4.7.3/cc1 E quiet v I /Users/kabel/sage/sage/local/include/flint I /Users/kabel/sage/sage/local/include I /usr/local/include D__DYNAMIC__ conftest.c fPIC mmacosxversionmin=10.9 mtune=core2 fpchpreprocess o conftest.i ignoring nonexistent directory "/Users/kabel/sage/sage/local/lib/gcc/x86_64appledarwin13.3.0/4.7.3/../../../../x86_64appledarwin13.3.0/include" ignoring duplicate directory "/Users/kabel/sage/sage/local/include" as it is a nonsystem directory that duplicates a system directory ignoring duplicate directory "/Users/kabel/sage/sage/local/include" as it is a nonsystem directory that duplicates a system directory #include "..." search starts here: #include <...> search starts here: /Users/kabel/sage/sage/local/include/flint /usr/local/include /Users/kabel/sage/sage/local/lib/gcc/x86_64appledarwin13.3.0/4.7.3/include /Users/kabel/sage/sage/local/include /Users/kabel/sage/sage/local/lib/gcc/x86_64appledarwin13.3.0/4.7.3/includefixed /usr/include /System/Library/Frameworks /Library/Frameworks End of search list. In file included from /Users/kabel/sage/sage/local/include/flint/fmpz.h:38:0, from conftest.c:99: /Users/kabel/sage/sage/local/include/flint/flint.h:74:2: error: #error GMP 5.0.0 or MPIR 2.6.0 or later are required /Users/kabel/sage/sage/local/include/flint/flint.h:78:2: error: #error MPFR 3.0.0 or later is required
comment:17 Changed 8 years ago by
Cc:  Jeroen Demeyer added 

Keywords:  FLINT MacOS added 
Ah ok, thanks.
So it's pretty specific to "Sage's" GCC, which treats $SAGE_LOCAL/include
as a system include folder, but not /usr/local/include
.
One day we should [instead] fix the GCC spkg then... :P
comment:19 Changed 8 years ago by
Branch:  u/vbraun/singular_build_fail_osx109 → fa75ea6c03a9bcf856d5f3cf9af6eab4fcd939d2 

Resolution:  → fixed 
Status:  positive_review → closed 
As reported at https://groups.google.com/d/msg/sagerelease/1CFpQblf8FE/YLr4t2Mw7mMJ