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
check XCode version on MacOSX, and bail out if it is 4 #11280
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
With XCode 2.4:
so in the patch $XCODE_VERS (and $XCODE_VERS_MAJOR) end up being empty. A more reliable way to check for the version might be what Macports is doing - essentially that's
which prints "2.4" for me. |
comment:3
Replying to @sagetrac-logix:
One can, I suppose, just do
OK, you can't build Sage with XCode 2, anyway, right? |
comment:4
Replying to @dimpase:
Well, technically in this case we might even be seeing XCode 1, but I suppose that that check will do in practice - at least if your check works with even the oldest XCode 3.x versions.
The last time I tried, it worked, but that was almost a year ago (Sage 4.4.3). I haven't tried since then, but I'll see if I manage to do so within the next couple of days. |
comment:6
Replying to @sagetrac-logix: I updated the patch to handle cases of Xcode's major version less than 3. |
Author: Dmitrii Pasechnik |
comment:8
Doesn't break anything on OS X 10.4 PPC.
|
comment:9
If this Xcode version checking is performed, then the version of prereq needs to be incremented to 0.9, otherwise we are going to have different code with the same version number. That means creating a new tar file (prereq-0.8.tar), and changing the TARGET at the top of prereq-0.9-install to:
Also, I think the bit of code following:
should make it clear not to install Xcode 4. Although the message says to use the latest Xcode 3, someone reading it is likely to interpret that as to just upgrade. Also, why use the -e option to sed? That's for when you want to specify the name of a script. If you put the script inline, as you have done here, the -e can be removed. Dave |
comment:10
Replying to @sagetrac-drkirkby:
Sorry Dave, you're wrong here (you are confusing with |
comment:11
Replying to @jdemeyer:
Yes, I was.
Agreed, but it can still be removed. It's pointless having it. |
comment:12
Replying to @sagetrac-drkirkby:
The new tar file should be prereq-0.9.tar of course and not prereq-0.8.tar as I stated. Dave |
comment:13
Replying to @sagetrac-drkirkby:
Well, I don't follow the 0.9 vs 0.8 question. I really have no idea what you are talking about, in this respect. I'll fix the point that "latest" must mean "latest, but not Xcode 4", that's easy. Dima |
comment:14
Replying to @dimpase:
Dima, The way Sage checks it's prerequisites is not my idea of a good way, but this is how it works:
You are editing a script (currently prereq-0.8-install). Once edited, the version number of that script needs to be incremented, like one does whenever one makes changes to software. The most obvious name in this case would appear to be rename that script to prereq-0.9-install. (Since it under revision control, that needs to be done in Mercurial) The top of the script has a name hard-coded. That will need the obvious edit. i.e. change
to
The script opens a tar file - if you look down lower you can see the line:
So when you change the TARGET, the script will try to open a tar with a different name. So basically
Then make your changes to the script prereq-0.8-install, rename it to prereq-0.9-install, then use Mercurial to rename the prereq-0.8-install script. I don't know how to do that, though I suspect it is something like
but you will need to check that. You don't need to rename the tar file in Mercurial as that's listed in .hgignore. So basically you need to ensure that
BTW, if you want to close another bug (#8566) you can delete the character "m" from the line
as that has caused portability issues for a minimal Linux system (slitaz linux), and serves no useful purpose in Sage. It's an unusual process this script. I did not design it, and I don't like it. (Personally I would have used autoconf at the top level to create a " Dave |
comment:15
Replying to @sagetrac-logix:
XCode 2.4.1 worked just fine up through 4.7.alpha5 (and probably the problems I'm having with rc1 are unrelated to XCode/gcc), and 2.5 is the last one available for OS X 10.4. I think that this needs to be changed to indicate that. |
This comment has been minimized.
This comment has been minimized.
comment:18
Replying to @sagetrac-drkirkby: Dave, I followed your explanations and created a patch that replaces the current prereq-0.8-install with the I also cannot figure out how to make the patch respect executable permissions of prereq-0.9-install. |
Attachment: trac_11280_xcode4unsupported.patch.gz export with --git to record file permissions |
comment:19
Replying to @dimpase:
sorted out this (needed to do hg export --git ...) The updated patch should respect this. |
comment:20
Wow that was a lot more than I was expecting - nice. Question:
Are you trying to trip this warning for !XCode 3 as well, just as a warning to anyone who is potentially interested in upgrading, or to someone who doesn't have the latest 3.x? I assume this is the case, just checking. |
comment:21
Replying to @dimpase:
Yes, you do. Since it will be quite large, its probably best if you just provide a link to it. Then a reviewer should be able to drop the new tar file in place, delete the old tar file and apply the patch.
From what I later read, you have sorted that out. I suggest you provide a link to the tar file and then mark this for review. I don't have OS X myself, but I can look through the changes. Dave |
Reviewer: David Kirkby |
comment:22
OK, here comes the updated thing, ready to be tested. |
This comment has been minimized.
This comment has been minimized.
comment:23
This looks good to me. I can't test it on an OS X system with the different Xcode versions, so I'm relying on the assumption that the method for determinding the version is OK on Os X. But the script has a new version number, has the right permissions and extracts the right tar file. Dave |
Merged: sage-4.7.rc2 |
comment:25
As a result of this closure, #8566 can be marked as closed and fixed. Dave |
Currently, XCode 4 (namely, version 4.0.1) produces a Sage executable that crashes on startup. Here we patch prereqs to guard against it.
Please see http://groups.google.com/group/sage-devel/browse_thread/thread/54e9c5216ad6451f for more details.
This patch also takes care of #8566.
The patch should be applied in SAGEROOT/spkg/base, using hg import
In same directory, one should place
http://boxen.math.washington.edu/home/dima/patches/prereq-0.9.tar
(and remove prereq-0.8.tar; prereq-0.9/ is an exact copy of prereq-0.8/, only
renamed)
PS. If you want to test this in existing Sage installation, you can start
../../sage -sh in SAGEROOT/spkg/base, untar prereq-0.9.tar, and start ./prereq-0.9-install
CC: @sagetrac-drkirkby @williamstein @jasongrout @jdemeyer @kcrisman
Component: build
Keywords: XCode 4
Author: Dmitrii Pasechnik
Reviewer: David Kirkby
Merged: sage-4.7.rc2
Issue created by migration from https://trac.sagemath.org/ticket/11280
The text was updated successfully, but these errors were encountered: