Opened 10 years ago

Closed 9 years ago

#11504 closed defect (fixed)

Tachyon fails to build on Cygwin - again

Reported by: kcrisman Owned by: tbd
Priority: major Milestone: sage-4.7.2
Component: porting: Cygwin Keywords:
Cc: mhansen, dimpase, leif Merged in: sage-4.7.2.alpha3
Authors: Karl-Dieter Crisman Reviewers: Reg Burgess, Leif Leonhardy
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by leif)

Apparently the same problem from #7335 is back.

The fix should be the same, apparently.

New spkg: http://sage.math.washington.edu/home/kcrisman/tachyon-0.98.9.p4.spkg

(Now superseded by the [also] positively reviewed p5 from #11706, which is based on the p4 here, but among other things removes the garbage files contained in the p4, created by MacOS X's Finder.)

Attachments (1)

trac_11504.diff (3.4 KB) - added by kcrisman 10 years ago.
For review purposes only

Download all attachments as: .zip

Change History (29)

comment:1 Changed 10 years ago by kcrisman

This works on my XP. At least the VM I have.

comment:2 Changed 10 years ago by kcrisman

  • Cc mhansen dimpase added
  • Component changed from PLEASE CHANGE to cygwin
  • Status changed from new to needs_review
  • Type changed from PLEASE CHANGE to defect

There is now an spkg at http://sage.math.washington.edu/home/kcrisman/tachyon-0.98.9.p4.spkg. The fix worked on XP, will be trying on W7 soon.

Changed 10 years ago by kcrisman

For review purposes only

comment:3 Changed 10 years ago by kcrisman

  • Authors set to Karl-Dieter Crisman

This builds on Windows 7 now as well. Just needs review - the changes are only for the Windows architecture parts of the file, so it really shouldn't affect anything.

comment:4 follow-up: Changed 10 years ago by kcrisman

User "RegB" was able to use this successfully for this - see this sage-windows thread.

So this just needs someone to look at the actual spkg.

comment:5 Changed 10 years ago by kcrisman

  • Reviewers set to Reg Burgess

That is, this needs someone other than me to look at the actual spkg and its construction :) - should be very easy.

comment:6 in reply to: ↑ 4 Changed 10 years ago by kcrisman

Replying to kcrisman:

User "RegB" was able to use this successfully for this - see this sage-windows thread.

This was Vista, just FYI, but that shouldn't affect review for this issue.

comment:7 Changed 10 years ago by leif

  • Cc leif added

comment:8 Changed 10 years ago by leif

  • Reviewers changed from Reg Burgess to Reg Burgess, Leif Leonhardy

Except for

$ hg status
? .DS_Store
? ._.DS_Store
? patches/.DS_Store
? patches/._.DS_Store

and missing trailing ===s in the last five(!) Changelog entry headings (greetings from the copy-paste community), the spkg looks ok to me.

I could fix both when providing a p5 for #11706 with William's and a few more changes of mine (re)based on the p4 here, since these are rather minor issues.

comment:9 follow-up: Changed 10 years ago by leif

Also, spkg-install isn't executable and the file modes ("permissions") are quite funny.

comment:10 in reply to: ↑ 9 Changed 10 years ago by dimpase

Replying to leif:

Also, spkg-install isn't executable and the file modes ("permissions") are quite funny.

Cygwin's setting of file permissions is really LMAO... (sorry for a slightly OT comment :))

comment:11 Changed 10 years ago by leif

Karl-Dieter (or anybody else), are you sure that

    cp compile/*/tachyon "$SAGE_LOCAL/bin"

works on Cygwin, too?

Shouldn't there be an .exe extension on Cygwin / Windows?

(This is btw. a case where checking the exit code of cp really makes sense, or is crucial.)

comment:12 Changed 10 years ago by leif

  • Status changed from needs_review to needs_info

comment:13 follow-up: Changed 10 years ago by leif

Mike confirmed (currently without being able to verify / test that) that it should be tachyon.exe on Cygwin, so I changed the code to:

    ...
    if [ "$UNAME" = CYGWIN ]; then
        binary_name=tachyon.exe
    else
        binary_name=tachyon
    fi
    # The '*' is a place-holder for the arch just built (e.g. 'win32' for
    # Cygwin, other directories won't exist):
    cp -p -f src/compile/*/"${binary_name}" "$SAGE_LOCAL/bin"
    if [ $? -ne 0 ]; then
        echo "Error installing Tachyon Ray Tracer binary (\"${binary_name}\")."
        exit 1
    fi
    ...

Note that this change is only in the p5 spkg for #11706 (based on the p4 here) I'll upload in a few minutes...

comment:14 in reply to: ↑ 13 Changed 10 years ago by leif

Replying to leif:

Mike confirmed (currently without being able to verify / test that) that it should be tachyon.exe on Cygwin, so I changed the code...

Note that this change is only in the p5 spkg for #11706 (based on the p4 here) I'll upload in a few minutes...

It would be nice if someone could now test the new p5 from #11706 (which is up now) on Cygwin as well, then I can give this ticket a positive review. :)

comment:15 follow-up: Changed 10 years ago by kcrisman

Wow, this is really frustrating. I really thought I had gotten all the cruft out of these. Thank you for catching those stupid DS* files; it's almost impossible to get Mac not to put them in sometimes.

What is particularly weird is that the package installs fine, so spkg-install must have been usable, at least! Maybe the permissions were "good enough"...

As to the .exe, that doesn't seem to have been present before, so maybe Cygwin was able to use it after all? (Or maybe it just never worked and no one noticed!)

