#10288: Experimental package 'CHomP' fails to install on OpenSolaris x86
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |       Owner:  drkirkby  
       Type:  defect    |      Status:  needs_work
   Priority:  major     |   Milestone:  sage-4.6.1
  Component:  solaris   |    Keywords:            
     Author:            |    Upstream:  N/A       
   Reviewer:            |      Merged:            
Work_issues:            |  
------------------------+---------------------------------------------------
Changes (by drkirkby):

  * status:  needs_review => needs_work


Comment:

 Johh,

 your patch clearly works for a 32-bit build on !OpenSolaris, though I'm
 not sure its the best solution to the problem. I think it would be better
 to make the automatic operating-system detection work, which means the
 problem can be reported upstream, and get fixed.

 That's easily done by checking if {{{sun}}} is defined, rather than
 checking if {{{__sparc__}}} is defined.

 {{{
 --- ./src/include/capd/capd/operatingSystemSetting.h    Wed Jul  2
 12:50:10 2008
 +++ ./patches/operatingSystemSetting.h  Fri Nov 19 02:24:23 2010
 @@ -59,8 +59,8 @@
  #    error The Interval library does not work on the Linux/Sparc
 combination.
  #  endif

 -// Is the target processor a Sparc one? If so, assume the system is Sun
 OS.
 -#elif defined (__sparc__)
 +// If 'sun' is defined, which it is by both Sun Studio and gcc, then
 assume Solaris.
 +#elif defined (sun)
  #  define SUN_OS
  #endif
 }}}

 This can then remove the Solaris operating system specific patch in spkg-
 install.

 Another problem is that there's no code to handle 64-bit on any Solaris
 platform, or probably on OS X too, as the variable SAGE64 is never used. I
 tried fixing that by exporting CXXFLAGS, with the following code:

 {{{
 if [ "x$CXXFLAG64" = x ] ; then
    CXXFLAG64=-m64
 fi

 if [ "x$SAGE64" = xyes ] ; then
    CXX="$CXXFLAGS CXXFLAG64"
    export CXXFLAGS
 fi
 }}}

 Unfortunately, the compiler g++ is hard-coded in most of the Makefiles and
 CXXFLAGS is ignored. Although I've not checked it, I think editing
 src/make/config/sun from its previous version:

 {{{
 CXX = g++
 COMPILE = $(CXX) -O2 -ansi -pedantic -Wall
 LINK    = $(CXX) -s
 LINKGUI = $(CXX) -s
 }}}

 with

 {{{
 COMPILE = $(CXX) $(CXXFLAGS) -O2 -ansi -pedantic -Wall
 LINK    = $(CXX) $(CXXFLAGS) -s
 LINKGUI = $(CXX) $(CXXFLAGS) -s
 }}}

 Then it should use the -m64 option when building all objects if
 {{{SAGE64=yes}}}

 Reading the web site, it would appear on Macs one needs to use:

 {{{
 case `uname` in
     "Darwin")
         target='mac';;
 }}}

 I can't find any reference to 'mac' in any makefile, or anywhere else for
 that matter. (I used the -R option to GNU grep). It seems to me setting
 'target=mac' is doing absolutely nothing.

 I've late here and I need some sleep, but there were a few things I found
 that were wrong.
 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10288#comment:3>
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