On Tue, Nov 17, 2009 at 1:05 PM, Jason Grout
<jason-s...@creativetrax.com> wrote:
> François Bissey wrote:
>> On Wed, 18 Nov 2009 08:23:39 Jason Grout wrote:
>>> I have a fairly fresh installation of 64-bit Ubuntu 9.10, and I'm
>>> compiling 4.2.1.  I've installed gfortran and build-essential, plus the
>>> other packages listed in step 1 of the README.  I even set
>>> SAGE_FORTRAN=/usr/bin/gfortran before building.  I get the following
>>> error when building R:
>>>
>>> make[6]: Leaving directory
>>> `/dev/shm/sage-4.2.1/spkg/build/r-2.9.2/src/src/library/base'
>>> /dev/shm/sage-4.2.1/spkg/build/r-2.9.2/src/bin/exec/R:
>>> /dev/shm/sage-4.2.1/local/lib/gcc-lib/x86_64-unknown-linux-gnu/4.0.3/libgcc
>>> _s.so.1: version `GCC_4.2.0' not found (required by
>>>  /usr/lib/libstdc++.so.6)
>>>
>>>
>>> In the mailing list archives, I see that I can copy a system libgcc_s.so
>>> into the sage tree and the compile will succeed.  That seems like a
>>> not-very-friendly fix, though.  Is that the best way to compile 4.2.1 on
>>> 64-bit Ubuntu 9.10?
>>>
>> That's very strange, the 4.0.3 bit usually comes from a call to g95 since it
>> is still built against gcc-4.0.3. I would say that your setting of gfortran
>> didn't work. Can you tell us what is in the sage_fortran script in
>> SAGE_LOCAL/bin?
>>
>
>
> I haven't modified anything:
>
> /dev/shm/sage-4.2.1/local/bin% cat sage_fortran
>
> #!/bin/sh
>
> sage_fortran.bin -fPIC $...@%
>
>
>
> Of course, sage_fortran.bin is a binary executable.
>
> Checking the SAGE_FORTRAN bit:
>
> /dev/shm/sage-4.2.1% ./sage -sh
>
>
> Starting subshell with Sage environment variables set.
> Be sure to exit when you are done and do not do anything
> with other copies of Sage!
>
> Bypassing shell configuration files ...
>
> /dev/shm/sage-4.2.1\nsage subshell$ env | grep SAGE_FORTRAN
> SAGE_FORTRAN=/usr/bin/gfortran
>
> So it appears that SAGE_FORTRAN is set, at least from the sage -sh
> environment.

You might try to set *both* SAGE_FORTRAN and SAGE_FORTRAN_LIB.  I
copied the following from the README.txt that comes with Sage:

NOTE: If you're using Fortran on a platform without g95 binaries included
      with Sage, e.g., Itanium, you must use a system-wide gfortran.  You
      have to explicitly tell the build process about the fortran
      compiler and library location.  Do this by typing

          export SAGE_FORTRAN=/exact/path/to/gfortran
          export SAGE_FORTRAN_LIB=/path/to/fortran/libs/libgfortran.so


William

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to