X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 954F93857348
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1685748548;
	bh=CihPnpPBR4yx+mi8o75hwU70ngEfWAmcW2enr3v3TOQ=;
	h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=obw6/VlrxxJdesAKmKDhXJ1WNsR/4x3/9I0lPK9TfTgYGJ/4MeTx4VActXwf9B+ti
	 B/kNzhGsaeq+f1B57y3vDbZQldHonvic91hJhF/tUwQhWWaYEpPmlVWaS61yx9Gm9v
	 j0mA71YLc7GoZfxubrXHf3Xip4U+g5GUdiJP+/wk=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4A9C3858D3C
X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=647a7b1d
 a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17
 a=IkcTkHD0fZMA:10 a=zsXTZrXM9QzMwSeo8nAA:9 a=QEXdDO2ut3YA:10
Message-ID: <8fbad1b6-1f38-c9b2-6b2f-9a7c594935e8@Shaw.ca>
Date: Fri, 2 Jun 2023 17:28:28 -0600
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
 Thunderbird/102.11.2
Subject: Re: [EXTERNAL] Getting return code "127" after execution of program
Content-Language: en-CA
To: cygwin@cygwin.com
References: <CADcTMCY-CZkWjxpXB2z-tMF1_Yj4TSmBX-GiUcy+KK4oE1fXig@mail.gmail.com>
 <DM8PR09MB7095E39701B50890F2F0D169A54EA@DM8PR09MB7095.namprd09.prod.outlook.com>
Organization: Inglis
In-Reply-To: <DM8PR09MB7095E39701B50890F2F0D169A54EA@DM8PR09MB7095.namprd09.prod.outlook.com>
X-CMAE-Envelope: MS4xfC2+f0rTWBYtZZ+Q84lvNFX6plfYrF4w7IPALffQpMW8EpU3KkiAfqO/2VCu+dpfyxKM0BE5WOFGOy6jaS4Kjdm3lCD79Q60bVkA0QrWkq76MWhYIMWl
 hATvY5/NaDCPRSkuMaI3G/3M1wuB/z6KkZ6gZlTMhmEKGTsL65cb+hQB93ULnh3oEengBXtiCTwWGKd1fg2QY3wxw9cLXjv/fwxn3p98vvdM2sD5EzxzyRop
 JhBc0uljzAVhDReWoh7Y2kt977BjnXqMvIBBTxcXP1ilPdsd+Etg/PTAjWgQ4JVf1IfRJOEF+09d8NLVYIRvUe0F1uC5qJQVUEe62aXwMkA=
X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW,
 SPF_HELO_NONE, SPF_PASS, TXREP,
 T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>, rajesh kesavan <rajeshrube@gmail.com>,
        aashishchavan@yahoo.com, sivaji.cdev@gmail.com,
        atulpathare226@gmail.com
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 352NTWfT027144

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

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

