#13341 closed defect (fixed)
GAP's spkg-install fails on recent Cygwin
Reported by: | jpflori | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-5.3 |
Component: | porting: Cygwin | Keywords: | cygwin gap spkg |
Cc: | dimpase | Merged in: | sage-5.3.rc1 |
Authors: | Jean-Pierre Flori, Leif Leonhardy | Reviewers: | Dmitrii Pasechnik |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
The ln trick to symlink gap and gap.exe which used to be needed now fails and stop the installation.
Use spkg at http://boxen.math.washington.edu/home/jdemeyer/spkg/gap-4.4.12.p8.spkg
Attachments (2)
Change History (16)
Changed 10 years ago by
comment:1 Changed 10 years ago by
- Description modified (diff)
- Status changed from new to needs_review
comment:2 follow-up: ↓ 3 Changed 10 years ago by
- Summary changed from Gap spkg fails on recent Cygwin to GAP's spkg-install fails on recent Cygwin
Rather than expressing hope, how about testing for the presence of gap
? ;-)
You could also just use ln -sf ...
("force"), which doesn't fail if the source (second parameter) already exists, i.e., with -f
a new link is created regardless. No idea how that behaves on Cygwin with "virtual" files; it may create a cycle (symbolic link from 'gap.exe' to itself), or fail in other ways, then hopefully raising an error...
(Note that ln -s <non-existent-1> <non-existent-2>
does not fail, but instead creates a "dead" symbolic link [although not sure about that on Cygwin, since we use touch
to create a dummy target]. So you may also have to check whether the target, gap.exe
, really exists, i.e., the "build" so far succeeded, here meaning mkdir
, cd
and touch
worked... :-) )
If you don't want to use the "force" option, you could instead do
mkdir -p bin/i686-pc-cygwin-gcc && cd bin/i686-pc-cygwin-gcc && touch gap.exe && (test -f gap || ln -s gap.exe gap) # Probably don't use '-x' # since 'gap.exe' is yet a dummy. if [[ $? -ne 0 ]]; then # *Something* really went wrong... ... exit 1
But perhaps it's better to at least slightly untangle the command chain:
mkdir -p bin/i686-pc-cygwin-gcc && cd bin/i686-pc-cygwin-gcc && touch gap.exe if [[ $? -ne 0 ]]; then # Some serious error... ... exit 1 fi # We may need a link from 'gap' to 'gap.exe', since the former later gets # stripped by GAP. # On newer Cygwins, 'gap' is automatically "translated" to 'gap.exe', # such that 'ln' (without '-f') would fail (and we don't have to create the # link on these systems anyway, since 'strip gap' there works without it). if [[ ! -f gap ]]; then ln -s gap.exe gap # May check exit status here, since the above should never fail. fi
comment:3 in reply to: ↑ 2 Changed 10 years ago by
Replying to leif:
Rather than expressing hope, how about testing for the presence of
gap
? ;-)
Good point, let's do something more sensible. I prefer your two second solutions. Maybe more the last one, although I'm not sure the first exit code test is really needed. But ok it does not hurt.
comment:4 Changed 10 years ago by
- Status changed from needs_review to needs_work
- Work issues set to use better script
comment:5 Changed 10 years ago by
- Status changed from needs_work to needs_review
- Work issues use better script deleted
Spkg updated.
comment:6 Changed 10 years ago by
Mmm something got broken in the last spkg, please disregard it.
comment:7 Changed 10 years ago by
This should be fixed now.
comment:9 in reply to: ↑ 8 Changed 10 years ago by
Replying to jpflori:
Anyone reviewing this?
I'll test that it builds on CYGWIN, and that ./sage -gap works. That's the best I can do on the current Win7 system I have access to.
comment:10 Changed 10 years ago by
- Status changed from needs_review to positive_review
All good, as far as I see.
comment:11 Changed 10 years ago by
- Milestone changed from sage-5.3 to sage-5.4
- Reviewers set to Dmitrii Pasechnik
comment:12 Changed 10 years ago by
- Merged in set to sage-5.3.rc1
- Resolution set to fixed
- Status changed from positive_review to closed
comment:13 Changed 10 years ago by
- Milestone changed from sage-5.4 to sage-5.3
comment:14 Changed 10 years ago by
- Description modified (diff)
Spkg diff, for review only.