Karim Belabas on Wed, 19 May 2004 10:28:17 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: gp: anal.c more bugs

* Joe Christy [2004-05-19 02:39]:
>   Vis-a-vis your note of 04/28/2004 08:03 PM:
> >On Thu, Apr 29, 2004 at 12:38:27AM +0200, Bill Allombert wrote:
> >>PARI is a library for performing fast computation in number-theory.
> >>For that purpose, GMP support is a large improvement. On the other end,
> >>plotting support outside of GP is marginaly useful.
> 	For my $0.02, I don't believe that including graphics in libpari is 
> 	an acceptable idea.
> 	I have just spent an entire afternoon trying and failing to build a 
> program that links against libpari (at version 2.2.8) and doesn't use 
> any graphics whatsoever. No matter what loader flags I pass, it fails with:
> /usr/local/lib/libpari.so: undefined reference to `plot_outfile_set'
> /usr/local/lib/libpari.so: undefined reference to `set_pointsize'
> /usr/local/lib/libpari.so: undefined reference to `rectdraw0'
> /usr/local/lib/libpari.so: undefined reference to `term_set'
> /usr/local/lib/libpari.so: undefined reference to `PARI_get_plot'
> collect2: ld returned 1 exit status

You may update from CVS, the above problem should go away.

My tentative patch aimed at implementing easy redistribution of object
files between gp (who needs graphical libraries!) and the libpari. When
I noticed the complications with the -l / -L flags, I stopped halfway, still
hoping to find a good solution. So that the libpari built from CVS was
effectively unusable (2.2.7 is OK).

I have uninstalled the patch completely for the time being. It's not only a
matter of graphical routines, install() from highlvl.c might need -ldl on a
few systems for instance.

Sorry about your lost afternoon... 


P.S: I guess the only sensible solution is to have 

*  a "minimal" libpari.so (as it stood in 2.2.7. Not exactly minimal since
more than 50% is specialized algebraic number theory which many users won't
need...). Full backward compatibility for existing programs is a priority,
at least with default Configure settings (--with-gmp is different).

*  an extra libparigp.so containing highlvl, graphical interfaces, and possibly other useful stuff from GP (all headers would need to be installed then).
If a program intends to be linked with -lparigp, it will provide a Makefile
(or 'configure') to check the pari.cfg file and find the proper -I/-L/-l
flags  [ mostly, the same ones used to compile gp ]
Karim Belabas                     Tel: (+33) (0)1 69 15 57 48
Dep. de Mathematiques, Bat. 425   Fax: (+33) (0)1 69 15 60 19
Universite Paris-Sud              http://www.math.u-psud.fr/~belabas/ 
F-91405 Orsay (France)            http://pari.math.u-bordeaux.fr/  [PARI/GP]