JuliaLang/julia — pull request #7940 by ihnorton (2014-08-10 05:09:37+00:00)
Title: Show unusual dlerrors

This is an issue as much as a PR. `jl_load_dynamic_library` is quite helpful in that it tries *hard* to find a shared library: every path in `DL_LOAD_PATH` is tried with all the possible extensions appended for a given platform. For non-throwing invocations (`throw_err = 0`), this usually leads to shadowing any "real" loading errors and instead printing `cannot open shared object file: No such file or directory` --- because that is most often the last thing that happened in the stack of file permutations. In this PR, the error string is checked, and anything other than the `No such file` message is shown as a warning. For example, with this PR I get:

```
WARNING: while loading libcxxffi-debug: /home/isaiah/.julia/Cxx/src/../deps/usr/lib/libcxxffi-debug.so: undefined symbol: _ZN4llvm18format_object_base4homeEv
```
Whereas previously `... No such file...` was shown. Situations where this applies include `find_library` and `ccall`-initiated dl-searches.