| Karim Belabas on Thu, 04 Sep 2008 10:19:24 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Cross compiling PARI/what about autoconf? |
* Jeroen Demeyer [2008-09-03 18:56]:
> There is a certain thing which I have been wondering for a while, but now
> it seems to have become more serious: why does PARI not use autoconf?
Four reasons:
1) autoconf was not really popular (it existed, I think) when
I and Louis Granboulan wrote the first version of Configure around 1995.
2) configure scripts are convenient when guess right; but when they don't,
you're screwed ( until you're familiar enough with shell scripting to
debug 100kB machine-generated mumbo-jumbo; I am, but it's still a small
pain, becoming a large pain when you have to do it for five colleagues
who aren't ).
Configure has some amount of interactivity built-in to fix most common
problems. I know you can flag configure into submission using enough
arguments if you know the right answers, but it doesn't ask questions.
3) laziness: it's a lot of work translating all the know-how in the
current Configure to autoconf.
4) it worked so far [ OK, that's a variant of 3) I guess ]
> I would like to cross-compile a powerpc64-unknown-linux-gnu version of PARI
> on a powerpc-unknown-linux-gnu system, but I don't really know how to do it
> (PARI Configure gives me a warning that architecture
> powerpc64-unknown-linux-gnu is not tested and it assumes that sizeof(long)
> == 4, which is clearly wrong!)
I did cross-compile PARI a long time ago (the "DOS" version, using mingw).
It worked at the time for a limited set of configurations; Configure has
been largely expanded since, and needs to execute some amount lot of
code on the build host as a consequence ( where it used to rely on
parsing system headers ). So it definitely no longer works.
A possibility is to edit a pari.cfg by hand and let Configure -l load it.
> Apart from this cross-compiling issue, I think there are tons of good
> reasons to switch to autoconf. In particular, it is something which people
> know how to use, and I am sure that it will make it easier for GNU/Linux
> distributions to include PARI.
>
> So basically I want to know if there is a good reason why you don't switch
> to autoconf or is it just that somebody has to do it. In the latter case,
> I propose to do it myself. I just developed a small (math) project using
> autoconf/automake and I don't mind having a look at PARI. I don't really
> know when I will have time for it, but if you think that it is a good idea,
> I can start thinking about it.
In principle I would have no objection (it has been listed for ages in TODO,
with ever decreasing priority). But
1) it would need to integrate all the know-how in the current
Configure, and rely on the smallest possible subset of the existing
autoconf/automake languages [ ideally working with all of them ].
2) it's a non-trivial project with dubious advantages (cross-compiling),
and possibly annoying side effects (we lose Configure -a, perhaps not a
big deal). I believe development time would be better spent elsewhere,
for instance
-- reviewing/improving the library/gp documentation [ incl. the tutorial ]
-- stomping bugs from the BTS
-- having a look at the TODO items
etc.
But if you're really motivated by this, go ahead and give it a try.
Cheers,
K.B.
--
Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1 Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation http://www.math.u-bordeaux.fr/~belabas/
F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP]
`