-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Fragile GMP header hack in Singular and track all files #14737
Comments
comment:1
(More to come...) |
Changed keywords from cf_gmp.h bits/c++config.h spkg to cf_gmp.h bits/c++config.h spkg factory build error |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:4
For the impatient: An initial fixed spkg can be found here. (Currently just adds a patch to |
Changed keywords from cf_gmp.h bits/c++config.h spkg factory build error to cf_gmp.h bits/c++config.h spkg factory build error Arch Linux Slackware |
This comment has been minimized.
This comment has been minimized.
comment:8
I used the patch to build sage 5.11β3 on a system that used to be affected by this bug (debian sid, gcc 4.8). It works for me. |
comment:9
Replying to @mezzarobba:
Someone else just reported the same error for Debian testing... :-) |
This comment has been minimized.
This comment has been minimized.
comment:10
Slightly changed the spkg; patch now removes unneeded files as well. |
Attachment: sanitize_gmp_header_hack.patch.gz Proposed patch to upstream (included in the |
comment:12
This spkg fixed the problem for me too ! And I also run debian sid. Thank you very much ! Nathann |
comment:13
Leif, are you still working on the patch or is this ready for review? |
This comment has been minimized.
This comment has been minimized.
comment:15
The GMP header patch looks good to me (positive review) Somebody needs to review the sage-src script and then we are ready. |
Author: Leif Leonhardy, Volker Braun |
Reviewer: Volker Braun |
Changed keywords from cf_gmp.h bits/c++config.h spkg factory build error Arch Linux Slackware to git cf_gmp.h bits/c++config.h spkg factory build error Arch Linux Slackware |
Changed reviewer from Volker Braun to Volker Braun, Jean-Pierre Flori |
comment:16
I'm ok with spkg-src. |
Merged: sage-5.12.beta0 |
One (variant of possible) symptom(s):
This is still present in Singular 3-1-6.
The file
factory/cf_gmp.h
is supposed to contain a copy of the otherwise usedgmp.h
found on the system, with some C++ definitions removed, later on to be used both by Singular C and C++ files (i.e., those includecf_gmp.h
instead ofgmp.h
).The actual problem is getting the location (i.e., the absolute path) of the header file used by the C/C++ compiler / preprocessor, in order to create a modified copy of it.
The latter is achieved by using GCC's
-M
switch to outputMakefile
dependencies (also taking into account include directory search paths eventually specified by the user, probably via--with-gmp=...
), but isn't robust w.r.t. the formatting of the generated rules.In particular, undesired additional header files (which usually include others) may end up in
cf_gmp.h
, leading to (potentially arbitrary) problems at least when C files include it, as the folders searched for C headers usually differ from those used when compiling / preprocessing C++. (This is the case in the rather obscure error above, wherebits/c++config.h
isn't found.)The current patch to the Singular spkg both simplifies the generation of
cf_gmp.h
(no longer needinggen_cf_gmp.template
and [to ship]gen_cf_gmp.cc
, nor the generation of a temporary shell script,gen_cf_gmp.sh
), and of course makes it more robust, also making sure only the contents ofgmp.h
ends up in its modified copy.fixed spkg: http://boxen.math.washington.edu/home/vbraun/spkg/singular-3-1-5.p8.spkg
Upstream: Not yet reported upstream; Will do shortly.
CC: @mezzarobba
Component: packages: standard
Keywords: git cf_gmp.h bits/c++config.h spkg factory build error Arch Linux Slackware
Author: Leif Leonhardy, Volker Braun
Reviewer: Volker Braun, Jean-Pierre Flori
Merged: sage-5.12.beta0
Issue created by migration from https://trac.sagemath.org/ticket/14737
The text was updated successfully, but these errors were encountered: