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
flint fails to build in Open Solaris x64 as 64 bit since FLINT_TUNE is not set #8112
Comments
comment:1
Here is an spkg:
Jaap |
Author: Jaap Spies |
This comment has been minimized.
This comment has been minimized.
comment:2
It's not clear to me what is intended here.
If Flint will build by setting the environment variables CFLAG64 and CXXFLAG64 to -m64, then I would not bother patching Flint at all. Just set those two environments variables. They will not mess up the build process in any way, and since they are variables, they could be set to something else. Setting CFLAGS is known to cause problems, but setting CFLAG64 or CXXFLAG64 will not cause any problems. If you do need to patch this again, then you can remove this code:
since 'prereq' will ensure that gcc is at least 4.0.1. That also means the file test_gcc_version.sh can be removed, as it is now redundant. Thinking about this 64-bit patching process in general, it is better to simply use CFLAG64 and CXXFLAG64 rather than -m64, and simply document the user must type
until such time as sage-env is updated. At which point, that will be unnecessary to do. That will avoid -m64 ever having to be hard-coded again, which is a good thing, as not all compilers accept that flag. I suspect this ticket can be closed as 'wontfix' as no fixes are needed, but I may be wrong. Dave |
Reviewer: David Kirkby |
comment:3
Replying to @sagetrac-drkirkby:
I don't see anything alike in the patch file!?
Are you shure flint will build that way?
We'll see.
|
comment:4
Maybe the description was somewhat misleading or I was unclear over the meaning of this. What I propose is:
Now if CFLAGS is empty the -m64 gets in. See the patch. Jaap |
comment:5
This has been a bit messed up by me, as I made some changes which assumed we could set CFLAGS globally, but we can't. I'd proposed using CFLAG64 to be the C compiler flag(s) needed to build a 64-bit binary, which are usually -m64, but might not be. That could be set globally, but lets assume for now it is not. How would something like this seem: If [ -z "$CFLAG64" ] ; then (see how I did this in #8191) https://github.com/sagemath/sage-prod/files/10647989/R.patch.gz Then simply append $CFLAG64 to FLINT_TUNE. But remove the -m64, as we don't need both. Since CFLAGS and CXXFLAGS are not set in spkg-install, there is no point exporting them. Neither is there any point in exporting CFLAG64 or CXXFLAG64 as again they are not used by Flint. I think all that needs to be done is to set CFLAG64 to be -m64 unless it is set to something else, then ensure that for a 64-bit build, FLINT_TUNE gets $CFLAG64 included. Dave |
comment:6
Done as you suggested. We pass $CFLAG64 to FLINT_TUNE if SAGE64=yes.
New spkg with the same name: Jaap |
Attachment: flint-1.5.0.p4.patch.gz |
comment:7
Your fix resolves the issues we have, and is unlikely to break anything (see below for a possible exception). I do have a few comments that are worth documenting.
Positive review. |
Merged: sage-4.3.4.alpha1 |
flint-1.5.0.p3 fails to build if SAGE64=yes and no CFLAGS and CFLAG64 are set globally due to a 32/64 bit issue.
A patch is on it's way.
http://boxen.math.washington.edu/home/jsp/ports/flint-1.5.0.p4.spkg
Jaap
Component: porting
Author: Jaap Spies
Reviewer: David Kirkby
Merged: sage-4.3.4.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/8112
The text was updated successfully, but these errors were encountered: