let's move the discussion to sage-devel.
For reference: We have been talking about replacing the sage build
system with the gentoo package manager and ebuilds via gentoo prefix:
https://github.com/cschwan/sage-on-gentoo/issues/52#issuecomment-982600
Francois Bissey wrote:
> We shouldn't continue the discussion here but at least its documented. Yes
> you can relocate a prefix on some platform (I am not sure you can easily on
> aix but we are not too concerned by that).
>
> But I think if we want to replace the spkg system by ebuilds we could go some
> other ways.
>
> - using host gcc with a set of flags in a special sage profile that would
> mimic some of the set up in numerous spkg. - use Volker's gcc wrapper to use
> the host gcc and create a relative prefix instead of fixed one. I think we
> have a fixed prefix because a relative one would be hard to set up on some
> platforms.
When I saw Volker's message, I also started thinking of using these wrappers
instead of gcc. Is there a virtual/compiler etc. we can provide in a gccwrapper
ebuild to make this work seemlessly? Or do we still need to add gcc to
packages.provided?
> The main difficulty becomes the bootstraping we need to get a working
> prefixed python in a seamless fashion.
+1. I will try to make a tarball which handles bootstrapping a sage-prefix. :)
I don't have much experience with gentoo-prefix yet, so it might take a while
before I get a handle on things.
> There are other issues. The current overlay provides an alternate way of
> building sage already but it is not as lightweight as you'd like.
This is something that needs to be changed "upstream", in Sage, anyway. There
were comments on sage-devel about changing the way the library is built so
that it works without a separate build directory.
> Aside from that it is not as developer friendly as vanilla sage. You cannot
> apply a patch and do "sage -b". Effectively to apply a patch I change the
> ebuild and do the equivalent of "sage -ba". On the other hand upgrade always
> works :)
Can't we tell emerge to "keepwork" and allow people to "make install" from the
work copy? I guess this means overriding the sandbox setup somehow.
If we place the working copy in a more visible place, like ${EPREFIX}/devel,
this would match the current development model. This would also allow people
to easily develop other packages in Sage.
Cheers,
Burcin
That would definitely be bugs. If you don't care about submitting bugs you can
always forward me your problems and I'll work on a solution and get it
reported in the appropriate place. prefix is definitely a work in progress and
there are rather nasty corners, especially when you stray off linux to other
platforms.
But you raised the gmp/mpir issue that I think should be mentioned.
In sage-on-gentoo we use gmp rather than mpir. It's a technical choice.
gmp and mpfr (and now mpc) are system packages required to build gcc.
Almost no packages in sage have ported to mpir, rather sage relies on mpir
installing compatibility (or fake) headers and libraries. This is a problem on
gentoo unless we ask the toolchain team to switch to mpir. Somehow I don't
see that happening soon unless upstream gcc itself makes it an option.
Porting all the stack of software to pure mpir is possible but then we'd also
need a mpir enabled mpfr separate from the system one... in short the
KISS solution is to stick to gmp.
I could provide a "small" tree that would let you build the system with mpir,
that could be an interesting experiment.
On the other hand if we go anywhere with the experiment of using a reduced
portage with gcc wrappers there would be no problems of collision between gmp
and mpir.
Francois
This email may be confidential and subject to legal privilege, it may not reflect the views of the University of Canterbury, and it is not guaranteed to be virus free. If you are not an intended recipient, please notify the sender immediately and erase all copies of the message and any attachments. Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more information.
> Hi Francois,
> > Aside from that it is not as developer friendly as vanilla sage. You
> > cannot apply a patch and do "sage -b". Effectively to apply a patch I
> > change the ebuild and do the equivalent of "sage -ba". On the other hand
> > upgrade always works :)
>
> Can't we tell emerge to "keepwork" and allow people to "make install" from
> the work copy? I guess this means overriding the sandbox setup somehow.
>
> If we place the working copy in a more visible place, like
> ${EPREFIX}/devel, this would match the current development model. This
> would also allow people to easily develop other packages in Sage.
>
Hi Burcin,
it would be complicated and requires that we change the current setup.
We currently don't ship the hg tree at all. We disable -b -ba and -upgrade.
Reenabling any of these will negate the benefit of having a package manager.
That is you will get files that are not tracked anymore which may wreck
upgrades. Or you would have to be careful to always do your patching in a
clone remembering that the clone will be untracked from the portage point of
view.
Note that we already have a hg-less devel tree so that we can run the test
suite (USE=testsuite) but unlike normal sage it is not linked to python/site-
packages/sage.
Of course everything is a matter of choice between various trade-off so you
could have to give up something one way or another.
Francois
After sleeping on it for quite a long time, I finally took the time to
prepare a prototype tarball:
http://sage.math.washington.edu/home/burcin/sage-prefix.tar
Despite the name, ATM it only installs Singular with it's dependencies.
Only linux platforms that already have python > 2.6 are expected to
work. This doesn't solve any of the problems mentioned before about
using gentoo-prefix for the Sage build system. It was merely an
exercise for me to see the scope of the problems. :)
Details of how it works are at the end of this message.
On Wed, 13 Apr 2011 05:34:48 -0700 (PDT)
"Georg S. Weber" <georg...@googlemail.com> wrote:
> Hi all,
>
> thanks for this highly motivating thread! It seems there are a handful
> people interested, and I'm happy to join in. My goal might seem at
> first pretty moderate: Identify the mutual benefits of Sage and Gentoo
> (especially Gentoo Prefix), and write this down somewhere at an easily
> accessible place (e.g. the Sage Wiki, maybe as some "SEP" --- Sage
> Enhancement Proposal). We should take great care that we do write down
> and communicate the discussions, results, proposals agreed (at least
> among the participants) upon, sample code/installations, links, and
> such.
Here is a list of pros & cons from my (Sage centered) point of view:
Pros:
- flexible, very configurable source based package manager, extends the
current system with:
- uninstall packages
- binary packages
- separation of build time and run time dependencies
- properly handles CFLAGS, etc.
- separates source, metadata, and build instructions so it is easier
to update packages
- many packages already available
- in the gentoo portage tree
[http://gentoo-portage.com/sci-mathematics]
- sage-on-gentoo overlay [https://github.com/cschwan/sage-on-gentoo]
- gentoo-science overlay
[http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=tree]
- makes it easier to create custom distributions, which include
different sets of default packages
- reduces optional/experimental package maintenance
- it is possible to specify what is already available on different
platforms (we don't need to distribute gfortran, ATLAS, etc. if not
needed)
See for example:
http://sage.math.washington.edu/home/burcin/portage/profiles/sage/linux/package.provided
Cons:
- portage has a lot of dependencies
- python, sed, bash, etc.
This makes bootstrapping nontrivial and makes the distribution bigger
- package creation process involves learning portage conventions
[http://devmanual.gentoo.org/index.html]
- still a lot of open ends
- easy development
- relocating an install
- automating maintenance of prefix portage tree
> Although Gentoo Prefix is by far more mature than Sage (and so the
> benefits for Sage are surely much greater, than possible synergies for
> Gentoo Prefix), I think I can identify some points where Gentoo Prefix
> might eventually profit, too. See e.g. the Gentoo (Alt) Prefix mailing
> thread containing the following message (Fabian Groffen does know what
> he talks about, but it would be good to have at least the hard facts
> clearly documented, and easily accessible):
>
> http://archives.gentoo.org/gentoo-alt/msg_3e0aa31ec42c917484e6b0f86ffa5f2a.xml
Since we are not aiming to provide a complete system with a separate
compiler tool chain and libraries, I don't think much of this applies
to us. Sage already manages to relocate a binary install, so we know
that it is not impossible to do this in our restricted use case. :)
> or the current lack of Gentoo Prefix "binary distributions" resp. the
> need of external support to do the "very first start up" (since
> bootstrapping ain't really for the faint-hearted --- I did that myself
> successfully on Maemo5, OS X 10.4 and OS X 10.6, but I'm a developer,
> not a "mere user"), see e.g.:
>
> http://sourceforge.net/projects/prefix-launcher/
IMHO, bootstrapping is still the biggest problem. Though at least we
don't have to worry about building a tool chain.
> One last thing about "sage -clone, -b, -ba, br, ..." --- from my
> memory about several discussions, the sage community regards this as a
> "killer feature", i.e. that there is not some "sage" and then some
> other, different "sage-dev" package/distribution, but only one. So the
> hurdle for any user to gradually become a developer is made as low as
> possible. I have some rough ideas how to make this possible "inside" a
> standard distribution with also an eye on reliable package management,
> i.e. not restricted to Gentoo/Gentoo Prefix, but also Debian and so
> on. But these ideas would need thorough discussion.
I agree that this is a killer feature. The prototype tarball does
nothing about this problem. As I said earlier, I think we can
reconfigure portage to use "devel/*" as the build directory, and hook
up some internal portage commands to handle "make install" etc. Though
I haven't tried any of this and I'd appreciate hearing any other ideas.
-------------------------
Notes about the prefix tarball:
- To work around the bootstrapping problem, I assume that python and
the basic tools like bash (maybe also sed) are already installed on
the system. Of course this works perfectly well on my machines which
already run gentoo and portage (the package manager) is installed on
the base system. :)
IIRC, there were messages on this list about having python as a
dependency already. What are the dependencies of Sage besides tar,
gcc and gfortran? Does Sage depend on bash?
Is python available on the default install of all the systems
supported by Sage at the moment? Which version?
Unfortunately portage expects python-2.6 or newer. Using pkgcore or
paludis instead might solve this problem though.
pkgcore: http://www.pkgcore.org/
paludis: http://paludis.pioto.org/
Files in the tarball:
- install.sh
script to handle bootstrapping (= installing portage) then call
portage to install singular
- local/
this is the real prefix (in the gentoo sense), the root of the
install, named this way to replicate the directory structure of a
Sage tree. The symlink 'usr' in this directory also serves this
purporse.
- dist/
directory which includes package management related stuff, modeled
after the 'spkg' directory.
- portage/
the ebuild database for portage,
there is a version checked into mercurial in my home directory
on sage.math:
http://sage.math.washington.edu/home/burcin/portage/
Though I only started using mercurial at the end, after
realizing this is much more complicated than I expected. :)
- scripts/
contains the scripts used for the prefix tarball
- install.sh is the one you see at the root of the tarball
- bootstrap-prefix.sh
script borrowed from gentoo-prefix, commented out most
lines that actually run code, functions from this are
called in bootstrap-sage.sh
- bootstrap-sage.sh
redefines the paths and necessary functions from
bootstrap-prefix.sh to conform to our layout
Two important functions:
- bootstrap_tree()
creates the directory tree found in the tarball
- bootstrap_setup()
This is called from bootstrap_portage while installing
portage in the first (and only) step of bootstrapping
sets a default profile for portage based on the detected
platform. I kept only the linux platforms from the ones
defined in bootstrap-prefix
- profiles/
"profile" definitions, mostly copied from the gentoo-prefix tree
The only new part is the sage/ directory:
http://sage.math.washington.edu/home/burcin/portage/profiles/sage/
This adds two new profiles that inherit from the corresponding
prefix ones (see the files named 'parent'), These profiles define
architecture keywords. The package manager uses these to decide
which packages should be considered stable for a given platform.
The packages which should be considered already installed are
listed in the file packages.provided:
http://sage.math.washington.edu/home/burcin/portage/profiles/sage/linux/package.provided
How does it work?
- The install script
- sets the PATH and EPREFIX variables
EPREFIX is used to indicate the root directory for the prefix
install in the gentoo-prefix project
- installs portage in this EPREFIX "by hand" without using a package
manager. This is done by the bootstrap_portage() function in
bootstrap-prefix.sh.
- during the portage install, it detects the "profile" needed, by
looking a the CHOST variable. The profile, as explained above, lets
the package manager know the architecture etc.
- install.sh also puts a configuration file for portage in the prefix.
gentoo-prefix distributes a modified the portage tarball with
special default configuration. I didn't want to do that again,
or patch portage during the install.
When the package manager is installed properly below, the global
configuration is patched as necessary. See:
http://sage.math.washington.edu/home/burcin/portage/sys-apps/portage/files/make.globals.patch
So the configuration file is overwritten after that step.
- installs Volker's compiler wrapper using portage
AFAICT, this wasn't absolutely necessary since I didn't try
relocating the tree after the build. However, I can see that the
singular built in the prefix uses the ntl libraries installed in
the prefix instead of the ones on my system. This is an improvement
over the current Sage build I have.
- calls portage to install itself properly
This pulls in:
app-shells/bash
sys-libs/zlib
app-admin/eselect
virtual/libintl
virtual/libffi
app-admin/eselect-python
dev-lang/python
sys-apps/portage
app-admin/python-updater
- calls portage to install baselayout-prefix
This is the package that provides files for the environment
variables, etc. in the prefix. this pulls in:
sys-libs/readline
sys-apps/baselayout-prefix
I don't know why readline is built here and not as a dependency of
python. Perhaps there is a missing dependency in the gentoo ebuilds.
- calls portage to install singular
This pulls in:
dev-libs/gmp
dev-libs/gf2x
dev-libs/ntl
sci-mathematics/singular
- puts in a startprefix script when it's done
This starts a new shell with the PATH, etc. set.
To try it out, you just need to unpack the tar and run install.sh. Then
the startprefix script will get you a shell inside the prefix, where
you can run Singular.
Comments?
Cheers,
Burcin
The version of NTL in portage uses gf2x not a NTL generated one.
So it should have been included. sage-on-gentoo has been using gf2x
almost forever :)
Francois
> > Looks great! It doesn't quite compile on Fedora 14. NTL can't find its
> > generated header gf2x.h:
> >
> > http://pastebin.com/WsfQcc2A
> >
> > Not sure if its a problem with the prefix or just an NTL bug?
>
> The version of NTL in portage uses gf2x not a NTL generated one.
> So it should have been included. sage-on-gentoo has been using gf2x
> almost forever :)
>
Now I had time to look at your pastebin and a bit at the tarball - I will need
to find a "non gentoo" linux system to test that one properly.
It looks like gf2x hasn't been installed before ntl which it should. Can you
check this? Of Burcin may have missed it because it was in his system.
That kind of stuff happens on a regular basis.
Francois
Perhaps we can add a function in ebuilds which sets up a development
environment for the source. This would be similar to the way you can
call post install configuration from ebuilds any time after it's
merged. IIRC, the portage command for this was:
ebuild <ebuild_file_name> config
It would be best if this can avoid rebuilding the source.
At some point we thought about adding an option to Sage to do this.
Since setting this up for pynac, the notebook, etc. was getting to be
an FAQ.
> > - installs Volker's compiler wrapper using portage
> > AFAICT, this wasn't absolutely necessary since I didn't try
> > relocating the tree after the build. However, I can see that the
> > singular built in the prefix uses the ntl libraries installed in
> > the prefix instead of the ones on my system. This is an
> > improvement over the current Sage build I have.
> >
>
> Relocation aside I think the wrapper is still needed. Remember how
> you first filed issues on github about stuff not found in the prefix?
> The wrapper can help with that.
> https://github.com/cschwan/sage-on-gentoo/issues/53
> https://github.com/cschwan/sage-on-gentoo/issues/52
If make.conf sets CFLAGS, etc. properly, then we can get away without
the wrapper to build the packages in the prefix. I ran into the
problem in those tickets because I was setting CFLAGS myself in
make.conf, without explicitly specifying the prefix include and library
paths. I somehow expected that to be handled automatically.
I spent time including the wrapper, because I want the prefix to work as
a development environment for mathematical software as well. If you
work in the shell started by the startprefix script, things should
work seamlessly and the compiler should look in the right places for
header files and libraries. The wrapper solves this problem perfectly.
> > - calls portage to install baselayout-prefix
> > This is the package that provides files for the environment
> > variables, etc. in the prefix. this pulls in:
> > sys-libs/readline
> > sys-apps/baselayout-prefix
> >
> > I don't know why readline is built here and not as a dependency
> > of python. Perhaps there is a missing dependency in the gentoo
> > ebuilds.
>
> Not sure.
>
> >
> > - calls portage to install singular
> > This pulls in:
> > dev-libs/gmp
> > dev-libs/gf2x
> > dev-libs/ntl
> > sci-mathematics/singular
> >
>
> It would be be better to call "emerge -D singular" rather just
> "emerge singular" may be that would take care of Volker's
> problem. Actually Volker may very well suffer from the problem
> you had above.
Good point. It's been a while since I used emerge/portage actually. I
switched to paludis long ago. I should have used "-D" while preparing
the packages.provided file as well. I will have a go at doing this
later.
> > Comments?
>
> Well done so far. We need a repo. While we are putting this together
> I'd like it if you added the following to etc/make.conf:
> PORT_LOGDIR="${SBASE}"/var/log/portage
> PORTAGE_ELOG_CLASSES="warn error info log qa"
> PORTAGE_ELOG_SYSTEM="save"
> FEATURES="split-log"
>
> That way we have a log record similar to the one produced by
> sage when building spkg. I have a feeling we may need it.
> The "split-log" means that the log will be sorted in folders
> according
> to categories (app-shell and so on) given the clutter generated that's
> fairly useful.
> I still build sage on a machine that doesn't have sse2 you know!
It might be cleaner to add these to the make.defaults file for portage.
Then we won't confuse the user with the extra lines in make.conf. I
will revise the patch for make.defaults.
There is a mercurial repository which you can pull from in
http://sage.math.washington.edu/home/burcin/portage
I will upload this to bitbucket today.
Thanks for the feedback.
Cheers,
Burcin
I didn't know perl was a requirement. Anybody want to add to this? :)
I think they should be in package.provided to keep in line with Sage.
Does anyone have trouble installing these on their system before Sage?
I suppose this is not the right place to ask this question, since most
developers would have gone past that step long ago. :)
The python dependency also came up when discussing its use in
spkg-install scripts, for example in ATLAS. ATM, ATLAS spkg depends on
the Python spkg for this reason.
Cheers,
Burcin
On Wed, 4 May 2011 00:51:56 -0700 (PDT)
dagss <d.s.se...@astro.uio.no> wrote:
> I don't really have a say in this, but I've given this a lot of
> thought since I decided to drop Sage as my scientific Python
> distribution a year ago and have been searching for a new one ever
> since.
>
> My problem with Gentoo in general is that it solves the problems that
> SPKGs have by adding complexity (in the same way any Linux distro
> does).
>
> I much prefer something like Nix (http://nixos.org), where Eelco
> Dolstra instead had a new, brilliant idea which just makes simple
> things powerful. I wrote these notes up on using Nix for a scientific
> Python distribution (including Sage):
>
> https://github.com/dagss/scidist/blob/master/ideas.rst
>
> (I may be interested in putting in work in this direction...)
Robert posted a link to your notes here at some point. I also saw the
thread on the gentoo-alt mailing list where you asked about using
prefix for a scientific software distribution. Especially after reading
your notes, I seriously considered using Nix as well.
Nix is based on a beautiful idea, but it doesn't really reduce the
complexity. We want more features from the build system, this will
naturally add complexity. When I first started out using Gentoo, I
thought it was a beautiful and simple extension of the BSD ports system.
I admit that I am biased since I am already very familiar with Gentoo.
But I like the fact that build scripts are written in bash. Knowing
that it has been field tested and most of the quirks that might come up
in package management are already worked out also makes me lean toward
Gentoo. I am willing to spend time on this, but I don't want to spend
time fixing a package manager.
The items you list in the "Needed work" section of your notes already
look like writing a package manager from scratch. The last ticket
(#6) about soft dependencies shows that the Nix approach of installing
every package in a separate directory and linking directly to the files
in that directory is not really useful either.
BTW, you could use the gentoo package manager to replicate a previous
version of your tree with using binary packages (you can make these
even after you are done installing the ebuild). There seems to be code
for something like this already:
http://en.gentoo-wiki.com/wiki/Demerge
> But of course, Gentoo has a scientific community etc. etc. which Nix
> sort of lacks, so I can definitely see Gentoo making more sense for
> you.
This is the strongest argument that makes Gentoo attractive. It
justifies the effort to switch to their package format. Since then, we
won't have to worry about manually updating spkg's ourselves.
Francois is always reporting how a more recent version of a package
works perfectly with Sage. This is simply because Gentoo gives him
those packages for free on his sage-on-gentoo install.
I would be very happy to see a discussion about the pros and cons of
this approach. I know I sort of skipped over the SEP step Georg
wanted. :)
Thank you for the feedback.
Burcin
BTW, you could use the gentoo package manager to replicate a previous
version of your tree with using binary packages (you can make these
even after you are done installing the ebuild). There seems to be code
for something like this already:
> But of course, Gentoo has a scientific community etc. etc. which Nix
> sort of lacks, so I can definitely see Gentoo making more sense for
> you.This is the strongest argument that makes Gentoo attractive. It
justifies the effort to switch to their package format. Since then, we
won't have to worry about manually updating spkg's ourselves.Francois is always reporting how a more recent version of a package
works perfectly with Sage. This is simply because Gentoo gives him
those packages for free on his sage-on-gentoo install.
Yes that's a big problem with the current tarball of Burcin.
It doesn't fail for him or me because we already have the stuff in the system.
I am wondering if the wrapper is even used.
Adding "-I$SAGE_PREFIX/include" should work but I think there are issues
with the script as it is. I would be more comfortable if the startprefix script
was installed before we try to emerge singular. That way we can go back
start the prefix and try to emerge again, if it works it means portage is not
set up properly while the script is running.
Francois
We could go on about package theory for a while here. Just to make sure
I got my point across, sage -b(xx) would work on the clone.
> > > - installs Volker's compiler wrapper using portage
> > > AFAICT, this wasn't absolutely necessary since I didn't try
> > > relocating the tree after the build. However, I can see that the
> > > singular built in the prefix uses the ntl libraries installed in
> > > the prefix instead of the ones on my system. This is an
> > > improvement over the current Sage build I have.
> >
> > Relocation aside I think the wrapper is still needed. Remember how
> > you first filed issues on github about stuff not found in the prefix?
> > The wrapper can help with that.
> > https://github.com/cschwan/sage-on-gentoo/issues/53
> > https://github.com/cschwan/sage-on-gentoo/issues/52
>
> If make.conf sets CFLAGS, etc. properly, then we can get away without
> the wrapper to build the packages in the prefix. I ran into the
> problem in those tickets because I was setting CFLAGS myself in
> make.conf, without explicitly specifying the prefix include and library
> paths. I somehow expected that to be handled automatically.
>
> I spent time including the wrapper, because I want the prefix to work as
> a development environment for mathematical software as well. If you
> work in the shell started by the startprefix script, things should
> work seamlessly and the compiler should look in the right places for
> header files and libraries. The wrapper solves this problem perfectly.
>
OK.
> > Well done so far. We need a repo. While we are putting this together
> > I'd like it if you added the following to etc/make.conf:
> > PORT_LOGDIR="${SBASE}"/var/log/portage
> > PORTAGE_ELOG_CLASSES="warn error info log qa"
> > PORTAGE_ELOG_SYSTEM="save"
> > FEATURES="split-log"
> >
> > That way we have a log record similar to the one produced by
> > sage when building spkg. I have a feeling we may need it.
> > The "split-log" means that the log will be sorted in folders
> > according
> > to categories (app-shell and so on) given the clutter generated that's
> > fairly useful.
> > I still build sage on a machine that doesn't have sse2 you know!
>
> It might be cleaner to add these to the make.defaults file for portage.
> Then we won't confuse the user with the extra lines in make.conf. I
> will revise the patch for make.defaults.
>
OK.
> There is a mercurial repository which you can pull from in
>
> http://sage.math.washington.edu/home/burcin/portage
>
If we are seriously working on this I'll be more concerned about
finding somewhere to host a clone and push [google code comes to mind]
Francois
Yes that's a big problem with the current tarball of Burcin.
It doesn't fail for him or me because we already have the stuff in the system.
On Thu, 05 May 2011 00:33:57 +1200
Francois Bissey <francoi...@canterbury.ac.nz> wrote:
> > > Well done so far. We need a repo. While we are putting this
> > > together I'd like it if you added the following to etc/make.conf:
> > > PORT_LOGDIR="${SBASE}"/var/log/portage
> > > PORTAGE_ELOG_CLASSES="warn error info log qa"
> > > PORTAGE_ELOG_SYSTEM="save"
> > > FEATURES="split-log"
> > >
> > > That way we have a log record similar to the one produced by
> > > sage when building spkg. I have a feeling we may need it.
> > > The "split-log" means that the log will be sorted in folders
> > > according
> > > to categories (app-shell and so on) given the clutter generated
> > > that's fairly useful.
> > > I still build sage on a machine that doesn't have sse2 you know!
> >
> > It might be cleaner to add these to the make.defaults file for
> > portage. Then we won't confuse the user with the extra lines in
> > make.conf. I will revise the patch for make.defaults.
> >
>
> OK.
>
> > There is a mercurial repository which you can pull from in
> >
> > http://sage.math.washington.edu/home/burcin/portage
> >
>
> If we are seriously working on this I'll be more concerned about
> finding somewhere to host a clone and push [google code comes to mind]
I added support for logging and put the repository on bitbucket:
https://bitbucket.org/burcin/sage-prefix
I will be heading home now. No time to make a new tarball
unfortunately.
Tomorrow, I will try to look into Volker's problem with NTL. You are
probably right and it is caused by the wrapper not working as expected.
Removing the sse2 use flag makes the gf2x build crash. Should NTL
depend on gf2x conditionally?
Cheers,
Burcin
Just curious --- why did you drop it? Is it described at ideas.rst below?
> My problem with Gentoo in general is that it solves the problems that SPKGs
> have by adding complexity (in the same way any Linux distro does).
> I much prefer something like Nix (http://nixos.org), where Eelco Dolstra
> instead had a new, brilliant idea which just makes simple things powerful. I
> wrote these notes up on using Nix for a scientific Python distribution
> (including Sage):
> https://github.com/dagss/scidist/blob/master/ideas.rst
>
> (I may be interested in putting in work in this direction...)
> But of course, Gentoo has a scientific community etc. etc. which Nix sort of
> lacks, so I can definitely see Gentoo making more sense for you.
Btw, I have created a Sage compatible distribution:
all source code is hosted at github, and this 800 lines script:
https://github.com/qsnake/qsnake/blob/master/spkg/base/qsnake_run.py
is the whole "qsnake" program (just like the "sage" program) with all
options, package management (with build dependencies etc.) and so on.
Since I switched to use Fortran mainly, from C/C++ recently, I'll make
sure that the Fortran support works well (it is so so at the moment
---- but it uses the default Fortran on linux, no wrapper).
In any case, each package is just a regular git repo, and so patches
to it can be submitted upstream quite easily. However, given my
limited time, and the size of the problem, I can see that it doesn't
solve all problems. I'll study the ideas.rst in more details, as I can
see, lots of very clever people have thought about this already.
For my usage I use Qsnake and it works excellent for me (I use it
every day). I use it in the following way:
certik1@pike:~/repos/dftatom(master)$ qsnake --shell
Type CTRL-D to exit the Qsnake shell.
Qsnake: certik1@pike:~/repos/dftatom(master)$
and then with the "Qsnake" prefix on the command line, I can use all
the program installed in there (cmake, python, scipy, ....). No need
to be root.
Ondrej
On Wed, May 4, 2011 at 12:51 AM, dagss <d.s.se...@astro.uio.no> wrote:
> I don't really have a say in this, but I've given this a lot of thought
> since I decided to drop Sage as my scientific Python distribution a year ago
> and have been searching for a new one ever since.Just curious --- why did you drop it? Is it described at ideas.rst below?
> My problem with Gentoo in general is that it solves the problems that SPKGs
> have by adding complexity (in the same way any Linux distro does).
> I much prefer something like Nix (http://nixos.org), where Eelco Dolstra
> instead had a new, brilliant idea which just makes simple things powerful. I
> wrote these notes up on using Nix for a scientific Python distribution
> (including Sage):
> https://github.com/dagss/scidist/blob/master/ideas.rst
>
> (I may be interested in putting in work in this direction...)
> But of course, Gentoo has a scientific community etc. etc. which Nix sort of
> lacks, so I can definitely see Gentoo making more sense for you.
Btw, I have created a Sage compatible distribution:all source code is hosted at github, and this 800 lines script:
https://github.com/qsnake/qsnake/blob/master/spkg/base/qsnake_run.py
is the whole "qsnake" program (just like the "sage" program) with all
options, package management (with build dependencies etc.) and so on.
This is exactly what we needed. Thank you.
Can you tag the release with "hg tag"? This will let bitbucket generate
a tarball with a human readable name.
Cheers,
Burcin
Right. The same reasons why I started Qsnake --- I was spending too
much time creating SPKG, updating it and so on. In Qsnake, all I have
to do is to push a new change to the package to github, and do
qsnake -d
qsnake -f install package
And that's it. It automatically figures out that something has
changed, creates the spkg on the fly and saves it to spkg/standard/,
just like in Sage.
If you are the only one using it --- do you need binary packages? I
simply decided to stick with the Sage model to just use source Spkg
packages, and possibly create one binary of the whole thing. This is a
model, that one person can manage to do.
Ondrej
That's not normal. Could you forward me the failing log? As for conditional
dependency it used to be that way but I don't see a reason to change it.
I have started populating your tree - it is not complete yet. I think I
haven't put any autotools which will be an extra requirement compared to
vanilla sage. I will also create a virtual/gmp so we can switch between mpir
and gmp. I am not sure how complete this is yet. I'll have to test from the
mac :)
Francois
> > On Thu, 05 May 2011 00:33:57 +1200
> >
> > I added support for logging and put the repository on bitbucket:
> >
> > https://bitbucket.org/burcin/sage-prefix
> >
> > I will be heading home now. No time to make a new tarball
> > unfortunately.
> >
> > Tomorrow, I will try to look into Volker's problem with NTL. You are
> > probably right and it is caused by the wrapper not working as
> > expected.
> >
> > Removing the sse2 use flag makes the gf2x build crash. Should NTL
> > depend on gf2x conditionally?
> >
> That's not normal. Could you forward me the failing log? As for
> conditional dependency it used to be that way but I don't see a
> reason to change it.
I'm building without the sse2 use flag now. I'll put the logs up
somewhere if/when it fails.
> I have started populating your tree - it is not complete yet. I think
> I haven't put any autotools which will be an extra requirement
> compared to vanilla sage. I will also create a virtual/gmp so we can
> switch between mpir and gmp. I am not sure how complete this is yet.
> I'll have to test from the mac :)
I just pushed some more changes to bitbucket. The latest version builds
on a 32-bit debian squeeze machine. I will also try it on other linux
variants I find.
http://sage.math.washington.edu/home/burcin/sage-prefix-20110507.tar
I am hoping to get away without installing autotools, at least on
platforms Sage doesn't need them. Using the gentoo wrappers for
auto{conf,make} were enough for debian. It seems the debian autoconf
wrapper chooses the older version by default whereas gentoo picks the newer one. :)
This tarball should also solve Volker's problem where ntl couldn't find
gf2x. I realized that I completely misunderstood what exactly the
compilerwrapper does. After all it was necessary to add the include and
library paths to CFLAGS. I plan to patch compilerwrapper in the future
to do this itself.
Cheers,
Burcin
This tarball should also solve Volker's problem where ntl couldn't find
gf2x. I realized that I completely misunderstood what exactly the
compilerwrapper does. After all it was necessary to add the include and
library paths to CFLAGS. I plan to patch compilerwrapper in the future
to do this itself.
> > Removing the sse2 use flag makes the gf2x build crash. Should NTL
> > depend on gf2x conditionally?
> >
> That's not normal. Could you forward me the failing log? As for
> conditional dependency it used to be that way but I don't see a
> reason to change it.
Here is the log:
http://sage.math.washington.edu/home/burcin/gf2x-0.9.5:20110507-133059.log
All the logs from that build are here:
http://sage.math.washington.edu/home/burcin/gf2x_sse2_logs.tar.bz2
This should be reproducible by just removing any mention of sse2 from
install.sh.
Thank you.
Burcin
> You shouldn't need autotools to build anything, only the
> autogenerated scripts that are in the source tarball. But it seems
> like some patches are re-running autoconf. On my Fedora 14 install it
> breaks early on:
<snip error log>
Unfortunately gentoo ebuilds assume that autotools are available.
Initially, it failed in the same place while trying to build on debian.
If you already have autoconf and autoheader, it is merely a problem of
the wrapper picking the right executable. I will see if I can get
access to a fedora 14 box to fix this.
Thanks.
Burcin
> On Saturday, May 7, 2011 2:29:27 PM UTC+1, Burcin Erocal wrote:
> >
> > This tarball should also solve Volker's problem where ntl couldn't
> > find gf2x. I realized that I completely misunderstood what exactly
> > the compilerwrapper does. After all it was necessary to add the
> > include and library paths to CFLAGS. I plan to patch
> > compilerwrapper in the future to do this itself.
> >
>
> Since there is already the standard CFLAGS variable I didn't
> implement an extra WRAPPER_CFLAGS. Could be done, of course, but
> CFLAGS is generally well-supported so why reinvent the wheel.
I want the compiler wrapper to handle building programs within the
prefix without the user having to keep track of the prefix root, etc.
The prefix should be easy to use as a development environment for math
software, where all the core libraries are already present.
> A more interesting option might be to use the compilerwrapper to
> check that every package respects CFLAGS. That is, set
> CFLAGS='CFLAGS_TAG' and then remove it from the gcc command line in
> the compilerwrapper (or abort if it is missing).
This might be an issue for Sage, but I don't think it is needed if we
take gentoo ebuilds. At least I hope their QA process makes sure these
work as intended.
Cheers,
Burcin
> Since there is already the standard CFLAGS variable I didn't
> implement an extra WRAPPER_CFLAGS.
I want the compiler wrapper to handle building programs within the
prefix without the user having to keep track of the prefix root, etc.
The prefix should be easy to use as a development environment for math
software, where all the core libraries are already present.
> On Sat, 07 May 2011 21:15:11 +1200
>
>
> I just pushed some more changes to bitbucket. The latest version builds
> on a 32-bit debian squeeze machine. I will also try it on other linux
> variants I find.
>
> http://sage.math.washington.edu/home/burcin/sage-prefix-20110507.tar
>
> I am hoping to get away without installing autotools, at least on
> platforms Sage doesn't need them. Using the gentoo wrappers for
> auto{conf,make} were enough for debian. It seems the debian autoconf
> wrapper chooses the older version by default whereas gentoo picks the newer
> one. :)
>
That would be nice but we are adding to the pre-requirements to build sage.
We need them to patch any configure/makefile.am/libtool problems.
Francois
> On Sat, 07 May 2011 21:15:11 +1200
>
> Francois Bissey <francoi...@canterbury.ac.nz> wrote:
> > > Removing the sse2 use flag makes the gf2x build crash. Should NTL
> > > depend on gf2x conditionally?
> >
> > That's not normal. Could you forward me the failing log? As for
> > conditional dependency it used to be that way but I don't see a
> > reason to change it.
>
> Here is the log:
>
> http://sage.math.washington.edu/home/burcin/gf2x-0.9.5:20110507-133059.log
>
Access forbidden for that one.
> All the logs from that build are here:
>
> http://sage.math.washington.edu/home/burcin/gf2x_sse2_logs.tar.bz2
>
But I get that one.
I think I see the kind of problem in configure. It will be a problem if we
want to create binaries for older machines. It is definitely a bug.
That raise the question of useflags do we give people some choices before
they start?
Francois
> > On Sat, 07 May 2011 21:15:11 +1200
> >
> > Francois Bissey <francoi...@canterbury.ac.nz> wrote:
> > > > Removing the sse2 use flag makes the gf2x build crash. Should
> > > > NTL depend on gf2x conditionally?
<snip log exchange>
> I see the kind of problem in configure. It will be a problem
> if we want to create binaries for older machines. It is definitely a
> bug. That raise the question of useflags do we give people some
> choices before they start?
We should make sure the packages build with different use flags. They
provide great flexibility. In this case, they could just replace the
SAGE_FAT_BINARY environment variable.
I don't know how/when to let the user configure use flags. I only set
sse2 by default because gf2x didn't build otherwise. :) I would expect
this to be done by some autodetect script in the future, but for now,
we can make the install script work in two stages. First sets up
portage proper, the next stage installs the rest which would include
packages that might be affected by the optimization flags.
I will introduce functions for these stages in install.sh and allow
them to be run individually with command line arguments.
Thanks.
Burcin
Because I didn't know about them. :)
I will change the baselayout-prefix ebuild to add these as
default environment variables for the prefix. This saves me having to
patch compilerwrapper. Thanks.
Are these GCC specific? Are there equivalent parameters for Intel/Sun
compilers?
Cheers,
Burcin
OK, I am sorry I haven't provided you with a fix yet. Things are a bit hectic
again for me at the moment. Hopefully I'll have a nice quiet spot on Thursday.
Francois
No worries. We also haven't faced any of the bigger outstanding issues,
like relocating the tree or setting up packages in an "easy to
patch/developer friendly" way. There really is no hurry to fix this. :)
Cheers,
Burcin