#9034: flintqs builds as 32-bit despite SAGE64=yes on OpenSolaris x64
----------------------------+-----------------------------------------------
Reporter: drkirkby | Owner: drkirkby
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.4.3
Component: solaris | Keywords:
Author: David Kirkby | Upstream: None of the above - read trac for
reasoning.
Reviewer: | Merged:
Work_issues: |
----------------------------+-----------------------------------------------
Description changed by drkirkby:
Old description:
> == Build environment ==
> * Sun Ultra 27 3.33 GHz Intel W3580 Xeon. Quad core. 8 threads. 12 GB
> RAM
> * !OpenSolaris 2009.06 snv_111b X86
> * Sage 4.4.2
> * gcc 4.4.4
>
> == How gcc 4.4.4 was configured ==
> Since the configuration of gcc is fairly critical on !OpenSolaris, here's
> how it was built.
>
> {{{
> drkir...@hawk:~/sage-4.4.2$ gcc -v
> Using built-in specs.
> Target: i386-pc-solaris2.11
> Configured with: ../gcc-4.4.4/configure --prefix=/usr/local/gcc-4.4.4
> --with-as=/usr/local/binutils-2.20/bin/as --with-ld=/usr/ccs/bin/ld
> --with-gmp=/usr/local --with-mpfr=/usr/local
> Thread model: posix
> gcc version 4.4.4 (GCC)
> }}}
>
> gcc 4.3.4 was failing to build iconv on !OpenSolaris x64, suggesting it
> may be essential to have a very recent gcc in order to build Sage on
> !OpenSolaris.
>
> == How the Sage build was attempted ==
> * 64-bit build. SAGE64 was set to "yes"
> * #9008 update zlib to latest upstream release to allow a 64-bit library
> to be built.
> * #9009 update mercurial spkg to build 64-bit.
> * #7982 update sage_fortran so it can build 64-bit binaries.
> * Run 'make -k' to find as many issues as possible quickly on
> !OpenSolaris - see #9026 for a list of the issues known to date.
>
> == The problem with flintqs ==
> {{{
> flintqs-20070817.p4/src/._TonelliShanks.h
> flintqs-20070817.p4/src/TonelliShanks.h
> Finished extraction
> ****************************************************
> Host system
> uname -a:
> SunOS hawk 5.11 snv_134 i86pc i386 i86pc
> ****************************************************
> ****************************************************
> CC Version
> gcc -v
> Using built-in specs.
> Target: i386-pc-solaris2.11
> Configured with: ../gcc-4.4.4/configure --prefix=/usr/local/gcc-4.4.4
> --with-as=/usr/local/binutils-2.20/bin/as --with-ld=/usr/ccs/bin/ld
> --with-gmp=/usr/local --with-mpfr=/usr/local
> Thread model: posix
> gcc version 4.4.4 (GCC)
> ****************************************************
> g++ -ansi -c lprels.c -o lprels.o
> -I/export/home/drkirkby/sage-4.4.2/local/include -Wall -Wno-sign-compare
> -fomit-frame-pointer -O3
> lprels.c: In function ‘FILE* flint_fopen(char*, char*)’:
> <snip>
> Successfully installed flintqs-20070817.p4
> }}}
>
> So no '-m64' flag is added to the g++ command line, so not surprisingly
> 'flintqs' does not build as a 64-bit binary. The output from the 'file'
> command confirms this:
>
> {{{
> drkir...@hawk:~/sage-4.4.2$ file local/bin/QuadraticSieve
> local/bin/QuadraticSieve: ELF 32-bit LSB executable 80386 Version 1
> [FPU], dynamically linked, not stripped, no debugging information
> available
> }}}
>
> == The likely reason for the flintqs problem ==
>
> spkg-install has this bit of code:
>
> {{{
> if [ `uname -m` = "x86_64" ]; then
> $CP makefile.opteron makefile
> else
> if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
> $CP makefile.osx64 makefile
> else
> $CP makefile.sage makefile
> fi
> fi
> }}}
>
> A cursory glance would suggest the 'makefile.osx64' would work for
> !OpenSolaris, Solaris or most other Unix operating systems, though this
> has not been tested yet.
New description:
== Build environment ==
* Sun Ultra 27 3.33 GHz Intel W3580 Xeon. Quad core. 8 threads. 12 GB RAM
* !OpenSolaris 2009.06 snv_134 X86
* Sage 4.4.2
* gcc 4.4.4
== How gcc 4.4.4 was configured ==
Since the configuration of gcc is fairly critical on !OpenSolaris, here's
how it was built.
{{{
drkir...@hawk:~/sage-4.4.2$ gcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc-4.4.4/configure --prefix=/usr/local/gcc-4.4.4
--with-as=/usr/local/binutils-2.20/bin/as --with-ld=/usr/ccs/bin/ld
--with-gmp=/usr/local --with-mpfr=/usr/local
Thread model: posix
gcc version 4.4.4 (GCC)
}}}
gcc 4.3.4 was failing to build iconv on !OpenSolaris x64, suggesting it
may be essential to have a very recent gcc in order to build Sage on
!OpenSolaris.
== How the Sage build was attempted ==
* 64-bit build. SAGE64 was set to "yes"
* #9008 update zlib to latest upstream release to allow a 64-bit library
to be built.
* #9009 update mercurial spkg to build 64-bit.
* #7982 update sage_fortran so it can build 64-bit binaries.
* Run 'make -k' to find as many issues as possible quickly on
!OpenSolaris - see #9026 for a list of the issues known to date.
== The problem with flintqs ==
{{{
flintqs-20070817.p4/src/._TonelliShanks.h
flintqs-20070817.p4/src/TonelliShanks.h
Finished extraction
****************************************************
Host system
uname -a:
SunOS hawk 5.11 snv_134 i86pc i386 i86pc
****************************************************
****************************************************
CC Version
gcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc-4.4.4/configure --prefix=/usr/local/gcc-4.4.4
--with-as=/usr/local/binutils-2.20/bin/as --with-ld=/usr/ccs/bin/ld
--with-gmp=/usr/local --with-mpfr=/usr/local
Thread model: posix
gcc version 4.4.4 (GCC)
****************************************************
g++ -ansi -c lprels.c -o lprels.o
-I/export/home/drkirkby/sage-4.4.2/local/include -Wall -Wno-sign-compare
-fomit-frame-pointer -O3
lprels.c: In function ‘FILE* flint_fopen(char*, char*)’:
<snip>
Successfully installed flintqs-20070817.p4
}}}
So no '-m64' flag is added to the g++ command line, so not surprisingly
'flintqs' does not build as a 64-bit binary. The output from the 'file'
command confirms this:
{{{
drkir...@hawk:~/sage-4.4.2$ file local/bin/QuadraticSieve
local/bin/QuadraticSieve: ELF 32-bit LSB executable 80386 Version 1
[FPU], dynamically linked, not stripped, no debugging information
available
}}}
== The likely reason for the flintqs problem ==
spkg-install has this bit of code:
{{{
if [ `uname -m` = "x86_64" ]; then
$CP makefile.opteron makefile
else
if [ `uname` = "Darwin" -a "$SAGE64" = "yes" ]; then
$CP makefile.osx64 makefile
else
$CP makefile.sage makefile
fi
fi
}}}
A cursory glance would suggest the 'makefile.osx64' would work for
!OpenSolaris, Solaris or most other Unix operating systems, though this
has not been tested yet.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9034#comment:5>
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.