Closed bac7d3ea-3f1b-4826-8464-f0b53d5e12d2 closed 14 years ago
For other OpenSolaris issues, see #9026
As this is never linked in directly, there is no need (or advantage, as far as I can tell) to build this 64-bit for a fully functional Sage.
Author: David Kirkby
Replying to @robertwb:
As this is never linked in directly, there is no need (or advantage, as far as I can tell) to build this 64-bit for a fully functional Sage.
I agree there is no technical advantage in using rubiks 64-bit.
However, it seems rather unprofessional to have 4 out of the 6 binaries building 64-bit, and two of them building 32-bit. Having all rubiks binaries made 64-bit allows one to quickly find any binaries from any packages that are not being built properly, using a command like
$ find local -exec file {} \; | grep 32-bit
as such, I believe it's desirable that a 64-bit build on OpenSolaris, Solaris or any other operating system for that matter creates only 64-bit objects.
A revised package, which add the -m64 flag to the makefile is at
http://boxen.math.washington.edu/home/kirkby/patches/rubiks-20070912.p11.spkg
There were a lot of files not in the repository (I believe this was my fault months ago), which I've checked in. As such, the patch is a lot longer than it needs to be to fix this particular problem.
The following line:
CFLAGS = -O -DLARGE_MEM -DVERBOSE
gets be changed to:
CFLAGS = ${CFLAG64} -O -DLARGE_MEM -DVERBOSE
using 'sed'.
$CFLAG64 is then set to -m64 if building 64-bit, so the -m64 gets added to the makefile.
After building all the rubiks binaries are 64-bit. i.e.
drkirkby@hawk:~/sage-4.4.2$ file local/bin/size222
local/bin/size222: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped, no debugging information available
drkirkby@hawk:~/sage-4.4.2$ file local/bin/dikcube
local/bin/dikcube: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped, no debugging information available
Previously both were being built 32-bit (see the output of the find command shown above, where clearly there was a mix of 32-bit and 64-bit objects).
This has been compiled on sage.math and bsd.math as well as my own Sun Ultra 27 running OpenSolaris.
Dave
Attachment: rubiks-64-bit.patch.gz
Mercurial patch to ensure all files build 64-bit on OpenSolaris
Reviewer: Jaap Spies
Is ok for me. Positive review.
Jaap
Merged: sage-4.5.alpha0
Description changed:
---
+++
@@ -38,8 +38,8 @@
Building Rubiks cube solvers
for dir in dietz/cu2 dietz/mcube dietz/solver dik reid; do \
- (cd ${dir} && make all)\
- done
+(cd ${dir} && make all)\
+done
make[1]: Entering directory `/export/home/drkirkby/sage-4.4.2/spkg/build/rubiks-20070912.p10/src/dietz/cu2'
g++ -O2 -m64 -g -Wall -c cu2.cpp
g++ -O2 -m64 -g -Wall -c main.cpp
@@ -60,9 +60,9 @@
drkirkby@hawk:~/sage-4.4.2$ file local/bin/size222 -local/bin/size222: ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, not stripped, no debugging information available +local/bin/size222: ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, not stripped, no debugging information available drkirkby@hawk:~/sage-4.4.2$ file local/bin/optimal -local/bin/optimal: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped +local/bin/optimal: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped
I expect this would happen on any platform where the default is 32-bit, suggesting to me this never even worked 64-bit on OS X systems where 32-bit was the default.
'rubiks' has code to attempt to build it 64-bit, but that does not seem to be fully functional, as parts are built 32-bit and parts are built 64-bit.
When we check files, I note some are built 32-bit and some are built 64-bit.
I expect this would happen on any platform where the default is 32-bit, suggesting to me this never even worked 64-bit on OS X systems where 32-bit was the default.
Dave
CC: @jaapspies
Component: porting: Solaris
Author: David Kirkby
Reviewer: Jaap Spies
Merged: sage-4.5.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/9030