# HG changeset patch # User jpswensen@compsci34-82-1651.compscidhcp.jhu.edu # Date 1224789771 14400 # Node ID ed5811a1ec8f9a0c5dd094db5b666cd87e8a1dc7 # Parent 095b3e4d64e99065bba14a14fcf849cc68a14fff Added output about why a library load fails on OSX diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2008-10-23 John Swensen + + * oct-shlib.cc (octave_dyld_shlib::open): Call NSLinkEditError to + get better diagnostic if NSLinkModule fails. + 2008-10-23 John W. Eaton * oct-shlib.cc (octave_dlopen_shlib::open): Use RTLD_NOW instead diff --git a/liboctave/oct-shlib.cc b/liboctave/oct-shlib.cc --- a/liboctave/oct-shlib.cc +++ b/liboctave/oct-shlib.cc @@ -611,8 +611,16 @@ } else { - (*current_liboctave_error_handler) - ("couldn't link module %s", file.c_str ()); + NSLinkEditErrors ler; + int lerno; + const char *file2; + const char *errstr = 0; + + NSLinkEditError (&ler, &lerno, &file2, &errstr); + + if (errstr) + (*current_liboctave_error_handler) + ("%s: %s", file.c_str (), errstr); } } else