Skip to content
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

sage --version hangs on MacOS #15072

Closed
anneschilling opened this issue Aug 21, 2013 · 16 comments
Closed

sage --version hangs on MacOS #15072

anneschilling opened this issue Aug 21, 2013 · 16 comments

Comments

@anneschilling
Copy link

sage --version hangs in sage-5.12.beta1 on MacOS. It still works with sage-5.11.

The sage script uses

sed -n -e 's/.*\(Sage Version.*Date: [0-9-]*\).*/\1/p' ./sage-banner

which hangs. This is probably caused by #14733.

This causes the sage-combinat script to fail.

Apply attachment: trac_15072_OSX_sed_workaround.patch to the SAGE_ROOT repo.

Component: scripts

Author: Volker Braun

Reviewer: Jeroen Demeyer

Merged: sage-5.12.beta4

Issue created by migration from https://trac.sagemath.org/ticket/15072

@anneschilling

This comment has been minimized.

@anneschilling

This comment has been minimized.

@vbraun
Copy link
Member

vbraun commented Aug 21, 2013

comment:3

See also https://groups.google.com/d/msg/sage-release/TbSd9Lm5EHE/YjcphaIJ_nwJ

Though it did work on the buildbot, so there must be something specific to the OSX machines where it fails.

@vbraun
Copy link
Member

vbraun commented Aug 21, 2013

comment:4

On bsd.math:

cloud:~ vbraun$ cat sage-banner 
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 5.12.beta2, Release Date: 2013-08-20                  │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
cloud:~ vbraun$ sed -n -e 's/.*\(Sage Version.*Date: [0-9-]*\).*/\1/p' ./sage-banner
Sage Version 5.12.beta2, Release Date: 2013-08-20
cloud:~ vbraun$ echo $LANG

cloud:~ vbraun$ LANG=C sed -n -e 's/.*\(Sage Version.*Date: [0-9-]*\).*/\1/p' ./sage-banner
Sage Version 5.12.beta2, Release Date: 2013-08-20
cloud:~ vbraun$ LANG=fr sed -n -e 's/.*\(Sage Version.*Date: [0-9-]*\).*/\1/p' ./sage-banner
Sage Version 5.12.beta2, Release Date: 2013-08-20
cloud:~ vbraun$ LANG=en_US sed -n -e 's/.*\(Sage Version.*Date: [0-9-]*\).*/\1/p' ./sage-banner
^C

The last one hangs, sed on OSX has apparently some serious braindamage.

@jdemeyer
Copy link

comment:6

Proposal: run

export LC_ALL=C

before running that sed command.

@vbraun
Copy link
Member

vbraun commented Aug 21, 2013

comment:7

More discussion here, apparently there are a number of issues with sed on OSX 10.8: Homebrew/legacy-homebrew#13787

Just LC_CTYPE=C is enough, so I'll patch it with that.

@vbraun vbraun removed the c: porting label Aug 21, 2013
@vbraun

This comment has been minimized.

@vbraun
Copy link
Member

vbraun commented Aug 21, 2013

Author: Volker Braun

@anneschilling
Copy link
Author

comment:9

Replying to @jdemeyer:

Proposal: run

export LC_ALL=C

before running that sed command.

That seems to work!

@jdemeyer
Copy link

comment:10

Replying to @vbraun:

Just LC_CTYPE=C is enough, so I'll patch it with that.

I would use LC_ALL since that overrides LC_CTYPE (in case both are set). The following still hangs:

LC_CTYPE=C LC_ALL=en_US sed -n -e 's/.*\(Sage Version.*Date: [0-9-]*\).*/\1/p' ./sage-banner

@jdemeyer
Copy link

comment:11

Also, in the comment OSX 10.8 is inaccurate, as it occurs also with OSX 10.6

@vbraun
Copy link
Member

vbraun commented Aug 21, 2013

Updated patch

@vbraun
Copy link
Member

vbraun commented Aug 21, 2013

comment:12

Attachment: trac_15072_OSX_sed_workaround.patch.gz

I hope OSX doesn't set LC_ALL by default, that would be even more WTF. I would put it into the category of settings that ought to break things since you explicitly asked for it to be broken.

In any case, I switched to overriding LC_ALL and don't refer to 10.8 any more.

@jdemeyer
Copy link

comment:13

Replying to @vbraun:

I hope OSX doesn't set LC_ALL by default

I was thinking that a user might have set it.

@jdemeyer
Copy link

Reviewer: Jeroen Demeyer

@jdemeyer
Copy link

Merged: sage-5.12.beta4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants