Web lists-archives.com

Re: Problem loading dynamic libraries - file not found




On 2018-06-15 16:50, Roberto Ribeiro wrote:
> recently I've been running a lot into an error while trying to load dlls 
> compiled by cygwin: "ERROR: could not load library (...): No such file or 
> directory".
> The library in question is always there, however, and *appears* to have been
> correctly built (ldd and cygcheck both return the expected values).

Including the actual command, error message, cygcheck and ldd outputs could help
diagnose the problem.

The first suspicion in these cases is always an AV or other BLODA; see:

	https://cygwin.com/acronyms/#BLODA
and
	https://cygwin.com/faq/faq.html#faq.using.bloda

Or you could have non-Windows, non-Cygwin DLLs which are not being rebased if
you run:

	$ rebase-trigger full[rebase]

to setup a full rebase, then download and run:

	https://cygwin.com/setup-x86[_64].exe

to perform a full rebase on all known DLLs in known places; so then read:

	/usr/share/doc/{Cygwin/_autorebase.,rebase/}README

for how to handle non-Windows, non-Cygwin DLLs.

> Last time this happened, I found what could have been a linking problem in
> one of its dependencies, and just recompiled everything and now it works.
> But now I'm running on this problem again, in a library I wrote myself,
> which only links to dependencies I know are working, and everything that
> could possibly be called is in the PATH.
> So, my question is: what exactly does this "no such file or directory" error
> mean, and is there a way for me to debug it, or maybe get more comprehensive
> error messages?

You could debug with gdb, or run with:

	$ strace -o command.strace [-w] command ... [&]

where -w runs in a separate window if you need to use & at end for a long
running command.

If that does not clue you in sufficiently, also run:

	$ cygcheck -hrsv > cygcheck.out &

which may take a while if you have a lot of packages installed (e.g. X).

Reply with both files as *text* attachments so someone can help you out.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple