New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libgfortran *must* get shipped with the Sage binaries #8049
Comments
comment:1
I made the point the other day, that the library should be included in the binary, along with C++ library. Dave |
comment:2
Actually, I think the C library too. The C library is very small anyway. If Sage is linked with a new library, and someone has an older one on their system, it could be a problem. 'ldd' might be useful to get the location on Solaris, Linux or HP-UX, but not on OS X. Perhaps there is a more widely supported command, but I don't know of it. The configure script for gcc has these options.
so while one could guess at the location of libraries from the location of the gfortran binary, it is not guaranteed to be right. On Solaris, in 64-bit mode, it will be in a subdirectory too
Dave |
comment:3
Replying to @sagetrac-drkirkby:
The OSX analog of ldd is called otool (otool -L), to be precise: Just in case, |
comment:4
I fixed this by writing a custom dist script that I use for building binaries. |
comment:5
Does this do C and C++, or just Fortran? You can be 100% sure that the user needs the C and C++ libraries. You might well get away with it on most linux distros if gcc is installed. You certainly can't get away with it on Solaris, where a recent gcc is not installed unless someone has taken the steps to do so. Dave |
comment:6
Hi, this is my first ticket, I just joined trac. I have the following error when I try to import numpy:
I have the latest releasted Sage Binary (5.3) installed on my linux machine, running Xubuntu. |
comment:7
Replying to @sagetrac-startakovsky:
To help your particular installation, you can just do
We'll have to look into this more carefully, though. |
comment:8
It would be interesting to know whether this problem already occurred in sage 4.8 . The last thing I know that changed in relation to fortran is #12369 where the gcc package was added and the old fortran package removed. I think it would be good to open a new ticket for this issue, leaving this ticket as an "archive" for the old issue. |
Changed keywords from none to days43 |
comment:9
Hi, is it possible to re-open this ticket ? Currently, libgfortran is not shipped with Sage. |
comment:10
Replying to @sagetrac-tmonteil:
It is certainly possible to re-open this ticket, but you should specify in more detail why. In sage-5.3, libgfortran is shipped with the official Sage binaries, except for Ubuntu 12.04. In sage-5.4, libgfortran will also be shipped with the Ubuntu 12.04 binaries, see #13515. |
comment:11
Correct me if this issue has been superseded, but I just installed this binary and it appears not to include libgfortran. I obtained the same ImportError as above when attempting to import numpy, and installing libgfortran3 fixed the problem. |
comment:12
Replying to @sagetrac-tcoffee:
I imagine libgfortran comes from the gcc spkg nowadays, and this binary has no trace of gcc in it. |
comment:13
Yes, binaries should be built with |
comment:14
Replying to @jdemeyer:
Does that make sense for distros with a more recent toolchain than Sage currently ships? |
comment:15
Replying to @nexttime:
Yes, because you need to ship the libraries that you link against, such as |
comment:16
Replying to @jdemeyer:
Well, these should be the "native" ones from the distro the binary was built on (and for). So unless the distro's toolchain is exceptionally outdated or broken (I also wouldn't say Lucid's is), I think we shouldn't If we ship older libraries than the distro by default comes with / uses, we're IMHO just asking for trouble. (Not all of them are properly versioned w.r.t. dynamically loading the "correct" one, IIRC. So running other applications from within the Sage environment might fail.) Requiring the user installing a Sage binary to eventually also install some stuff with the distro's package manager first isn't too much to ask for, provided that's sufficiently documented and/or a (start-up) script tells her/him to do so... After all, the whole point of building binaries for specific distros is that we know which, or can expect that such and such (versions of) libraries and programs are present (or at least available through the package manager). |
comment:17
Replying to @nexttime:
That's exactly the whole point here, this isn't about versions. We do not want that users need to install something with their package manager. Sage binaries should work "out of the box". |
comment:18
Replying to @jdemeyer:
"Installing [with the distro's package manager]" (usually) doesn't mean building/compiling something, which is the point of bdists. The Sage binary for Foonux 17.12 shouldn't contain any part of that distro, because that'd just be redundant (not to mention potentially bypassing security updates etc.). But my main point was that using Sage's GCC for building bdists in general is not the same as shipping the distro's libraries -- the former may cause further (or different) trouble. So if you think we should ship libgfortran, just copy the system's one into |
comment:19
P.S.: If you want to run Sage really "out of the box", use one of the Live CDs (or probably the VirtualBox image), or SMC... ;-) The only flaw with the bdists currently is that Sage apparently doesn't check on (first) start-up whether its prerequisites are present, instead a probably mysterious or hard to understand error might(!) occur. That's the bug. |
comment:20
Replying to @nexttime:
This discussion should really be moved to |
comment:21
Replying to @jdemeyer:
I was thinking of replying there, but thought it was more on topic (or had the right audience) here. We should probably invite fbissey, Snark and Jan Groenewald et al. to the party, in case they're not already cc'ed (haven't checked). |
comment:22
Once again, lack of fortran or lapack or something causes trouble - see this discussion, which references this ticket. |
comment:23
Replying to @kcrisman:
Not once again, it's the same issue as [comment:13]. It has been fixed in the sense that the next binaries which will be released will not have this problem. |
comment:24
See also this recent question on ask.sagemath.org showing that the problem still exists with 6.3 Ubuntu binary. |
comment:25
Replying to @sagetrac-tmonteil:
Yes of course it does, in case you haven't read the recent comments: It has been fixed in the sense that the next binaries which will be released will not have this problem. |
CC: @jdemeyer @sagetrac-tmonteil
Component: build
Keywords: days43
Issue created by migration from https://trac.sagemath.org/ticket/8049
The text was updated successfully, but these errors were encountered: