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

prereq-0.4 has a minor portability issue #7156

Closed
sagetrac-drkirkby mannequin opened this issue Oct 8, 2009 · 1 comment
Closed

prereq-0.4 has a minor portability issue #7156

sagetrac-drkirkby mannequin opened this issue Oct 8, 2009 · 1 comment

Comments

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Oct 8, 2009

My recently updated prereq-0.4 #7021 has a minor portability issue, which existed in version 0.3 too. If run on HP-UX, which the 'uname' command does not support the -p option needed to get the processor, so generates the following message:

Starting prerequisite check.
Machine: HP-UX hpbox B.11.11 U 9000/785 2016698240 unlimited-user license
uname: illegal option -- p
usage: uname [-amnrsvil] [-S nodename]

The reason is quite simple. The code which checks for an operating system which is not Solaris SPARC uses this:


    elif [ `uname` = "SunOS" -a "`uname -p`" != "sparc" ]; then
        echo "Building or using Sage on non-Sparc Solaris is tricky and not supported"
        echo "at the moment. It is possible, but you should be well aware that"
        echo "some things do not work. Support for Solaris"
        echo "on non-SPARC hardware is actively being worked on."
        echo "To get past this message, export the variable SAGE_PORT to"
        echo "something non-empty."
        exit 1
    elif [ `uname` = "HP-UX" ]; then

It would better be changed to

    elif [ `uname` = "SunOS" ]; then
       # The -p option to 'uname' is not portable (HP-UX does not support it for example)
       # So it is safer to test for Solaris first, then test for the processor with the
       # -p option if necessary.
       if [ "`uname -p`" != "sparc" ]; then
          echo "Building or using Sage on non-Sparc Solaris is tricky and not supported"
          echo "at the moment. It is possible, but you should be well aware that"
          echo "some things do not work. Support for Solaris"
          echo "on non-SPARC hardware is actively being worked on."
          echo "To get past this message, export the variable SAGE_PORT to"
          echo "something non-empty."
          exit 1
       fi
    elif [ `uname` = "HP-UX" ]; then

which would then only use the -p option on Solaris.

I'll update this at one point in the future. I expect I'll get some feedback from the prereq-0.4, so I'll created a 0.5 at some time in the future.

This does not actually terminate the build process on HP-UX, so even for a port, it is not a big issue.

Component: porting

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

@sagetrac-drkirkby sagetrac-drkirkby mannequin added this to the sage-4.3 milestone Oct 8, 2009
@mwhansen
Copy link
Contributor

comment:1

Fixed by #7352

@sagetrac-mvngu sagetrac-mvngu mannequin changed the title prereq-0.4 has a minor portability issue. prereq-0.4 has a minor portability issue Dec 26, 2009
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

1 participant