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.

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>





Attachment: suggestion.patch
Description: suggestion.patch

_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to