#7156: prereq-0.4 has a minor portability issue.
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |       Owner:  tbd       
       Type:  defect    |      Status:  new       
   Priority:  trivial   |   Milestone:  sage-4.1.3
  Component:  porting   |    Keywords:            
Work_issues:            |      Author:            
   Reviewer:            |      Merged:            
------------------------+---------------------------------------------------
 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.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7156>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to