-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show unusual dlerrors #7940
Show unusual dlerrors #7940
Conversation
👍 |
Whole bunch of warnings on Mac Travis |
Yeah, probably would need to check for that too and any different message On Sun, Aug 10, 2014 at 10:21 AM, Tony Kelman notifications@github.com
|
how about instead of trying to parse error messages, just adding a call to |
That's not sufficient. Some systems also tell you if dependent libraries are missing and if so which. |
It's sufficient for that case, since you would know the file exists, and then care about possibly showing that error message |
Ok, let's try that approach. |
(though I'm not crazy about parsing error messages, either) |
That's a fair point. Can we look at the error code rather than the error message? |
I was wondering about that, but libuv doesn't seem to have useful error codes: |
it doesn't appear the but perhaps you could lookup a known invalid location ( |
I take it you mean the resulting error string, so that we don't have to worry about cross-platform differences? |
right |
2ef98c5
to
0388647
Compare
BUMP :) |
This might help JuliaPackaging/BinDeps.jl#126 become more useful too... |
Sorry, I'll get to this soon. I think I ran in to issues trying to use the cache-the-error-message strategy on different platforms. Probably would be better to Do The Right Thing and expose the error in libuv. |
This would be nice to have. Maybe we can just hack in a list of things to search for with strstr to exclude boring errors. If you see a dlerror you don't like, add it to the list. |
Trying a different approach to make this better. Parsing error messages just makes me sad, and will also often exclude an actually-correct error message. |
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 inDL_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 printingcannot 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 theNo such file
message is shown as a warning. For example, with this PR I get:Whereas previously
... No such file...
was shown. Situations where this applies includefind_library
andccall
-initiated dl-searches.