[pypy-dev] '@rpython/$(TARGET)' problem

Armin Rigo armin.rigo at gmail.com
Mon Feb 20 10:29:52 EST 2017


Hi John,

On 16 February 2017 at 01:50, John Zhang <John.Zhang at anu.edu.au> wrote:
> Hi all (Armin?),
> I have been troubled by the line rpython/translator/platform/drawin.py:35,
> where it adds ‘@rpath/$(TARGET)’ to the linker arguments for shared
> libraries. This assumes that the usage case will be from a Makefile, where
> $(TARGET) is defined. However, in
> ExternalCompilationInfo.compile_shared_library function, which I use to
> compile a few support C files into a shared library dependency, there is no
> Makefile involved, yet the flag is still involved in the final linking. This
> seemed to pose a problem for other shared library that depends on the
> compiled library, and dlopen was complaining that it cannot find library
> ‘@rpath/$(TARGET)’.
> I’m wondering if there is a good solution for this. A possible solution
> would be to add a default parameter for _args_for_shared, which could be
> altered if not compiled using Makefile.
> What do you think?
> The attached is a suggested solution.

I've checked in a similar solution (your patch is not acceptable
because it breaks on non-OS/X platforms).  Can you check if it works
for you?


A bientôt,

Armin.


More information about the pypy-dev mailing list