On 1 February 2010 08:13, Peter Jeremy <peterjer...@acm.org> wrote:
> On 2010-Jan-31 11:15:08 +0000, "Dr. David Kirkby" <david.kir...@onetel.net> 
> wrote:
>>Alex Ghitza wrote:
>>> 1) Build sage-4.3.1 with gcc-4.4.2 on Arch Linux; Sage runs fine, passes
>>> doctests, etc.  Someone else gets the binary and can use it to run Sage
>>> 2) Upgrade gcc to gcc-4.4.3
>>> 3) Try to run sage, get errors that the original poster listed
>>
>>So you are saying that simply updating gcc, causes Sage to no longer
>>work? That seems very naughty of the shipped gcc/libc if that is
>>happening. I could understand if one removed a new version of gcc,
>>and replaced it with an old version this might happen.
>
> This is definitely undesirable - especially with only a 0.0.1 change
> in the compiler.

I would be tempted to dismiss this as a user error, but two people
have reported it, so it is not.

>>But I think when shipping binaries, we should include ALL the
>>libraries used by gcc with Sage. That means:
>>
>>* libgcc_s
>>* libgfortran
>>* libstdc++.
>
> This opens up two cans of worms:
> 1) Since those libraries won't be located where the compiler originally
>   expected to find them, Sage will need to have appropriate
>   LD_LIBRARY_PATH (or equivalent) hooks.

Yes, agreed. But the sage-env scripts addends (prepends?)
LD_LIBRARY_PATH to include $SAGE_ROOT/local/lib. So they will be
found.

As a test, I copied the libraries there, then changed the permissons
of the directories where the gcc libraries were, to 000, so they could
not be found. I then run

$ ./sage -sh

to get the Sage environment.

Then I used  'ldd' and see all libraries were found. (I must admit, I
did not actualy run Sage at that point, which would have been very
sensible!)


> 2) There may be licensing issues distributing libraries associated with
>   non-gcc compilers.

That may be true, but I doubt it.

Certainly for Solaris, the Sun compilers are now free, so getting
someone to install them should not be an issue.

I can't believe IBM (AIX), HP (HP-UX) or similar would sell a
commerical compiler, then insist that before an end-user could run
your software, they would need to purchase a license for the compiler.
I suspect they will allow you to ship the run-time libraries if you
have a licensed commerical compiler.

>>I've said this before, but nobody has really agreed with me. I think
>>there could be issues if Sage is built with a new gcc, and someone
>>has only an old one.
>
> Definitely, if someone only has gcc3 libraries installed then trying
> to use an application compiled with gcc4 could be problematic.

>From what I once read, you was ok if if the minor version (z), in
x.y.z  changed, but not if the x or y changed.

I need to go out, so do not have time to find the link.

> Finding the exact restrictions probably means asking the GCC
> maintainers.  There are also likely to be different restrictions on
> compiling an application with gcc-X and trying to run it when only
> gcc-Y is installed and compiling bits of an application with gcc-X
> and other bits with gcc-Y and expecting it to work.
>
> --
> Peter Jeremy

As you say, finding the exact restrictions would probably mean asking
the gcc maintainers. One Solaris, it is pretty likely to break, given
only gcc 3.4.x is shipped, which is why I added the libraries to the
binary. I will test that binary later today on 't2'.


Dave

-- 
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