Hi Bernard, I couldn't reproduce the problem with Mac OS X 10.8.0. I managed to build a standalone application fine but I've committed the patch as you suggested.
Best regards, David
On 02/10/2012 11:13, Bernard Berthomieu wrote:
Hello,
poly builds and runs fine on mac, but standalone applications do not work (on OSX 10.6.8, at least). When running aplications, one gets:
dyld: Symbol not found: _environ Referenced from: / ... /lib/libpolyml.4.dylib Expected in: flat namespace in / ... /lib/libpolyml.4.dylib Trace/BPT trap
It happens that variable environ cannot be accessed directly from shared libraries; there is a paragraph about that in the environ(7) man page (last paragraph).
The fix is to replace in file libpolyml/process_env.cpp
the line:
extern char **environ;
by:
#if __APPLE__ #include <crt_externs.h> #define environ (*_NSGetEnviron()) #else extern char **environ; #endif
Best, Bernard.
polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml