I spent the whole day trying to compile Math::Pari with no success. My system is a Solaris 9 sparc, with gcc 3.4.2 and GNU make 3.8.0.

bash-2.05# make cd libPARI && make LIB="" LIBPERL_A="libperl.a" LINKTYPE="dynamic" PRE +FIX="" OPTIMIZE="-O" PASTHRU_DEFINE="" PASTHRU_INC="" make[1]: Entering directory `/exlibris/sfx_ver/sfx_version_3/app/.cpan +/build/Math-Pari-2.010602/libPARI' gcc -c -I.././pari-2.1.6/src/headers -I.././pari-2.1.6/src/graph -I. +-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE - +D_FILE_OFFSET_BITS=64 -O -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC -De +rr=pari_err -DSOLARIS -DASMINLINE -DGCC_INLINE -DDYNAMIC_PLOTTING -o +bibli1.o .././pari-2.1.6/src/basemath/bibli1.c gcc -c -I.././pari-2.1.6/src/headers -I.././pari-2.1.6/src/graph -I. +-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE - +D_FILE_OFFSET_BITS=64 -O -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC -De +rr=pari_err -DSOLARIS -DASMINLINE -DGCC_INLINE -DDYNAMIC_PLOTTING -o +buch2.o .././pari-2.1.6/src/basemath/buch2.c gcc -c -I.././pari-2.1.6/src/headers -I.././pari-2.1.6/src/graph -I. +-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE - +D_FILE_OFFSET_BITS=64 -O -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC -De +rr=pari_err -DSOLARIS -DASMINLINE -DGCC_INLINE -DDYNAMIC_PLOTTING -o +init.o .././pari-2.1.6/src/language/init.c gcc -c -I.././pari-2.1.6/src/headers -I.././pari-2.1.6/src/graph -I. +-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE - +D_FILE_OFFSET_BITS=64 -O -DVERSION=\"\" -DXS_VERSION=\"\" -fPIC -De +rr=pari_err -DSOLARIS -DASMINLINE -DGCC_INLINE -DDYNAMIC_PLOTTING -o +gen1.o .././pari-2.1.6/src/basemath/gen1.c ./pariinl.h: In function `gmul': ./pariinl.h:887: error: asm-specifier for variable `hiremainder' confl +icts with asm clobber list make[1]: *** [gen1.o] Error 1 make[1]: Leaving directory `/exlibris/sfx_ver/sfx_version_3/app/.cpan/ +build/Math-Pari-2.010602/libPARI' make: *** [libPARI/libPARI.a] Error 2

I tried setting many different values for the flags during perl Makefile.PL, including machine=none. But nothing worked, always the same error. Finally I found this: http://www.talkaboutprogramming.com/group/comp.lang.perl.modules/messages/64935.html

And decided to give to try it with an older version of gcc: version 3.1.1. I was afraid it was going to fail because perl was compiled with gcc 3.4.2. Well, I did get a lot of warnings, but it compiled! It also passed 'make test'.

I thought someone could benefit from this.

If someone has a better solution, please share.

-Andrés

In reply to Math::Pari doesn't compile with GCC 3.4.2 in Solaris 9 sparc by amonroy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.