test_dl.TestDL test failure
Issue #28
resolved
I am trying mpi4py 2.0.0 package for Linux Arch and got test_dl.TestDL test failure
running test
[0@anatol] Python 2.7 (/usr/bin/python2)
[0@anatol] MPI 3.0 (Open MPI 1.10.0)
[0@anatol] mpi4py 2.0.0 (build/lib.linux-x86_64-2.7/mpi4py)
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................F....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
======================================================================
FAIL: testDL1 (test_dl.TestDL)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_dl.py", line 18, in testDL1
self.assertTrue(handle != 0)
AssertionError: False is not true
----------------------------------------------------------------------
Ran 1025 tests in 5.293s
FAILED (failures=1)
error: test
Comments (8)
-
-
Recently, we hit a bug with
libm.so
within scipy that might be related to this. Usinglibm.so.6
should also fix this issue in that case. -
@anatol_pomozov Please confirm using
libm.so.6
works, then I'll try to push a fix. -
Here you have is a possible fix:
diff --git a/test/test_dl.py b/test/test_dl.py index a3211a3..53b9f36 100644 --- a/test/test_dl.py +++ b/test/test_dl.py @@ -15,6 +15,9 @@ class TestDL(unittest.TestCase): libm = 'libm.so' handle = dl.dlopen(libm, dl.RTLD_LOCAL|dl.RTLD_LAZY) + if handle == 0 and sys.platform.startswith('linux'): + self.assertTrue(dl.dlerror() is not None) + handle = dl.dlopen('libm.so.6', dl.RTLD_LOCAL|dl.RTLD_LAZY) self.assertTrue(handle != 0) self.assertTrue(dl.dlerror() is None)
-
reporter FYI content of my libm.so is
[anatol@arch ~]$ cat /usr/lib/libm.so /* GNU ld script */ OUTPUT_FORMAT(elf64-x86-64) GROUP ( /usr/lib/libm.so.6 AS_NEEDED ( /usr/lib/libmvec.so.1 ) )
And libm.so.6 is a pointer to the binary
[anatol@arch ~]$ ls -l /usr/lib/libm.so.6 lrwxrwxrwx 1 root root 12 Sep 1 10:09 /usr/lib/libm.so.6 -> libm-2.22.so [anatol@arch ~]$ ls -l /usr/lib/libm-2.22.so -rwxr-xr-x 1 root root 1038688 Sep 1 10:09 /usr/lib/libm-2.22.so
-
Could you please try my patch for the test file and tell me whether it works?
-
reporter Using libm.so.6 fixes the problem for me. Your patch also works.
-
- changed status to resolved
Thanks!
- Log in to comment
This test assumes you can
dlopen()
the shared librarylibm.so
. I guess you have not installed the glibc development package, or perhaps yourlibm
is not a shared library. Could you try to edit the test file and uselibm.so.6
instead?