Hi,
   So, I rebuilt clisp and then maxima built properly. Regarding the
sage error, I tried to build gmp-4.2.1 using a gcc wrapper where I eat
up the -m64 argument. This wrapper internally calls /usr/bin/gcc. This
way, when I invoke:
% gcc -m64 -c foo.c
it builds a 32 bit object. When I installed the gmp this way, I see
that 32 bit libraries are built in sage-2.10.2/local/lib directory.
The next problem with the make is that it crashes with the same init.c
error:
Fortran fix compiler: sage_fortran -Wall -ffixed-form -fno-second-
underscore -Wall -fno-second-underscore -fPIC -O3 -funroll-loops
creating build/temp.linux-ppc64-2.5
creating build/temp.linux-ppc64-2.5/scipy
creating build/temp.linux-ppc64-2.5/scipy/fftpack
creating build/temp.linux-ppc64-2.5/scipy/fftpack/dfftpack
compile options: '-c'
sage_fortran:f77: scipy/fftpack/dfftpack/dcost.f
init2.c:37:  assertion failed: ((64 - 0)+0) == (((64 - 0)+0)/8) * 8 &&
sizeof(mp_limb_t) == (((64 - 0)+0)/8)
<built-in>:0: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.opensuse.org> for instructions.
init2.c:37:  assertion failed: ((64 - 0)+0) == (((64 - 0)+0)/8) * 8 &&
sizeof(mp_limb_t) == (((64 - 0)+0)/8)
<built-in>:0: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.opensuse.org> for instructions.
error: Command "sage_fortran -Wall -ffixed-form -fno-second-underscore
-fPIC -O3 -funroll-loops -c -c scipy/fftpack/dfftpack/dcost.f -o build/
temp.linux-ppc64-2.5/scipy/fftpack/dfftpack/dcost.o" failed with exit
status 1
Error building scipy.

