Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMPY 1.14 on Mac OS X 10.6 gives 44 test failures #47

Closed
GoogleCodeExporter opened this issue Mar 15, 2015 · 9 comments
Closed

GMPY 1.14 on Mac OS X 10.6 gives 44 test failures #47

GoogleCodeExporter opened this issue Mar 15, 2015 · 9 comments

Comments

@GoogleCodeExporter
Copy link

The summary says it all.
I'm developing for Sympy which uses gmpy.
I installed gmpy1.14 using 'sudo python setup.py install' on the source.
import gmpy works fine. But as all tests do not pass, some code in sympy uses 
gmpy and crashes with a segmentation fault.

python test/gmpy_test.py returned with 1437 passed and 44 failed.
Although It either hided a segfault or there wasn't any.

What seems to be the problem ?

Did I install GMPY or GMP incorrectly ?

Original issue reported on code.google.com by sherjilo...@gmail.com on 2 Jun 2011 at 7:26

@GoogleCodeExporter
Copy link
Author

I'm using python 2.7 btw

Original comment by sherjilo...@gmail.com on 2 Jun 2011 at 7:27

@GoogleCodeExporter
Copy link
Author

Unfortunately, I don't have a Mac so I can't recreate the issue. 

What version of GMP did you use? 

Can you attach the output of the test results?

Does the discussion in this thread provide any clues? 

http://code.activestate.com/lists/python-list/180526/

casevh

p.s. Are there any specific changes/improvements/additions I can make that will 
help Sympy? I'm working on gmpy2 and I'm willing to make more aggressive 
changes on that version since it isn't stable yet.

Original comment by casevh on 3 Jun 2011 at 1:12

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Regarding changes that would help SymPy, you should ask Mateusz Paprocki.  He's 
the one who has written most of the code in SymPy that uses gmpy.  

Original comment by asmeurer@gmail.com on 3 Jun 2011 at 1:48

@GoogleCodeExporter
Copy link
Author

I have GMP5.02 installed, but I'm not sure. Is there a function which tells me 
which version is installed and currently in use ?
I have attached the test results.

Original comment by sherjilo...@gmail.com on 3 Jun 2011 at 8:53

Attachments:

@GoogleCodeExporter
Copy link
Author

Yes, IT was GMP5.02, I deleted libgmp.a and some related files from 
/usr/local/lib/ and reinstalled gmp using macports. It installed GMP%.01. 
Still, 44 test failures.

Original comment by sherjilo...@gmail.com on 3 Jun 2011 at 9:13

@GoogleCodeExporter
Copy link
Author

This is just a guess, but I think there may be a 32 vs. 64-bit version 
mismatch. I'm not sure how to verify that on a Mac. To compile GMP, you may 
need to use eithe -m32 or -m64 so that it matches Python. For performance 
reasons, I recommend 64-bit versions of both. 

Original comment by casevh on 3 Jun 2011 at 1:21

@GoogleCodeExporter
Copy link
Author

Could you tell me what is the best way to install GMP ?
I would also need to uninstall GMP first.

Original comment by sherjilo...@gmail.com on 13 Jun 2011 at 9:09

@GoogleCodeExporter
Copy link
Author

You may want to read some of the comments on issue 11. That issue dealt with 
gmpy2 but the issue is probable the same. By default, python runs as a 32-bit 
application on OSX but GMP compiles as a 64-bit library. To compile GMP as a 
32-bit library, you need to pass ABI=32 to configure (not -m32 as I said 
earlier). Or you can let GMP install as a 64-bit library, and force python to 
run as a 64-bit application. The following command is from issue 11.

$# defaults write com.apple.versioner.python Prefer-32-Bit -bool no

Note: the -Ddir=<path> option is not available in gmpy 1.14. If setup.py can't 
find GMP automatically, use the following:

python setup.py -build_ext -I<path>/include -L<path>/lib -R<path>/lib

Original comment by casevh on 14 Jun 2011 at 1:00

@GoogleCodeExporter
Copy link
Author

See issue 11 for build instructions for OSX. Let me know if that doesn't work 
for you.

Original comment by casevh on 17 Jul 2011 at 6:22

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant