[New-bugs-announce] [issue1418] Python/hypot.c is never used

Mark Dickinson report at bugs.python.org
Sat Nov 10 16:07:51 CET 2007

New submission from Mark Dickinson:

With the current ./configure setup, it looks to me as though there are 
no circumstances under which the file Python/hypot.c is compliled.
There's a line


in configure.in;  which is supposed (if I understand correctly) to check 
for a system hypot(), and use the replacement file hypot.c if the system 
hypot() isn't found;  but the mechanism for using the replacement file 
seems not to work:  I tried the following:

(1) replace all occurrences of hypot with myhypot in configure.in, 
pyport.h, complexobject.c, mathmodule.c and cmathmodule.c.
(2) move Python/hypot.c to Python/myhypot.c, and rename the function 
contained within from hypot to myhypot
(3) rerun autoconf and autoheader
(4) ./configure && make

The result:  as expected, during configuration I got:

checking for myhypot... no

but building failed with:

ar cr libpython2.6.a Objects/abstract.o Objects/boolobject.o Objects/
bufferobject.o Objects/cellobject.o Objects/classobject.o Objects/
cobject.o Objects/codeobject.o Objects/complexobject.o Objects/
descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/
genobject.o Objects/fileobject.o Objects/floatobject.o Objects/
frameobject.o Objects/funcobject.o Objects/intobject.o Objects/
iterobject.o Objects/listobject.o Objects/longobject.o Objects/
dictobject.o Objects/methodobject.o Objects/moduleobject.o Objects/
object.o Objects/obmalloc.o Objects/rangeobject.o Objects/setobject.o 
Objects/sliceobject.o Objects/stringobject.o Objects/structseq.o 
Objects/tupleobject.o Objects/typeobject.o Objects/weakrefobject.o 
Objects/unicodeobject.o Objects/unicodectype.o
ar cr libpython2.6.a Python/Python-ast.o Python/asdl.o Python/ast.o 
Python/bltinmodule.o Python/ceval.o Python/compile.o Python/codecs.o 
Python/errors.o Python/frozen.o Python/frozenmain.o Python/future.o 
Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/
getmtime.o Python/getplatform.o Python/getversion.o Python/graminit.o 
Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o 
Python/mystrtoul.o Python/mysnprintf.o Python/peephole.o Python/
pyarena.o Python/pyfpe.o Python/pystate.o Python/pythonrun.o Python/
structmember.o Python/symtable.o Python/sysmodule.o Python/traceback.o 
Python/getopt.o Python/pystrtod.o Python/dynload_shlib.o Python/
mactoolboxglue.o Python/thread.o
ar cr libpython2.6.a Modules/config.o Modules/getpath.o Modules/main.o 
ar cr libpython2.6.a Modules/threadmodule.o  Modules/signalmodule.o  
Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  
Modules/_sre.o  Modules/_codecsmodule.o  Modules/zipimport.o  Modules/
symtablemodule.o  Modules/xxsubtype.o
ranlib libpython2.6.a
gcc -L/opt/local/lib -u _PyMac_Error -o python.exe \
                Modules/python.o \
                libpython2.6.a -ldl      
/usr/bin/ld: Undefined symbols:

(I'd like to know how to fix this:  I've been working on fixing some of 
the numerical problems in the cmath module, and hoped to imitate the 
hypot setup for the functions log1p, asinh and copysign.)

components: Build
messages: 57350
nosy: marketdickinson
severity: minor
status: open
title: Python/hypot.c is never used
versions: Python 2.5, Python 2.6

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list