Since the current goal is to get Sage to build, then start, I hadn't even been able to check whether Tachyon worked. I did once run doctests on a functioning Sage on Cygwin, but I don't think it had a problem with Tachyon stuff. I'll try that when looking at #11706.

comment:16 in reply to: ↑ 15 Changed 10 years ago by leif

Replying to kcrisman:

What is particularly weird is that the package installs fine, so spkg-install must have been usable, at least! Maybe the permissions were "good enough"...

Well, sage-spkg always makes spkg-install executable before running it, so that's a minor issue. The other permission issues could have only caused some trouble in a multi-user environment, i.e., if the user wasn't the owner of files.


As to the .exe, that doesn't seem to have been present before, so maybe Cygwin was able to use it after all? (Or maybe it just never worked and no one noticed!)

The spkg was said to build, not Tachyon to work... ;-)

(The installation of the executable might have actually failed without anybody noticing that, because the exit code of cp wasn't checked and, worse, an unconditional exit 0 followed. The p5 spkg should still be checked on Cygwin w.r.t. this.)

comment:17 follow-up: Changed 10 years ago by kcrisman

  • Status changed from needs_info to needs_review

Ok, here is an update. This picture was generated by an alpha of 4.7.1 that has this p4 installed. Looking in local/bin/ finds tachyon.exe already there.

My guess is that Cygwin "knows" that it's supposed to be .exe as an ending and behaves accordingly? In any case, the picture is proof, as well as the result of ls local/bin/tachyo[tab].

I'll try installing the spkg at #11706 and make sure that still works. Shouldn't take long to deal with, I hope.

comment:18 in reply to: ↑ 17 Changed 10 years ago by leif

Replying to kcrisman:

I'll try installing the spkg at #11706 and make sure that still works. Shouldn't take long to deal with, I hope.

You can install it with the -s option (./sage -f -s ...) and afterwards look into the subdirectory src/compile/win32/ of the Tachyon build directory (the latter given in the message "You can safely delete ...").

comment:19 follow-up: Changed 10 years ago by kcrisman

Too late, I already just installed the whole thing and it works. See my comments at #11706.

comment:20 in reply to: ↑ 19 ; follow-up: Changed 10 years ago by leif

Replying to kcrisman:

Too late, I already just installed the whole thing and it works. See my comments at #11706.

:'( I was soooo curious...

And now I still don't know what weird magic Cygwin apparently applies (either the shell or cp) that both spkgs seem to install the .exe file.

Do you have a single tachyon.exe in $SAGE_ROOT/local/bin/ or do you have both, one with and another without the extension?

comment:21 in reply to: ↑ 20 Changed 10 years ago by kcrisman

  • Status changed from needs_review to positive_review

Replying to leif:

Replying to kcrisman:

Too late, I already just installed the whole thing and it works. See my comments at #11706.

:'( I was soooo curious...

Just for you, I restarted my virtual machine, waited a long time, and then reinstalled (-f -s) the p4 spkg, which does not have the exe. The directory in question has libtachyon, libtachyon.a, and tachyon.exe.

And I tried copying that tachyon.exe file by using cp path/to/tachyon path/to/home/ and it worked.

It's possible that Cygwin/Windows? treats exe's as folders, like Mac and .app's...

Hope that satisfies your curiosity!

And now I still don't know what weird magic Cygwin apparently applies (either the shell or cp) that both spkgs seem to install the .exe file.

Do you have a single tachyon.exe in $SAGE_ROOT/local/bin/ or do you have both, one with and another without the extension?

Just the one with exe.

comment:22 Changed 10 years ago by jdemeyer

  • Description modified (diff)

comment:23 follow-up: Changed 10 years ago by jdemeyer

  • Status changed from positive_review to needs_work

Please remove the following garbage from the spkg:

? .DS_Store
? ._.DS_Store
? patches/.DS_Store
? patches/._.DS_Store

comment:24 in reply to: ↑ 23 ; follow-up: Changed 10 years ago by leif

Replying to jdemeyer:

Please remove the following garbage from the spkg:

? .DS_Store
? ._.DS_Store
? patches/.DS_Store
? patches/._.DS_Store

Cf. this comment.

The spkg here is superseded by the p5 at #11706 anyway, in which these files aren't present.

comment:25 in reply to: ↑ 24 ; follow-up: Changed 10 years ago by jdemeyer

Replying to leif:

The spkg here is superseded by the p5 at #11706 anyway, in which these files aren't present.

True, but that ticket does not yet have positive review.

comment:26 in reply to: ↑ 25 ; follow-up: Changed 10 years ago by kcrisman

Replying to jdemeyer:

Replying to leif:

The spkg here is superseded by the p5 at #11706 anyway, in which these files aren't present.

Leif already noticed these files above, and I already apologized :)

True, but that ticket does not yet have positive review.

Presumably someone at the Sage Days can do this. I think that whoever is funding that PPC Linux box is also funding that workshop. (?)

I don't see the point in making a new spkg when several other issues that needed addressing are taken care of in #11706. If that ticket languishes I will do this, though.

comment:27 in reply to: ↑ 26 Changed 10 years ago by leif

  • Description modified (diff)
  • Status changed from needs_work to positive_review

Replying to kcrisman:

Replying to jdemeyer:

Replying to leif:

The spkg here is superseded by the p5 at #11706 anyway, in which these files aren't present.

Leif already noticed these files above, and I already apologized :)

True, but that ticket does not yet have positive review.

Now it does have, so I consider this a minor issue which doesn't have to be fixed here, too.

Therefore setting this ticket back to positive review, as I made #11706 formally depend on this one.

comment:28 Changed 9 years ago by leif

  • Merged in set to sage-4.7.2.alpha3
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.