diff -r f3e0060afaae -r 28cc88d90ae2 setup.py --- a/setup.py Thu Mar 19 14:49:16 2015 -0500 +++ b/setup.py Thu Mar 19 14:49:25 2015 -0500 @@ -592,7 +592,8 @@ libraries=math_libs) ) # time libraries: librt may be needed for clock_gettime() - time_libs = [] + # floatsleep() needs math_libs for fmod() and floor() + time_libs = list(math_libs) lib = sysconfig.get_config_var('TIMEMODULE_LIB') if lib: time_libs.append(lib) @@ -649,7 +650,9 @@ missing.append('spwd') # select(2); not on ancient System V - exts.append( Extension('select', ['selectmodule.c']) ) + # pyepoll_poll needs math_libs for ceil() + exts.append( Extension('select', ['selectmodule.c'], + libraries=math_libs) ) # Fred Drake's interface to the Python parser exts.append( Extension('parser', ['parsermodule.c']) ) @@ -673,7 +676,9 @@ # Operations on audio samples # According to #993173, this one should actually work fine on # 64-bit platforms. - exts.append( Extension('audioop', ['audioop.c']) ) + # audioop needs math_libs for floor() in multiple functions. + exts.append( Extension('audioop', ['audioop.c'], + libraries=math_libs) ) # readline do_readline = self.compiler.find_library_file(lib_dirs, 'readline') @@ -1945,8 +1950,10 @@ libraries=[], sources=sources, depends=depends) + # function my_sqrt() needs math library for sqrt() ext_test = Extension('_ctypes_test', - sources=['_ctypes/_ctypes_test.c']) + sources=['_ctypes/_ctypes_test.c'], + libraries=['m']) self.extensions.extend([ext, ext_test]) if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):