Open deto opened 8 years ago
maybe we need:
extra_compile_args = ['-O3', '-std=c99']
in setup.py (line 10)
can you try that and let me know if it works. I don't have access to a windows machine for testing.
Didn't help. The real issue seems to be that there just isn't any lgamma function in math.h for the Windows C compiler. To verify, I opened the file myself on my system and yep, definitely no lgamma.
See here for a compatibility table: http://www.johndcook.com/blog/math_h/
It seems to be the only function that's causing an issue, though. It all builds if I just remove lgamma (though of course, it's non-functional then).
It looks like there used to be an "lngamma" function, defined in the fischer source, that took care of this. I imagine the best solution would be to sense if lgamma exists and if not, use a fallback, though I don't know if there is an easy way to set that up in Cython.
On Wed, May 11, 2016 at 12:54 PM, Brent Pedersen - Bioinformatics < notifications@github.com> wrote:
maybe we need:
extra_compile_args = ['-O3', '-std=c99']
in setup.py (line 10)
can you try that and let me know if it works. I don't have access to a windows machine for testing.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/brentp/fishers_exact_test/issues/16#issuecomment-218570752
this is from 398c8ca by @superbobry . can you have a look?
I thought npy_math.h
has lgamma
but it doesn't, so the best way would be to simply resurrect the hand-rolled version.
Yes, looks like scipy has it - http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.gammaln.html#scipy.special.gammaln - though not sure how hard it would be to borrow the implementation. Or if it really is worth the effort - performance-wise.
Guys, any luck getting this work on windows?
I'm getting an error trying to install this on Windows. At first I tried this using conda, and after it failed there, I tried using just a barebones python2.7 install.
It seems that the issue stems from the fact that the Visual C++ for Python compiler that Microsoft released does not include an lgamma in its math.h
This appears to be the only issue. If I just replace the call to lgamma (in cfisher.c) with '0', then the package builds just fine.
See output from building a wheel below.