Ilya Zakharevich on Fri, 21 May 2004 21:57:26 +0200


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

Re: gp: anal.c more bugs


On Thu, May 20, 2004 at 08:41:00PM -0700, Joe Christy wrote:
> >Where is it going to find this file?  I propose a small shell script
> >pari_config which will emit the contents of configuration; something like
> >
> >  echo <<'EOE'
> >  foo="bar"
> >  parigp_l="-LXXX -lyyy"
> >  EOE
> >
> >And put it on PATH alongside the gp executable.
> >...
> 
> 	(Why didn't I think of this a few days ago?) Perhaps a better idea 
> would be to parse the ldd (1) output of:
> 	ldd <some_path>/libpari-2.2.so

This assumes that the architecture has ldd, and the build is dynamic,
and the DLL extension is .so, and the names of required DLLs coincide
with names of libraries to link to; too many assumptions to make it
feasible...

> Even better, just embed the needed flags as a string ala:
> 	"PariLoaderFlags=-LXXX -LZZZ <...> -lyyy -lwww <...>"
> in libpari itself where strings (1) could extract it.

This assumes that the library is not compressed.  On OS/2, the pages
of executables are compressed.

> You have to be able to find libpari to link against it, and the
> second strategy would make it self-documenting.

Nope; *the linker* can find it; but who said that *you* can?  If you
already know where the library file is, one can put pari.cfg alongside
it anyway for an easier solution...

Hope this helps,
Ilya