Karim Belabas on Tue, 21 Apr 2015 21:43:39 +0200


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

Re: Problems Compiling on AIX 7.1 with XLC Compiler


* Brent L. Bates [2015-04-21 21:33]:
>      I've been trying to compile pari-2.7.3 on our IBM Power 7 running
> AIX 7.1 with the XLC compiler version 12.1 and having problems.  I
> think I've finally figured out what the problem is, but don't know how
> to fix it.  PARI has a function vec_insert.  The XLC compiler also has
> a built-in function vec_insert and is defined in an internal include
> file.  This conflicts with the definition in src/headers/paridecl.h.
>      Is the vec_insert PARI function an internal function?

It's an internal *public* function.

> If so, maybe I can rename it everywhere in the source files to
> something else.  If it is an external API function that software
> trying to use PARI, I don't know how I can easily work around this
> problem.  Any pointers or suggestions would be greatly appreciated.

I'd rather try something like

#define vec_insert pari_vec_insert

at the top of src/headers/paridecl.h.

The resulting libpari library will be incompatible with the standard one
(external programs using pari's vec_insert will need to use
pari_vec_insert instead), but at least 'gp' should build.

Cheers,

    K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux         Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]
`