real    1m47.119s
user    1m43.877s
sys     0m2.954s
sage: An error occurred while installing scipy-20071020-0.6.p3
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /usr/local/PET/src/build/sage-2.10.2/install.log.  Describe your
computer, operating system, etc.
If you want to try to fix the problem, yourself *don't* just cd to
/usr/local/PET/src/build/sage-2.10.2/spkg/build/scipy-20071020-0.6.p3
and type 'make'.
Instead type "/usr/local/PET/src/build/sage-2.10.2/sage -sh"
in order to set all environment variables correctly, then cd to
/usr/local/PET/src/build/sage-2.10.2/spkg/build/scipy-20071020-0.6.p3
(When you are done debugging, you can type "exit" to leave the
subshell.)
make[1]: *** [installed/scipy-20071020-0.6.p3] Error 1
make[1]: Leaving directory `/usr/local/PET/src/build/sage-2.10.2/spkg'

real    5m47.227s
user    3m59.393s
sys     1m13.322s
+ '[' all = all -a 2 = 0 ']'


Even sage gave the same error. So, I deleted the sage binary, removed
the sage-2.10 and sage_scripts-2.10.2 files from the spkg/installed
directory and tried to rebuild sage. But it came back and aborted at
the same location with the same error. So, clearly the 32/64bit issue
with gmp and/or some other package is still lurking. I tried using
sage_fortran to compile a test app and it did produce a 32 bit binary
properly. How can I reduce this error to something easier to debug?
Where is it coming from? What should I rebuild? I see that there is
another init2.o in libmpfr.a. It couldn't be this one, could it? Since
the sources are removed, it is difficult to grep all packages to track
an error message.
If I try to just compile the dcost.f file on the command line, it does
seem to work:
scipy-20071020-0.6.p3/src> sage_fortran -Wall -ffixed-form -fno-second-
underscore -fPIC -O3 -funroll-loops -c -c scipy/fftpack/dfftpack/
dcost.f
scipy-20071020-0.6.p3/src> ls -lt dcost.o
-rw-r--r-- 1 sameer utk 2196 2008-03-06 18:37 dcost.o
scipy-20071020-0.6.p3/src> file dcost.o
dcost.o: ELF 32-bit MSB relocatable, PowerPC or cisco 4500, version 1
(SYSV), not stripped

 So, what command invokes this compilation that gives the error? If I
just try the spkg-install command in the scipy directory, I get:
build/scipy-20071020-0.6.p3> ./spkg-install
Traceback (most recent call last):
  File "setup.py", line 53, in <module>
    setup_package()
  File "setup.py", line 28, in setup_package
    from numpy.distutils.core import setup
  File "/usr/local/PET/src/build/sage-2.10.2/local/lib/python2.5/site-
packages/numpy/__init__.py", line 43, in <module>
    import linalg
  File "/usr/local/PET/src/build/sage-2.10.2/local/lib/python2.5/site-
packages/numpy/linalg/__init__.py", line 4, in <module>
    from linalg import *
  File "/usr/local/PET/src/build/sage-2.10.2/local/lib/python2.5/site-
packages/numpy/linalg/linalg.py", line 25, in <module>
    from numpy.linalg import lapack_lite
ImportError: liblapack.so: cannot open shared object file: No such
file or directory
Error building scipy.


  I really appreciate all your help with this port.
  Thanks!
  - Sameer



On Mar 6, 4:17 am, mabshoff <[EMAIL PROTECTED]
dortmund.de> wrote:
> On Mar 6, 1:47 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Wed, Mar 5, 2008 at 4:40 PM, Sameer <[EMAIL PROTECTED]> wrote:
>
> > >  William,
> > >   Thanks a lot for your suggestion. I had not set it. Some more
> > >  problems with the compile on powerpc Linux. I get:
> > >  ./lisp.run -on-error appease -B . -N locale -E 1:1 -Efile UTF-8 -
> > >  Eterminal UTF-8 -norc -m 1800KW -x "(and (load \"init.lisp\") (sys::
> > >  %saveinitmem) (ext::exit)) (ext::exit t)"
> > >   i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
> > >   I I I I I I I      8     8   8           8     8     o  8    8
> > >   I  \ `+' /  I      8         8           8     8        8    8
> > >    \  `-+-'  /       8         8           8      ooooo   8oooo
> > >     `-__|__-'        8         8           8           8  8
> > >         |            8     o   8           8     o     8  8
> > >   ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8
>
> > >  Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
> > >  Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
> > >  Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
> > >  Copyright (c) Bruno Haible, Sam Steingold 1999-2000
> > >  Copyright (c) Sam Steingold, Bruno Haible 2001-2006
>
> > >  ;; Loading file defseq.lisp ...
> > >  ;; Loaded file defseq.lisp
> > >  ;; Loading file backquote.lisp ...
> > >  ;; Loaded file backquote.lispmake[2]: *** [interpreted.mem]
> > >  Segmentation fault
>
> > > make[2]: Leaving directory `/usr/local/PET/src/build/sage-2.10.2/spkg/
> > >  build/clisp-2.41.p12/src/src'
> > >  Silly permissions error with first make of clisp.
> > >  Do a 'make' again, since second 'make' works.
> > >  Error building clisp.
>
> > >  real    30m10.186s
> > >  user    29m17.033s
> > >  sys     0m42.184s
> > >  sage: An error occurred while installing clisp-2.41.p12
>
> > > Please email sage-develhttp://groups.google.com/group/sage-devel
> > >  explaining the problem and send the relevant part of
> > >  of /usr/local/PET/src/build/sage-2.10.2/install.log.  Describe your
> > >  computer, operating system, etc.
> > >  If you want to try to fix the problem, yourself *don't* just cd to
> > >  /usr/local/PET/src/build/sage-2.10.2/spkg/build/clisp-2.41.p12 and
>
> > > type 'make'.
> > >  Instead type "/usr/local/PET/src/build/sage-2.10.2/sage -sh"
> > >  in order to set all environment variables correctly, then cd to
> > >  /usr/local/PET/src/build/sage-2.10.2/spkg/build/clisp-2.41.p12
>
> > > (When you are done debugging, you can type "exit" to leave the
> > >  subshell.)
> > >  make[1]: *** [installed/clisp-2.41.p12] Error 1
>
> > > make[1]: Leaving directory `/usr/local/PET/src/build/sage-2.10.2/spkg'
>
> > >  real    98m24.666s
> > >  user    95m9.979s
> > >  sys     2m30.678s
> > >  + '[' all = all -a 2 = 0 ']'
>
> > It's a bummer clisp didn't build.   We only use it for maxima, so if
> > you can install any version of clisp on your system (e.g., using
> > your normal package tools),
>
> I suspect a compiler incompability. An upgrade to clisp 2.44.1 should
> fix most if not all of those.
>
> > then sage will use that to build
> > Maxima.  There is no binary linking between sage and maxima/clisp,
> > however you won't get far in Sage without having maxima on your
> > system.
>
> Yep.
>
>
>
>
>
> > > build/sage-2.10.2>
>
> > >  next. If I try and execute the sage executable at this stage, I get:
> > >  build/sage-2.10.2> /usr/local/PET/src/build/sage-2.10.2/sage
> > >  ----------------------------------------------------------------------
> > >  | SAGE Version 2.10.2, Release Date: 2008-02-22                      |
> > >  | Type notebook() for the GUI, and license() for information.        |
> > >  ----------------------------------------------------------------------
> > >  Setting permissions of DOT_SAGE directory so only you can read and
> > >  write it.
>
> > >  init2.c:37:  assertion failed: ((64 - 0)+0) == (((64 - 0)+0)/8) * 8 &&
> > >  sizeof(mp_limb_t) == (((64 - 0)+0)/8)
> > >  /usr/local/PET/src/build/sage-2.10.2/local/bin/sage-sage: line 212:
> > >  13965 Segmentation fault      sage-ipython -c "$SAGE_STARTUP_COMMAND;"
> > >  "$@"
>
> > That's gmp, since init2.c is:
>
> >           gmp-4.2.1/mpz/init2.c
>
> > It seems that something is miscompiled about your gcc.  I'm sure this has
> > something to do with 64/32-bit issues.
>
> Well, the problem is that the gcc on the system produces 32 bit
> binaries per default while GMP usually defaults to the arch with the
> largest wordsize. All the issues are (easily) fixable, but it just
> takes time to get fixes like that merged for a rather uncommon
> platform. Since I can only build on a PS3 things also tend to build
> slowly, so if anybody has an account on a 64 bit PPC box let me know.
>
> > Which Linux distribution are you using?   Maybe you could switch to Debian,
> > which might be saner than whatever you are currently using.
>
> I disagree here :)
>
> Cheers,
>
> Michael
>
>
>
> > > build/sage-2.10.2>
>
> > >    Thanks,
> > >    - Sameer
>
> > >  On Mar 5, 2:42 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
>
> > > > On Wed, Mar 5, 2008 at 1:45 PM, Sameer <[EMAIL PROTECTED]> wrote:
>
> > >  > >  Hi Michael,
> > >  > >    The other problem I am facing on powerpc Linux is with compiling
> > >  > >  with Fortran. Some parts of SAGE accept gfortran and others do not.
>
> > >  > It is definitely possible to build all of Sage only using gfortran, 
> > > since many
> > >  > people do that (who want to avoid g95 binaries for example).   Did you
> > >  > set SAGE_FORTRAN and SAGE_FORTAN_LIB?
>
> > >  > That said, of course we have _not_ ported Sage officially to ppc 64bit 
> > > linux,
> > >  > so expect troubles.
>
> > >  > By the way, you can skip building any component of Sage by simplying
> > >  > touching  a certain file (which tells Sage that the component built, 
> > > even
> > >  > if it didn't).  e.g., try this:
>
> > >  >    cd SAGE_ROOT
> > >  >    touch spkg/installed/r-2.6.1.p14
>
> > >  > then type make to continue your Sage install.   It will fail with rpy,
> > >  > but you can also skip that similiarly.     R and rpy do not link with
> > >  > Sage in a binary way, so you should be able to build all the rest
> > >  > of Sage after skipping the build of R and rpy, and then you can get
> > >  > going with actually using Sage, then come back to R/Rpy if you're
> > >  > particularly interested in Statistics (that's what those packages
> > >  > are for).
>
> > >  > >  Here is what I see:
> > >  > >  checking for Fortran 77 libraries of sage_fortran...
> > >  > >  checking how to get verbose linking output from gcc -std=gnu99... -v
> > >  > >  checking for C libraries of gcc -std=gnu99...  -L/usr/local/PET/src/
> > >  > >  build/sage-2.10.2/local/lib/ -L/usr/local/PET/src/build/sage-2.10.2/
> > >  > >  local/lib/../lib -L/usr/lib/gcc/powerpc64-suse-linux/4.1.2 
> > > -L/usr/lib/
> > >  > >  
> > > gcc/powerpc64-suse-linux/4.1.2/../../../../powerpc64-suse-linux/lib/../
> > >  > >  lib -L/usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib -L/
> > >  > >  lib/../lib -L/usr/lib/../lib -L/usr/local/PET/src/build/sage-2.10.2/
> > >  > >  local/lib -L/usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../
> > >  > >  powerpc64-suse-linux/lib -L/usr/lib/gcc/powerpc64-suse-linux/
> > >  > >  4.1.2/../../.. -lgcc_s
> > >  > >  checking for dummy main to link with Fortran 77 libraries... none
> > >  > >  checking for Fortran 77 name-mangling scheme... configure: error:
> > >  > >  cannot compile a simple Fortran program
> > >  > >  See `config.log' for more details.
> > >  > >  Error configuring R.
>
> > >  > >  real    0m57.989s
> > >  > >  user    0m23.697s
> > >  > >  sys     0m23.042s
> > >  > >  sage: An error occurred while installing r-2.6.1.p14
>
> > > > > Please email sage-develhttp://groups.google.com/group/sage-devel
> > >  > >  explaining the problem and send the relevant part of
> > >  > >  of /usr/local/PET/src/build/sage-2.10.2/install.log.  Describe your
> > >  > >  computer, operating system, etc.
> > >  > >  If you want to try to fix the problem, yourself *don't* just cd to
> > >  > >  /usr/local/PET/src/build/sage-2.10.2/spkg/build/r-2.6.1.p14 and type
>
> > >  > > 'make'.
> > >  > >  Instead type "/usr/local/PET/src/build/sage-2.10.2/sage -sh"
> > >  > >  in order to set all environment variables correctly, then cd to
> > >  > >  /usr/local/PET/src/build/sage-2.10.2/spkg/build/r-2.6.1.p14
>
> > >  > > (When you are done debugging, you can type "exit" to leave the
> > >  > >  subshell.)
> > >  > >  make[1]: *** [installed/r-2.6.1.p14] Error 1
>
> > >  > > make[1]: Leaving directory 
> > > `/usr/local/PET/src/build/sage-2.10.2/spkg'
>
> > >  > >  real    44m44.649s
> > >  > >  user    41m19.765s
> > >  > >  sys     2m49.245s
> > >  > >  build/sage-2.10.2> which gfortran
> > >  > >  /usr/bin/gfortran
> > >  > >  build/sage-2.10.2> which g77
> > >  > >  g77: Command not found.
> > >  > >  build/sage-2.10.2> which f77
> > >  > >  /opt/ibmcmp/xlf/10.1/bin/f77
>
> > >  > > build/sage-2.10.2>
>
> > >  > > On Mar 4, 10:20 pm, "Michael.Abshoff" <[EMAIL PROTECTED]>
> > >  > >  wrote:
>
> > >  > > > Sameer wrote:
> > >  > >  > > Hi,
> > >  > >  > >         When I try to compile Sage 2.10.2 under ppc64 Linux 
> > > using gcc,
> > >  > >  > > I see that some files are
> > >  > >  > > compiled in 32 bits and some others in 64 bits. Have you 
> > > noticed this?
>
> > >  > >  > Hi Sameer,
>
> > >  > >  > there is several ways to solve the problem:
>
> > >  > >  > a) Use a gcc that forces 64 bit output per default
> > >  > >  > b) Wait until 2.10.4 and hope that I have time to merge all the 
> > > 64 bit
> > >  > >  > PPC fixes :)
>
> > >  > >  > > When I type:
> > >  > >  > > % make
> > >  > >  > >         I get the following error:
> > >  > >  > >  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/PET/src/build/
> > >  > >  > > sage-2.10.2/local/include -I. -g -O2 -MT
> > >  > >  > > libiml_la-nullspace.lo -MD -MP -MF 
> > > .deps/libiml_la-nullspace.Tpo -c
> > >  > >  > > nullspace.c -o
> > >  > >  > > libiml_la-nullspace.o >/dev/null 2>&1
> > >  > >  > > /bin/sh
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to