#9098: gap buillds 32-bit on OpenSolaris when SAGE64=yes
----------------------------+-----------------------------------------------
   Reporter:  drkirkby      |       Owner:  drkirkby    
       Type:  defect        |      Status:  needs_review
   Priority:  major         |   Milestone:  sage-4.4.4  
  Component:  solaris       |    Keywords:              
     Author:  David Kirkby  |    Upstream:  N/A         
   Reviewer:                |      Merged:              
Work_issues:                |  
----------------------------+-----------------------------------------------
Changes (by newvalueoldvalue):

 * cc: jsp (added)
  * status:  new => needs_review
  * author:  => David Kirkby


Comment:

 Having looked at this more, I decided to ignore all the warnings in spkg-
 install, but only make the needed changes on Solaris. Hence the changes
 will not add '-m64' on OS X, FreeBSD or any other system apart from
 Solaris and !OpenSolaris.

 The revised .spkg may be found here.

 http://boxen.math.washington.edu/home/kirkby/patches/gap-4.4.12.p4.spkg

 The changes have been checked on the following systems. In each case, it
 was verified that gap worked.
  * Linux (64-bit)
  * !OpenSolaris x64 (64-bit)
  * Solaris 10 SPARC (32-bit)
  * Solaris 10 SPARC (64-bit)

 See below for further details of tests.
  == Linux (sage.math.washington.edu) ==
 {{{
 gcc -I. -I../.. -DCONFIG_H -Wall -g -O2  -o iostream.o -c
 ../../src/iostream.c
 gcc -I. -I../.. -DCONFIG_H -Wall -g -O2  -o float.o -c ../../src/float.c
 gcc -Wall -g -O2  -g -export-dynamic  -o gap ariths.o blister.o bool.o
 c_meths1.o c_type1.o c_oper1.o c_filt1.o c_random.o calls.o code.o
 compiler.o compstat.o costab.o cyclotom.o dt.o dteval.o exprs.o finfield.o
 funcs.o gap.o gasman.o gvars.o integer.o intrprtr.o listfunc.o listoper.o
 lists.o objcftl.o objects.o objfgelm.o objpcgel.o objscoll.o objccoll.o
 opers.o permutat.o plist.o precord.o range.o rational.o read.o records.o
 saveload.o scanner.o sctable.o set.o stats.o streams.o string.o sysfiles.o
 system.o tietze.o vars.o vecgf2.o vec8bit.o vector.o vecffe.o weakptr.o
 iostream.o float.o   -lm    -ldl
 make[1]: Leaving directory
 `/home/kirkby/sage-4.4.3/spkg/build/gap-4.4.12.p4/src/bin/x86_64-unknown-
 linux-gnu-gcc'
 chmod +x bin/gap.sh
 if ! grep darwin sysinfo.gap ; then ( cd bin/x86_64-unknown-linux-gnu-gcc
 ; strip gap) ; fi

 real    1m3.882s
 user    0m47.790s
 sys     0m7.500s
 Successfully installed gap-4.4.12.p4
 Now cleaning up tmp files.
 Making Sage/Python scripts relocatable...
 Making script relocatable
 Finished installing gap-4.4.12.p4.spkg
 kir...@sage:~/sage-4.4.3$ uname -a
 Linux sage.math.washington.edu 2.6.24-26-server #1 SMP Tue Dec 1 18:26:43
 UTC 2009 x86_64 GNU/Linux
 }}}

  == !OpenSolaris 64-bit 06/2009 ('hawk' a Sun Ultra 27) ==
 {{{
 make[1]: Leaving directory
 `/export/home/drkirkby/sage-4.4.4.alpha0/spkg/build/gap-4.4.12.p4/src/bin/i386
 -pc-solaris2.11-gcc'
 chmod +x bin/gap.sh
 if ! grep darwin sysinfo.gap ; then ( cd bin/i386-pc-solaris2.11-gcc ;
 strip gap) ; fi

 real    0m35.057s
 user    0m30.127s
 sys     0m4.371s
 Successfully installed gap-4.4.12.p4
 Now cleaning up tmp files.
 rm: Cannot remove any directory in the path of the current working
 directory
 /export/home/drkirkby/sage-4.4.4.alpha0/spkg/build/gap-4.4.12.p4
 Making Sage/Python scripts relocatable...
 Making script relocatable
 Finished installing gap-4.4.12.p4.spkg
 }}}
 We can see there is a 64-bit executable
 {{{
 drkir...@hawk:~/sage-4.4.4.alpha0$ find . -name gap
 ./spkg/standard/gap-4.4.12.p4/patches/gap
 ./local/lib/gap-4.4.12/bin/i386-pc-solaris2.11-gcc/gap
 ./local/bin/gap
 ./data/extcode/gap
 ./data/extcode/.hg/data/gap
 }}}

 Although I do not know how to call gap from Sage, the program runs at the
 command line and is at least able to calculate something.
 {{{
 drkir...@hawk:~/sage-4.4.4.alpha0$ ./local/bin/gap
 Set the environment variable SAGE_ROOT.
 drkir...@hawk:~/sage-4.4.4.alpha0$ export SAGE_ROOT=.
 drkir...@hawk:~/sage-4.4.4.alpha0$ ./local/bin/gap

             #########           ######         ###########           ###
          #############          ######         ############         ####
         ##############         ########        #############       #####
        ###############         ########        #####   ######      #####
       ######         #         #########       #####    #####     ######
      ######                   ##########       #####    #####    #######
      #####                    ##### ####       #####   ######   ########
      ####                    #####  #####      #############   ###  ####
      #####     #######       ####    ####      ###########    ####  ####
      #####     #######      #####    #####     ######        ####   ####
      #####     #######      #####    #####     #####         #############
       #####      #####     ################    #####         #############
       ######     #####     ################    #####         #############
       ################    ##################   #####                ####
        ###############    #####        #####   #####                ####
          #############    #####        #####   #####                ####
           #########      #####          #####  #####                ####

      Information at:  http://www.gap-system.org
      Try '?help' for help. See also  '?copyright' and  '?authors'

    Loading the library. Please be patient, this may take a while.
 GAP4, Version: 4.4.12 of 17-Dec-2008, i386-pc-solaris2.11-gcc -m64
 gap> 10^20 + 1;
 100000000000000000001
 gap>
 }}}

 == Solaris 10 (SPARC) 32-bit ('redstart' a Sun Blade 1000) ==
 On a SPARC in 32-bit mode (the only Solaris system which works fully with
 Sage), we can see that gap builds ok.
 {{{
 .o vec8bit.o vector.o vecffe.o weakptr.o iostream.o float.o   -lm
 make[1]: Leaving directory
 `/export/home/drkirkby/32/sage-4.4.3/spkg/build/gap-4.4.12.p4/src/bin
 /sparc-sun-solaris2.10-gcc'
 chmod +x bin/gap.sh
 if ! grep darwin sysinfo.gap ; then ( cd bin/sparc-sun-solaris2.10-gcc ;
 strip gap) ; fi
 /bin/sh: !: not found

 real    5m15.428s
 user    4m42.147s
 sys     0m26.935s
 Successfully installed gap-4.4.12.p4
 Now cleaning up tmp files.
 rm: Cannot remove any directory in the path of the current working
 directory
 }}}
 Again, gap can be seen to work, but this time in 32-bit mode.
 {{{
 drkir...@redstart:~/32/sage-4.4.3$ export SAGE_ROOT .
 -bash: export: `.': not a valid identifier
 drkir...@redstart:~/32/sage-4.4.3$ export SAGE_ROOT=.
 drkir...@redstart:~/32/sage-4.4.3$ local/bin/gap

             #########           ######         ###########           ###
          #############          ######         ############         ####
         ##############         ########        #############       #####
        ###############         ########        #####   ######      #####
       ######         #         #########       #####    #####     ######
      ######                   ##########       #####    #####    #######
      #####                    ##### ####       #####   ######   ########
      ####                    #####  #####      #############   ###  ####
      #####     #######       ####    ####      ###########    ####  ####
      #####     #######      #####    #####     ######        ####   ####
      #####     #######      #####    #####     #####         #############
       #####      #####     ################    #####         #############
       ######     #####     ################    #####         #############
       ################    ##################   #####                ####
        ###############    #####        #####   #####                ####
          #############    #####        #####   #####                ####
           #########      #####          #####  #####                ####

      Information at:  http://www.gap-system.org
      Try '?help' for help. See also  '?copyright' and  '?authors'

    Loading the library. Please be patient, this may take a while.
 GAP4, Version: 4.4.12 of 17-Dec-2008, sparc-sun-solaris2.10-gcc
 gap> 12+2;
 14
 gap>
 }}}
 == Solaris 10 (SPARC) 64-bit ('redstart' a Sun Blade 1000) ==
 Although little effort has been put into a 64-bit port to Solaris 10 on
 SPARC, changes made to build OpenSolaris x64 will usually benefit Solaris
 10 on SPARC too. We can see gap builds 64-bit.
 {{{
 drkir...@redstart:~/32/sage-4.4.3$ export SAGE_ROOT=.
 drkir...@redstart:~/32/sage-4.4.3$ local/bin/gap

             #########           ######         ###########           ###
          #############          ######         ############         ####
         ##############         ########        #############       #####
        ###############         ########        #####   ######      #####
       ######         #         #########       #####    #####     ######
      ######                   ##########       #####    #####    #######
      #####                    ##### ####       #####   ######   ########
      ####                    #####  #####      #############   ###  ####
      #####     #######       ####    ####      ###########    ####  ####
      #####     #######      #####    #####     ######        ####   ####
      #####     #######      #####    #####     #####         #############
       #####      #####     ################    #####         #############
       ######     #####     ################    #####         #############
       ################    ##################   #####                ####
        ###############    #####        #####   #####                ####
          #############    #####        #####   #####                ####
           #########      #####          #####  #####                ####

      Information at:  http://www.gap-system.org
      Try '?help' for help. See also  '?copyright' and  '?authors'

    Loading the library. Please be patient, this may take a while.
 GAP4, Version: 4.4.12 of 17-Dec-2008, sparc-sun-solaris2.10-gcc -m64
 gap>  s8 := Group( (1,2), (1,2,3,4,5,6,7,8) );
 Group([ (1,2), (1,2,3,4,5,6,7,8) ])
 gap> a8 := DerivedSubgroup( s8 );
 Group([ (1,2,3), (2,3,4), (2,4)(3,5), (2,6,4), (2,4)(5,7), (2,8,6,4)(3,5)
 ])
 gap> Size( a8 ); IsAbelian( a8 ); IsPerfect( a8 );
 20160
 false
 true
 gap>
 }}}
 We can see that the binary created is indeed 64-bit:

 {{{
 drkir...@redstart:~/32/sage-4.4.3$ file ./local/bin/gap
 ./local/bin/gap:        executable shell script
 drkir...@redstart:~/32/sage-4.4.3$ file ./local/lib/gap-4.4.12/bin/sparc-
 sun-solaris2.10-gcc/gap
 ./local/lib/gap-4.4.12/bin/sparc-sun-solaris2.10-gcc/gap:       ELF 64-bit
 MSB executable SPARCV9 Version 1, dynamically linked, not stripped, no
 debugging information available
 drkir...@redstart:~/32/sage-4.4.3$
 }}}

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