public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problem loading dynamic libraries - file not found
@ 2018-06-16  2:05 Roberto Ribeiro
  2018-06-16  8:14 ` Brian Inglis
  0 siblings, 1 reply; 3+ messages in thread
From: Roberto Ribeiro @ 2018-06-16  2:05 UTC (permalink / raw)
  To: cygwin

Hello list,

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). 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?

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem loading dynamic libraries - file not found
  2018-06-16  2:05 Problem loading dynamic libraries - file not found Roberto Ribeiro
@ 2018-06-16  8:14 ` Brian Inglis
  2018-06-16  9:47   ` Marco Atzeri
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Inglis @ 2018-06-16  8:14 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem loading dynamic libraries - file not found
  2018-06-16  8:14 ` Brian Inglis
@ 2018-06-16  9:47   ` Marco Atzeri
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Atzeri @ 2018-06-16  9:47 UTC (permalink / raw)
  To: cygwin

On 6/16/2018 4:05 AM, Brian Inglis wrote:
> 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).

Roberto,

it can be a older version than needed,
ldd and cygcheck will not notice the difference.

It is usually due to a an error in upgrade.
It can happen when you run setup but some cygwin program/process
was still running and the used libraries can not be upgraded.

Check is some /usr/bin/*.new libraries are present.
In that case a re-boot could solve the issue.

> If that does not clue you in sufficiently, also run:
> 
> 	$ cygcheck -hrsv > cygcheck.out &
> 

In the cygcheck.out you can look at the date of the specific
library and compare with the one in the latest package

https://cygwin.com/cgi-bin2/package-grep.cgi

In case of mismatch, close all process and re-install the package
containing that library.

Regards
MArco

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-16  7:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-16  2:05 Problem loading dynamic libraries - file not found Roberto Ribeiro
2018-06-16  8:14 ` Brian Inglis
2018-06-16  9:47   ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).