Hi Armin, I think we can include 'lib' in so_prefix of all Posix platforms, is that right? I can’t seem to find a definitive answer for all POSIX platforms. But for all the ones that PyPy currently supports, I think the answer is true. So if you want to make the changes then I think it’s a reasonable assumption and a good idea.
I still have no clue why all our tests still pass on OS/X I think it’s because `rpython.translator.platform.Platform._finish_linking` function doesn’t include `so_prefixes` on the platform in the first place, so for tests like `test_lib_on_libpaths` will generate a shared library called `c_file.dylib`. Then in `get_ctypes_callable` function it prepends the library name with the currently empty prefix on Darwin platform, it can find the shared library file with the constructed absolute path. So the proposed fix will still work because it includes both ‘lib’ and empty prefix. On the other hand, I wonder if it’s also reasonable to modify the `_finish_linking` function to include `platform.so_prefix[0]` to the generated shared library name (see the attached patch). Regards, John Zhang ------------------------------------------------------ John Zhang Research Assistant Programming Languages, Design & Implementation Division Computer Systems Group ANU College of Engineering & Computer Science 108 North Rd The Australian National University Acton ACT 2601 john.zh...@anu.edu.au<mailto:john.zh...@anu.edu.au> On 6 Dec. 2016, at 20:48, Armin Rigo <armin.r...@gmail.com<mailto:armin.r...@gmail.com>> wrote: Hi John, On 6 December 2016 at 03:06, John Zhang <john.zh...@anu.edu.au<mailto:john.zh...@anu.edu.au>> wrote: So I think it’s right to make a simple fix as suggested in the patch to include ‘lib’ in the so_prefix on Darwin platforms. I think we can include 'lib' in so_prefix of all Posix platforms, is that right? It's already in linux, bsd and cygwin. I still have no clue why all our tests still pass on OS/X (apart from the skipped one you found) but I guess that's a fine fix anyway. A bientôt, Armin.
_finish_linking_so_prefix.patch
Description: _finish_linking_so_prefix.patch
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev