Bug 79278 - pari-2.1.5-r4 failes to compile without -O in CFLAGS
Bug#: 79278 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: All Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: sci@gentoo.org Reported By: dragonheart@gentoo.org
Component: Library
URL: 
Summary: pari-2.1.5-r4 failes to compile without -O in CFLAGS
Keywords:  
Status Whiteboard: 
Opened: 2005-01-23 18:45 0000
Description:   Opened: 2005-01-23 18:45 0000
==========================================================================
Shall we try to build pari 2.1.5 (released) now (y/n)? [n]
Ok. Type "make install" when you are ready
Bye !
cd Olinux-i686; make gp
make[1]: Entering directory `/var/tmp/portage/pari-2.1.5-r4/work/pari-2.1.5/Olinux-i686'
cat ../src/kernel/ix86/level0.h ../src/kernel/none/level1.h > pariinl.h
/usr/lib/ccache/bin/gcc  -E -I. ../src/kernel/ix86/l0asm.c | sed -e '/^#/d' -e '/^ *#line/d' -e 's/%  */%/g' > level0.s
../src/kernel/ix86/l0asm.c:104:1: pasting "addll" and ":" does not give a valid preprocessing token
../src/kernel/ix86/l0asm.c:114:1: pasting "addllx" and ":" does not give a valid preprocessing token
../src/kernel/ix86/l0asm.c:126:1: pasting "subll" and ":" does not give a valid preprocessing token
../src/kernel/ix86/l0asm.c:136:1: pasting "subllx" and ":" does not give a valid preprocessing token
../src/kernel/ix86/l0asm.c:148:1: pasting "shiftl" and ":" does not give a valid preprocessing token
../src/kernel/ix86/l0asm.c:160:1: pasting "shiftlr" and ":" does not give a valid preprocessing token
../src/kernel/ix86/l0asm.c:172:1: pasting "bfffo" and ":" does not give a valid preprocessing token
../src/kernel/ix86/l0asm.c:181:1: pasting "mulll" and ":" does not give a valid preprocessing token
../src/kernel/ix86/l0asm.c:189:1: pasting "addmul" and ":" does not give a valid preprocessing token
../src/kernel/ix86/l0asm.c:200:1: pasting "divll" and ":" does not give a valid preprocessing token
/usr/lib/ccache/bin/gcc -c -pipe -DGCC_INLINE -I. -I../src/headers -o kernel.o level0.s
/usr/lib/ccache/bin/gcc -c -pipe -DGCC_INLINE -I. -I../src/headers -o mp.o ../src/kernel/none/mp.c
/usr/lib/ccache/bin/gcc -c -pipe -DGCC_INLINE -I. -I../src/headers  -o alglin1.o ../src/basemath/alglin1.c
In file included from ../src/headers/pari.h:69,
                 from ../src/kernel/none/mp.c:23:
../src/headers/parisys.h:52:10: #error "no inlining without -O. Put back -O or remove -DGCC_INLINE"
In file included from ../src/headers/pari.h:69,
                 from ../src/basemath/alglin1.c:22:
../src/headers/parisys.h:52:10: #error "no inlining without -O. Put back -O or remove -DGCC_INLINE"
make[1]: *** [mp.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [alglin1.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/pari-2.1.5-r4/work/pari-2.1.5/Olinux-i686'
make: *** [gp] Error 2

!!! ERROR: sci-mathematics/pari-2.1.5-r4 failed.
!!! Function src_compile, Line 50, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

Portage 2.0.51-r14 (default-linux/x86/2005.0, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.7-hardened-r18 i686)
=================================================================
System uname: 2.6.7-hardened-r18 i686 AMD Athlon(tm) XP 1900+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Oct 24 2004, 08:06:09)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache cvs distlocks sandbox sfperms sign userpriv usersandbox"


Strip -DGCC_INLINE if no -O set?

------- Comment #1 From George Shapovalov 2005-11-08 06:03:30 0000 -------
Well, it really is better to force optimization, as usually such (math)  
packages rely on certain tricks to be performed by compiler. Plus it appears 
not totally trivial to strip -DGCC_INLINE, although I tried only apparent fix 
so far (seding it out from all referencing files). 
 
Fixed anyway (by forcing optimization), + I added a fix for linking problem 
(-fPIC was needed). 
 
George 
  

------- Comment #2 From Janeth Pérez 2009-05-14 20:23:44 0000 -------
The solution is to force the optimization as follows:
perl Makefile.PL optimize=-O
make
make test 
make install

Regards,
janperez