public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@Shaw.ca>
To: cygwin@cygwin.com
Cc: rajesh kesavan <rajeshrube@gmail.com>,
	aashishchavan@yahoo.com, sivaji.cdev@gmail.com,
	atulpathare226@gmail.com
Subject: Re: [EXTERNAL] Getting return code "127" after execution of program
Date: Fri, 2 Jun 2023 17:28:28 -0600	[thread overview]
Message-ID: <8fbad1b6-1f38-c9b2-6b2f-9a7c594935e8@Shaw.ca> (raw)
In-Reply-To: <DM8PR09MB7095E39701B50890F2F0D169A54EA@DM8PR09MB7095.namprd09.prod.outlook.com>

On 2023-06-02 09:07, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote:
>> The Program is not throwing any error or success details. it simply comes
>> out from the running screen without any error and success states.

> 127 is a POSIX return code meaning the binary file is not executable and cannot be started.
> Check what "ldd ./sample" shows.  Most likely you are missing the required runtime (dlls).

Especially check that the DLL dependencies including cygwin1.dll are all 
installed in some .../bin/ directory which is at or near the start of your PATH, 
and that any other file dependencies are also installed under the same upper 
level Cygwin "ROOT" directory (the directory above the cygwin1.dll)!

What those file dependencies are will depend on what your program calls e.g.

$ ls -gloU /etc/{mtab,hosts,networks,protocols,services}
lrwxrwxrwx 1 12 Sep  1  2015 /etc/mtab -> /proc/mounts
lrwxrwxrwx 1 53 Sep  1  2015 /etc/hosts -> 
../proc/cygdrive/c/Windows/System32/drivers/etc/hosts
lrwxrwxrwx 1 56 Sep  1  2015 /etc/networks -> 
../proc/cygdrive/c/Windows/System32/drivers/etc/networks
lrwxrwxrwx 1 56 Sep  1  2015 /etc/protocols -> 
../proc/cygdrive/c/Windows/System32/drivers/etc/protocol
lrwxrwxrwx 1 56 Sep  1  2015 /etc/services -> 
../proc/cygdrive/c/Windows/System32/drivers/etc/services

also /etc/{fstab,fastab.d/,nsswitch}, /dev/{mqueue,shm}, 
/var/run/{cygfork/,utmp} and others.

Some may be set up by the initialization code, others by the Cygwin Setup 
program, or postinstall scripts, and may need to be set up externally if the 
Cygwin Setup program is not used, e.g. /home/, /tmp/, /usr/, /var/ if the 
program calls functions which use those.

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

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

  reply	other threads:[~2023-06-02 23:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02  9:58 rajesh kesavan
2023-06-02 12:42 ` Eliot Moss
2023-06-04 12:01   ` Jon Turney
2023-06-02 15:07 ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-06-02 23:28   ` Brian Inglis [this message]
2023-06-03 17:35 ` Andrey Repin

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=8fbad1b6-1f38-c9b2-6b2f-9a7c594935e8@Shaw.ca \
    --to=brian.inglis@shaw.ca \
    --cc=aashishchavan@yahoo.com \
    --cc=atulpathare226@gmail.com \
    --cc=cygwin@cygwin.com \
    --cc=rajeshrube@gmail.com \
    --cc=sivaji.cdev@gmail.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).