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
ctypes test_macholib fails if libz is not installed in /usr/lib #65292
Comments
I'm compiling on a Mac OS X 10.9.2. ====================================================================== Traceback (most recent call last):
File "/Users/machados/src/Python-3.4.0/Lib/ctypes/test/test_macholib.py", line 53, in test_find
self.assertTrue(result.startswith('/usr/lib/libz.1'))
AssertionError: False is not true I've added a print before the assert command and the library is successfully found: $ ./python.exe ./Lib/ctypes/test/test_macholib.py
/Users/machados/lib/libz.1.2.8.dylib
F ====================================================================== Traceback (most recent call last):
File "/Users/machados/src/Python-3.4.0/Lib/ctypes/test/test_macholib.py", line 54, in test_find
self.assertTrue(result.startswith('/usr/lib/libz.1'))
AssertionError: False is not true Ran 1 test in 0.001s As you can see the library is found in /Users/machados/lib/libz.1.2.8.dylib which is correct. |
Thanks for the report. It seems to me this is a very rare case here: since libz is supplied by OS X, it would be untypical for someone building Python to supply their own version in I was going to assert that you were the first person to ever report running into this issue but, searching a bit, I found bpo-1544102 which was never resolved but, thanks to your analysis, I now suspect was another instance with the same root cause. I guess we could change the test to accept a libz found in $HOME/lib or /usr/local/lib as well. Or we could just search for a different versioned system library less likely to shadowed in those locations, e.g. one not used in a Python build. |
New changeset e30142fde075 by Ned Deily in branch '2.7': New changeset 831bd1a1cf6c by Ned Deily in branch '3.4': New changeset 33c4c01404cd by Ned Deily in branch 'default': |
test_macholib has been changed to no longer fail if a local copy of libz is encountered on the dyld search path ($HOME/lib or /usr/local/lib). Applied for release in 3.5.0, 3.4.1, and 2.7.7. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: