public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Problem loading dynamic libraries - file not found
Date: Sat, 16 Jun 2018 08:14:00 -0000	[thread overview]
Message-ID: <ef12d47b-4c0f-ba0a-df34-0dc6a30eb664@SystematicSw.ab.ca> (raw)
In-Reply-To: <CANTZQ+yNW5knEOTaFp+aqmxADjgsgoV-egfdSun4iAfrSV7a1Q@mail.gmail.com>

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

  reply	other threads:[~2018-06-16  2:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-16  2:05 Roberto Ribeiro
2018-06-16  8:14 ` Brian Inglis [this message]
2018-06-16  9:47   ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef12d47b-4c0f-ba0a-df34-0dc6a30eb664@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).