On 08/04/13 12:21, David Matthews wrote:
- In the polyc that was built, I see EXTRA=" "
As it stands, the Poly/ML lib directory is not added to the linker path so I presume (for Linux) that this was meant to contain something like -Wl,-rpath ${LIBDIR} so that it is not necessary to set LD_LIBRARY_PATH before running the executable.
I really had in mind the Windows build which needs a few extra options. I hadn't thought of "rpath". My only concern would be if there are linkers around that don't support it. There doesn't seem to be a simple way in autoconf to find out if the linker supports it.
I have found something called config.rpath which seems to be part of the GNU portability library. This appears to calculate potentially useful values for passing rpath to linkers. acl_cv_hardcode_libdir_flag_spec may of use - I don't know. Nor do I know how you would go about using it!
Alternatively, LD_RUN_PATH could be set for the link command. Although probably benign if unsupported, I don't know how portable it is to other platforms.
Presumably I am experiencing this linker path issue because I have installed Poly/ML to a non-standard location(?) In such a set up, maybe it is reasonable to require LD_LIBRARY_PATH to be set for executables from polyc. Perhaps it is worth considering what would users expect if the compiled executables are copied to different systems.
Phil