* Getting return code "127" after execution of program
@ 2023-06-02 9:58 rajesh kesavan
2023-06-02 12:42 ` Eliot Moss
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: rajesh kesavan @ 2023-06-02 9:58 UTC (permalink / raw)
To: cygwin, cygwin-owner, mailman, cygwin-developers,
cygwin-developers-owner
Cc: aashishchavan, sivaji.cdev, atulpathare226
[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]
Hi,
We are Trying to execute a program like ./sample.exe on 64 bit Cygwin. This
executable is built with CMake on Cygwin 64 bit.
The Program is not throwing any error or success details. it simply comes
out from the running screen without any error and success states.
and we checked output status using "*$?*" It returns "*127*" output.
We checked the missing libraries by using "cygcheck sample.exe" and added
the required libraries as per the *cygcheck* report.
*Details:*
$ gcc --version
*gcc (GCC) 11.3.0*
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ld --version
*GNU ld (GNU Binutils) 2.40*
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later
version.
This program has absolutely no warranty.
$ cygcheck --version
*cygcheck (cygwin) 3.4.6*
System Checker for Cygwin
Copyright (C) 1998 - 2023 Cygwin Authors
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Please let me know if you want more details.
Regards,
Rajesh K
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Getting return code "127" after execution of program
2023-06-02 9:58 Getting return code "127" after execution of program 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-03 17:35 ` Andrey Repin
2 siblings, 1 reply; 6+ messages in thread
From: Eliot Moss @ 2023-06-02 12:42 UTC (permalink / raw)
To: rajesh kesavan, cygwin; +Cc: aashishchavan, sivaji.cdev, atulpathare226
On 6/2/2023 5:58 AM, rajesh kesavan via Cygwin wrote:
> Hi,
>
> We are Trying to execute a program like ./sample.exe on 64 bit Cygwin. This
> executable is built with CMake on Cygwin 64 bit.
> The Program is not throwing any error or success details. it simply comes
> out from the running screen without any error and success states.
> and we checked output status using "*$?*" It returns "*127*" output.
>
A wondering: Is the program's main declared to return an int, and does
it explicitly return 0?
(I also don't think you needed to include all those lists in your
original post; cygwin@cygwin.com would be enough for now, so I have
trimmed other lists from my response.)
Eliot Moss
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [EXTERNAL] Getting return code "127" after execution of program
2023-06-02 9:58 Getting return code "127" after execution of program rajesh kesavan
2023-06-02 12:42 ` Eliot Moss
@ 2023-06-02 15:07 ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-06-02 23:28 ` Brian Inglis
2023-06-03 17:35 ` Andrey Repin
2 siblings, 1 reply; 6+ messages in thread
From: Lavrentiev, Anton (NIH/NLM/NCBI) [C] @ 2023-06-02 15:07 UTC (permalink / raw)
To: rajesh kesavan, cygwin; +Cc: aashishchavan, sivaji.cdev, atulpathare226
> 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).
HTH,
Anton Lavrentiev
Contractor NIH/NLM/NCBI
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [EXTERNAL] Getting return code "127" after execution of program
2023-06-02 15:07 ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
@ 2023-06-02 23:28 ` Brian Inglis
0 siblings, 0 replies; 6+ messages in thread
From: Brian Inglis @ 2023-06-02 23:28 UTC (permalink / raw)
To: cygwin; +Cc: rajesh kesavan, aashishchavan, sivaji.cdev, atulpathare226
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Getting return code "127" after execution of program
2023-06-02 9:58 Getting return code "127" after execution of program rajesh kesavan
2023-06-02 12:42 ` Eliot Moss
2023-06-02 15:07 ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
@ 2023-06-03 17:35 ` Andrey Repin
2 siblings, 0 replies; 6+ messages in thread
From: Andrey Repin @ 2023-06-03 17:35 UTC (permalink / raw)
To: rajesh kesavan, cygwin
Greetings, rajesh kesavan!
> We are Trying to execute a program like ./sample.exe on 64 bit Cygwin. This
> executable is built with CMake on Cygwin 64 bit.
> The Program is not throwing any error or success details. it simply comes
> out from the running screen without any error and success states.
> and we checked output status using "*$?*" It returns "*127*" output.
> We checked the missing libraries by using "cygcheck sample.exe" and added
> the required libraries as per the *cygcheck* report.
What is more interesting is the output of cygcheck -svr as per
>> Problem reports: https://cygwin.com/problems.html
> Please let me know if you want more details.
Did you install cygwin on the target system or you naively tried to copy only
DLL's you think are needed?
--
With best regards,
Andrey Repin
Saturday, June 3, 2023 20:32:30
Sorry for my terrible english...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Getting return code "127" after execution of program
2023-06-02 12:42 ` Eliot Moss
@ 2023-06-04 12:01 ` Jon Turney
0 siblings, 0 replies; 6+ messages in thread
From: Jon Turney @ 2023-06-04 12:01 UTC (permalink / raw)
To: rajesh kesavan, The Cygwin Mailing List
On 02/06/2023 13:42, Eliot Moss via Cygwin wrote:
> On 6/2/2023 5:58 AM, rajesh kesavan via Cygwin wrote:
>> Hi,
[...]
> (I also don't think you needed to include all those lists in your
> original post; cygwin@cygwin.com would be enough for now, so I have
> trimmed other lists from my response.)
Indeed not.
Rajesh,
You should only ever send mail to the mailing list 'owner' address if
you have a problem with your subscription to the mailing list.
Therefore, it is probably never appropriate to send mail to both the
list, and the owner of the list.
Further, cygwin-developers@cygwin.com is explicitly described as for
"contributing to the development of Cygwin [...] If you have an issue
and hope that someone will look into it for you then please do not send
email here". That seems a clear request to not send this kind of mail
there.
By spamming all these addresses, you signal that you are impatient,
inconsiderate and not respectful of the boundaries of others.
This won't help you engage members of our community who are willing to
help you solve your problem.
Please don't do it ever again.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-06 17:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02 9:58 Getting return code "127" after execution of program 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
2023-06-03 17:35 ` Andrey Repin
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).