Karim Belabas on Sat, 12 Apr 2008 22:06:53 +0200


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

Re: Building under Fedora 8: missing exp2 and log2


* Bill Allombert [2008-03-06 22:48]:
> On Wed, Mar 05, 2008 at 10:48:52PM -0800, Rob McMillin wrote:
> > I'm building -- or trying to build -- Pari under Fedora 8 using all 
> > stock parts, with all the pieces up to date. This means GCC 4.1.2 under 
> > Linux i386 kernel 2.6.23-15. I get an "I did not find" error for both 
> > exp2 and log2; it appears that exp2 and log2 are implemented as #define 
> > macros, which fools the detection mechanism in has_exp2.c and 
> > has_log2.c, which seem to be looking for a linkable function with the 
> > exact name. There is an underlying function to handle this, but there 
> > are layers of macros that obscure the actual function calls. Any help 
> > you could offer would be gratefully received.
> 
> Thanks for your report!
> 
> I can reproduce the this issue but it does not prevent the build to 
> complete here. See for example:
> http://pari.math.u-bordeaux.fr/buildlogs/95a98c6f-3195-4782-bafe-ea8d4147f2da
> 
> I do not know whether we want to actually use exp2 and log2 in this
> case, we might reopen the problem solved by 2.2.8-F43:
> 
> 2.2.8-F43- Configure was missing log2/exp2 on systems that had it

The discussion that led to the present setup is archived starting at

  http://pari.math.u-bordeaux.fr/archives/pari-dev-0405/msg00002.html

reaching a conclusion at

  http://pari.math.u-bordeaux.fr/archives/pari-dev-0405/msg00008.html

(use Thread Prev / Thread Next links)

Since it is 

-- unimportant to "miss" either log2 or exp2 (hardly ever called, and
negligible even then),

-- rather annoying to "find" them erroneously (breaks compilation),

I'd rather not change anything unless the new proposition is uniformly
and obviously better than the current setup (no risk of regression, more
cases covered). Reverting to the old setup and using the fix proposed at

http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2004-September/041943.html

yields tons of warnings of the form:

../src/kernel/none/level1.h: In function ʽdbllog2rʼ:
../src/kernel/none/level1.h:805: warning: implicit declaration of function ʽlog2ʼ

Indeed,

-- the resulting binary works nevertheless (no measurable difference
in efficiency compared to the default)

-- compiling with CC="gcc -std=c99" (for instance) would kill the warnings

But this is exactly the kind of kludges I want to avoid.

Cheers,

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