-
-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup general CFLAGS #12890
Comments
comment:1
There are a lot of aspects to this, i.e., one could write a whole essay on it, that's why I haven't [yet] replied on #11616... The introduction of Michael Abshoff had some ideas regarding "standard" variables like The Sage library (i.e., Sage's There's in principle no way to determine in an Spkgs are intended to make Sage modular (i.e., they're not supposed to be tied to a specific Sage version); they can [currently] rely on a few basic environment variable settings, but not more, and there's currently no framework for an spkg to require a minimal or specific version of Sage or other spkgs. The assembler errors ("unknown instruction") are almost exclusively caused by the GCC spkg, since any reasonable operating system or distribution ships a toolchain where parts "match". (A user could of course also install a newer compiler without updating binutils etc., but then it's mainly his fault, and we certainly cannot catch and work around all possible issues.) Note that one usually also needs current versions of MPIR implements much more in assembly than other spkgs do, hence it's less likely that GCC is tempted to emit fancy instructions for MPIR's (high-level) C code. (And MPIR uses its own assembler for its "hand-written" assembly files. We might install Still a couple of spkgs (i.e., mostly upstream) ignore ... |
comment:2
P.S.: The situation with Fortran is even worse. We have a useless |
comment:8
outdated, should close |
comment:9
indeed |
The current way how Sage handles CFLAGS is quite bad. There are several issues:
Too many spkg-install files are trying to do clever stuff to determine CFLAGS. This should be done just once instead of in every spkg. This would imply we don't need to handle SAGE64 and SAGE_DEBUG in every spkg.
Sometimes, the spkg determines CFLAGS which result in a failed build, for example when the gcc issues instructions which the assembler doesn't know about.
Some packages don't do anything clever and just build with simple, suboptimal CFLAGS.
My impression is that MPIR is very good at determining the right CFLAGS. So we should not try to reinvent the wheel, just take MPIR's CFLAGS.
CC: @kini
Component: build
Issue created by migration from https://trac.sagemath.org/ticket/12890
The text was updated successfully, but these errors were encountered: